PureBytes Links
Trading Reference Links
|
In a message dated 10/30/00 8:45:00 AM Pacific Standard Time,
bogeybunky@xxxxxxxxxxxx writes:
<< I use the code below to print a trendline based on the prior day high on
the
current day chart.
It works fine on Tues through Friday, but because of the weekend days does
not work on Monday
unless I change the input value to 2 for Monday. I would like to eliminate
the input so that the
code automatically adjusts for the weekend. Any suggestions would be
appreciated. The T1 variable
is used to set Trendline attributes.
Thanks in advance.
Bill
Inputs: DOW(1);
Variable: YH(-1), T1(-1);
If High[1]>0 Then Begin
YH = TL_New(Date, Sess1StartTime, High, Date+DOW, Sess1EndTime, High);
T1 = Text_New(Date+DOW, Sess1EndTime, High, "YH");
End; >>
I think what you need is code added which sets DOW = 2 for Mondays and Dow =
1 for the other days. This would also remove the need for DOW as an input.
I think this might work:
If Dayof Week = 1 then DOW = 2 else DOW =1;
I haven't used "Dayof Week" in code so check out if I've got that part right.
Lee Scharpen
|