I'm doing a backtest and using calculateonbarclose=true.
I undertstand that the bar 0 is the current closed bar. I enter a stoplimit order that is being executed next bar and then, through OnExecution event I'm detecting execution and placing the StopOrder. However ninja is returning tha the order can't be placed because the stop is greater then or equal to the close of the bar.... Actually it is greater the the close of the bar 0, but not the close of bar (-1) that is when the entry is being executed....
Am I doing something wrong ?
Regards,

Comment