What I want to do in my strategy is buy at stop, with the stop price being the trend line value at the bar. For real time trading I would code this like:
CalculateOnBarClose = false; . . If (FirstTickOfBar) If (Close[0] > trendLineValue) EnterLong(1, entryString); else EnterLongStop(1, trendLineValue, entryString);
In the backtest strategy code I just wrote
EnterLongStop(1, trendLineValue, entryString);
When I looked at the backtest chart, I saw that the entries were not where I would have expected them to be, would it have been real time trading.
There surely must be a simple workaround for this kind of problem, but so far I just couldn't find out what it is.

Comment