Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

total profit discrepancy

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

    total profit discrepancy

    I have a question about the total profit discrepancies between the strategy analyzer and the strategy performance on a chart. For example, the total profit is $4400 in the strategy analyzer, while it is $4000 in the strategy performance of a chart for simulation account. Both are in same time period.

    I am wondering if the discrepancy is due to the different order filled mechanisms.

    #2
    Hello Playdc,

    Thank you for your post.

    Live orders are filled on an exchange with a trading partner on an agreed upon price based on market dynamics. Backtest orders are not using these market dynamics. Instead these are filled based on logical rules from processing historical data.
    • When in historical data, only the Open, High, Low, and Close will be available and there will be no intra-bar data.
      • This means actions cannot happen intra-bar, fills 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' and the script will not have the intra-bar information to accurately fill an order at the exact price and time.
    Intra-bar granularity adds a second data series such as a 1 tick series using AddDataSeries() so that the strategy or indicator has the individual ticks in the historical data in between the High and Low of the primary series.

    In NinjaTrader 8, there have been two new enhancements so that programmers may not have to manually add this secondary series and code the script for high accuracy fills (Order Fill Resolution) or for intra-bar actions (TickReplay) depending on the needs of the script.
    Note: bar types that are IsRemoveLastBarSupported cannot be used with TickReplay and generally cause inaccurate results when backtesting in historical data.
    Note: High Order Fill Resolution allows for intra-bar order fills with historical processing, but is not compatible with Tick Replay.
    Please see this support article for a detailed explanation:


    https://support.ninjatrader.com/s/ar...ar-granularity

    Comment


      #3
      Thank you for the reply, Gaby.

      I understand the real trading result is not exactly same as the backtest results. My question is why I choose the order filling method to be standard(fastest) for both strategy analyzer and the strategy on a char, the historical performances are somehow different.

      Comment


        #4
        Are you strictly looking at Historical Strategy Performance report (not realtime or realtime+historical)?

        Is your test in the Analyzer testing over the exact same historical data? In order for the results to the be the same, the exact same start and end dates for strictly the historical tests have to be the same (i.e. in your testing range for the Analyzer, do not include data where your strategy was processing real-time data).

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        119 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        62 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        40 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        45 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        82 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X