Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Difference between Strategy Aanalyzer vs Playback Connection modes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Difference between Strategy Aanalyzer vs Playback Connection modes?


    Click image for larger version

Name:	foo3.jpg
Views:	236
Size:	13.6 KB
ID:	1150190

    Folks, it's not clear to me how each method of analyzing a strategy (Strategy Analyzer vs Playback connection OnBar, OnPriceChange, OnEachTick) will enter a bar?

    Say on close of bar one at 100, I execute EnterLong().. The next bar starts at 99, and closes at 102. What will each of these modes: Strategy Analyser, Playback connection OnBar, OnPriceChange, OnEachTick, at what price will I enter at on bar two at EnterLong()?

    Thanks.




    #2
    Hello timmbbo,

    Thank you for your post.

    Using a Calculate mode of OnBarClose means that OnBarUpdate() will calculate only on the close of a bar and orders will fill on the close of a bar if your order entry conditions become true. OnPriceChange means that OnBarUpdate() will be called once for each price change and orders will fill intrabar when the order entry condition becomes true. OnEachTick means that OnBarUpdate() will be called for each incoming tick and orders will fill intrabar the moment your order entry condition becomes true. Running a strategy OnPriceChange or OnEachTick allows your strategy to place orders when a current bar is building (intrabar). OnBarClose will wait until the current bar is closed and a new bar begins building.

    See this help guide link for more information about Calculate modes.
    https://ninjatrader.com/support/help.../calculate.htm

    A Strategy Analyzer backtest allows you to analyze the historical performance of a strategy. A certain level of discrepancy between realtime (live brokerage account, live market simulation, Playback connection etc...) and backtest (Strategy Analyzer) results would be expected, especially on more exotic bar types like Point & Figure and Renko, please also review the 'Discrepancies between RealTime vs Backtest' Help Guide page for more details.

    When in historical data (backtesting), only the Open, High, Low, and Close will be available and there will be no intra-bar data. This means actions cannot happen intrabar, fills cannot happen intrabar. 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' and the script will not have the intra-bar information to accurately fill an order at the exact price and time.

    Discrepancies between RealTime vs Backtest — https://ninjatrader.com/support/help...a_strategy.htm

    Backtesting a Strategy— https://ninjatrader.com/support/help...ToRunABacktest

    Playback allows you to use recorded real-time Market Replay data to analyze the real-time performance of a strategy. When using real-time market data or Playback you have a choice to run a strategy tick by tick (Calculate set to 'On each tick') or for each change in price (Calculate set to 'On price change'). The fill price is based on incoming market data and volume, and you may receive better or worse fill prices depending on where the bid or ask price is and what volume is available at this market price.

    Playback - https://ninjatrader.com/support/help...ePlaybackWorks

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    66 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    141 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    46 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    51 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X