PureBytes Links
Trading Reference Links
|
> I want to buy at the highest(high,5) but I do not want the code to
> consider any of yesterday's bars. (So the first bar that I could
> execute a buy would be the 6th bar of today's session.)
If you don't want to buy until the 6th bar, why not just count bars
and don't issue orders until enough bars have passed?
if (Date <> Date[1]) then BarsToday = 0;
BarsToday = BarsToday + 1;
if (BarsToday >= 5) then buy at highest(high,5) stop;
That will issue the first buy order on the 5th bar, so the first buy
could happen on the 6th bar.
Gary
|