Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Historical Strategy performance doesn't match Strategy analyser results

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

    Historical Strategy performance doesn't match Strategy analyser results

    I've been backtesting a strategy on USDCAD, and the entries in strategy analyzer don't match the ones on Strategy performance - Historical (after enabling the same strategy on a chart).
    Sometimes they match and sometimes they don't.
    Is there a reason why this is happening?

    #2
    Hello YakusaTrader,

    Thanks for your post.

    As long as the same data is used to drive the backtest with the same settings, I would expect similar results.

    I may suggest to check your chart to be sure the strategies do in fact have the same starting bars, and that the trade signals are being triggered on the same bars. One item to note is an open position on the Strategy Analyzer will be closed by the Strategy Analyzer when it will not be closed on a chart's backtest. Another item to note is if the Strategy Analyzer is being used in the Playback Connection, you may be receiving some unexpected results. We suggest disconnecting from the Playback Connection to use the Strategy Analyzer without issue.

    To assist you further could you provide answers to the following questions?
    • Could you confirm that the chart data is the same between your backtest on the chart and the backtest in the Strategy Analyzer?
    • Do you see the same issue with the SampleMACrossover strategy?
    • Is the strategy a multi time frame strategy?
    • Do you have a timer or some other component used in the strategy where it's actions require more than the price data iterating?
    I look forward to being of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you Jim.
      I am not on Playback connection. The strategy was backtested on FXCM demo. The strategy was also launched on FXCM demo.
      1. I launched the strategy from the strategy tab. It was backtested on 1 minute TF. I used 1 min TF in the strategy Tab as well. I loaded enough bars for my indicators.
      2. I didn't check SampleMACrossover yet.
      3. The strategy is multi-timeframe.
      4. The strategy is pretty basic, entry based on 2 indicators and conditions of time (it only trades during a set of time). exit conditions if close[0] > or < that Position.average.

      Comment


        #4
        Thanks for the reply YakusaTrader,

        Could you further elaborate on the following items?

        1. When you open a chart for the first trade in a Strategy Performance Report for historical data, and scroll the chart to the beginning, do these first bars match the first bars in your Strategy Analyzer Backtest's chart? Does the first trade line up?
        2. We would be interested to hear about your results with the SampleMACrossover strategy as this can rule out issues between the platform and with the strategy you are testing.
        3. Thanks, we'll note that if there is behavior that can be attributed here.
        4. After confirming 1 & 2, and if the first trade is off when the data entering is the same, could you reduce the strategy so it only makes this one trade? We could focus on a reduced example and give further input to what is happening with reduced code.

        I look forward to your reply.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,609 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        9 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        19 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        6 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        16 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X