Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

backtesting

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

    backtesting

    Hello. I am currently using the Strategy Analyzer. When I select ES futures, it runs fine and populates the results fields. However, when I then select NQ and run it, none of the fields get populated.
    I assume it's a data issue, but I currently have charts open that contain all the ES and NQ data that would be required to run the backtest.
    Any ideas?
    Thanks

    #2
    Hello stewarco,

    Thank you for the post.

    This could certainly be related to data, this can also relate to your conditions or even an error. When you run the test, are you seeing any errors in the Log tab of the control center of the output window?

    To confirm you have data, generally, you can do what you have said or open a chart and select the date range the same as you did in the analyzer along with the same bars type and timeframe/settings. The data should be there for the analyzer to use if you can see it in the chart and have used the same settings.

    This test can help make sure you have data but is only going to tell us there is data but wont tell is if that data was used or if some other problem happened. If you have the required data, but nothing happens you will likely need to add some Prints into your script to make sure the strategy is being executed.

    A simple test would be to add a print into OnBarUpdate like the following to make sure the strategy is being called while testing:

    Code:
    protected override void OnBarUpdate()
    {
    	Print(Time[0].ToString() + " Bar: " + CurrentBar);
    After adding this print and opening the NinjaScript output window, you should see prints for each bar when run in the analyzer. If not, please try restarting the analyzer or NinjaTrader to retest.

    If you see prints, the problem likely is with the conditions to trade not becoming true. You could also use prints to verify the values in your conditions if that is the case.

    I look forward to being of further assistance.

    Comment


      #3
      resolved

      Thanks for your reply. Not sure what I did exactly but it's working now. I enabled the strategy on the Strategies tab to check what showed up in the Output Window, and that seemed to populate the data somewhere such that the Analyzer then worked.
      Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X