PureBytes Links
Trading Reference Links
|
> Mitch, I see what you're trying to do. You want the day to finish,
> and then bracket the intraday price chart between two lines
> representing the high and low for that same day.
> I'd do it with trendlines, myself. Like this:
Different strokes. :-) Here's how I'd do it:
===
vars: BarsToday(0), BarsBack(0);
BarsToday = BarsToday + 1;
if Time = Sess1EndTime then begin
for BarsBack = 0 to BarsToday-1 begin
plot1[BarsBack](HighD(0), "H");
plot2[BarsBack](LowD(0), "L");
end;
BarsToday = 0;
end;
===
Set the plot style of plot1/2 to "dot," or you'll have connecting
lines between daily H/L's.
The Time = Sess1EndTime test fails if your trading day ends
early. If you prefer, you could test for Date > Date[1], which
succeeds on the first bar of the next day, but you'd have to
change some of the other logic for that. This method plots the
H/L of today as soon as the last bar today finishes, instead of
waiting until tomorrow's first bar.
Gary
|