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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      62 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      134 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
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X