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

Two different charts on the same strategy show different results in live simulation.

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

    Two different charts on the same strategy show different results in live simulation.

    Hello, i am building a strategy including custom indicators and running it on a live simulation account to see results overtime

    The strategy runs on two different charts, one with custom indicators, and another with the corresponding Default indicators just provided by Ninja Trader.

    The custom indicator chart has shown a trade sell at profit target, while the chart with the Default indicators showed the same trade sell at a stop loss, the true result was the trade that sold at a stop loss.

    When running a back test with the Custom Indicators, that same trade is also sold at profit target.

    I have provided two images that show the results on the two different charts.

    I would like to avoid these types of scenarios in the future and know that the logic is working as intended, is there a way to provide assistance in that manner? let me know if you need any additional information from me!

    Thanks in Advance.
    Aviram Y

    Custom Chart
    Click image for larger version

Name:	BigLossChart.png
Views:	50
Size:	660.3 KB
ID:	1237048​​
    Default Chart
    Click image for larger version

Name:	BigLossProfitChart.png
Views:	45
Size:	17.4 KB
ID:	1237049
    Attached Files

    #2
    Hello Aviram Y,

    When running multiple instances of the same strategy in Realtime you could see differences depending on the code used and the settings of the strategies. Comparing historical vs realtime can also show differences for the above reasons.

    I would suggest reviewing the following post which goes over how to debug different use cases, that would also give you the information needed to debug two of the same strategy running in realtime. You would need to use Prints to identify what specifically is different between the tests to know why the results differ.

    Citizens of the NinjaTrader Community, A common question we hear from clients is 'why are results from backtest different from real-time or from market replay?'. 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.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you!
      I think the Default chart was indeed the live one, and the custom chart loaded the order as historical data, hence the different results.
      If this happens again I will debug further and post my results here and maybe help someone else, unless this Topic is closed once marked solved by me.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Haiasi, 04-25-2024, 06:53 PM
      2 responses
      17 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      5 views
      0 likes
      Last Post Creamers  
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,786 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,407 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Working...
      X