I'm getting strong errors using PlayBack, I'm developing a Strategy and it works in 1 second chart (Calculate.OnBarClose).
Running Playback the trades are opened with error time and price, it seems a delay of 1 second in the time/price of trade.
The error is only in orders, the calculation of the indicators, print etc ...all work fine.
At first I thought in a code mistake but finally I tested it with "Sample MA crossover" and you can see in the image the strange different behavior between the 2 charts.
With red arrow I show you the fail trades.
Running the PlayBack the two charts and trades are exactly the same. Reloading the strategy (right chart), it shows the proper trades and ere different from first chart.
In playback it should to submit the trades at the close of bar (at first tick (price) of next bar), and in historic load it works fine.
Running Playback most of the time it open and show the trade at finish of the next bar (time and price).
Can you test it at your side and suggest me how could be the problem please?
Many thanks

Comment