if (FirstTickOfBar && (Position.MarketPosition == MarketPosition.Flat)) {
Print("At " + ToTime(Time[0]) + " of close last bar " + Close[1]);
...
}
Going through one bar, for example, I'd expect to get:
At 101500 of close last bar 2054.25
Instead, going through one bar, I get:
At 101500 of close last bar 2054.25
At 101500 of close last bar 2054.25
At 101100 of close last bar 2054.25
At 101200 of close last bar 2054
At 101300 of close last bar 2054.5
At 101400 of close last bar 2055.25
At 101500 of close last bar 2055.5
Somehow, I'm entering my clause seven times, upon one close of the bar. Of course, I want to enter my clause only once, when the 5 minute bar closes on my 5 minute chart. How to do?
Thanks,
Comment