Changes

Jump to navigation Jump to search

4.6.9 Advanced. How The Strategy Backtesting Engine works

199 bytes added, 13:01, 20 August 2013
no edit summary
At historic calculation, the Backtesting Engine calculates every bar of the chart in order, it opens, emulates real-time within the bar and closes the bar. At the bar close the Backtesting Engine calculates all the strategy signals. The strategy calculation results in the collection of orders generated by the signals during the next calculation. MarketThisBar orders are also executed here at the bar close.  <div style="background-color: #E3FBE5;">Note: '''MarketThisBar''' command cannot be used in IntraBar Order Generation and BarMagnified modes. The orders will be sent on the bar close only.</div>  Then, the new bar opens, Backtesting Engine fills MarketNextBar orders using Open of the bar, and after that, upon every tick within the bar it fills price and algorithm orders. Then, Backtesting Engine closes the bar, calculates the signals and the whole process repeats once again. In Open Next Bar mode all the signals are calculated at the bar open in the context of the closed bar. In IOG mode the strategy calculates signals without IOG attribute, as usual, and signals with IOG – at every tick within the bar and every tick in real-time.
<br>
Orders, generated by the signals without IOG, are active from open to close of the bar. Orders generated in IOG mode - are active from the signal calculation to the signal calculation.

Navigation menu