Here is what to consider when Calculating OnEachTick
28.07.2020 10.33

Not Course Related

Frank

Here is what plattformsupport from NT gave me about the problem, when strategies are not backtesting OnEachTick.

Just wann make these valuable info available for strategy coders b4 they have to pursue same info for similar case. Here is the email from NT-support, enjoy:


During a backtest, there will be no intra-bar data by default. This means actions cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known. 

Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick'.

You may use Playback with Market Replay data to test a strategy and have orders filled using intra-bar movement.

For backtesting in the Strategy Analyzer, you may use Tick Replay along with an added 1-tick series to have logic processed intra-bar and have orders filled intrabar.

Tick Replay would be used to have the logic process OnEachTick or OnPriceChange with historical data, but this does not allow for intra-bar order fills.

High Order Fill Resolution allows for intra-bar order fills with historical processing, but is not compatible with Tick Replay. You would then need to add a single tick data series and submit orders to that single tick data series for a strategy that uses Tick Replay.

Please reference the following Help Guide links for more information.

Differences between real-time vs backtest (historical).
http://ninjatrader.com/support/helpG...ime_vs_bac.htm

Using Playback with Market Replay data — https://ninjatrader.com/support/helpGuides/nt8/index.html?playback.htm#HowToWorkWithReplayData



Backtesting NinjaScript Strategies with an intra-bar granularity - https://ninjatrader.com/support/helpGuides/nt8/backtesting_ninjascript_strate.htm

Additional information may be found in this NinjaTrader Forum post —  https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/100192-comparing-real-time-historical-and-replay-performance?t=102504

Please let us know if we may be of further assistance to you.