Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Run button is disabled on strategy analyzer

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

    Run button is disabled on strategy analyzer

    Watched your YT video on strategy analyzer.

    Set my analyzer to use local data only per documentation. Used one day for which I know i have data loaded locally (10/1) in the time frame section.

    Filled out the rest of the fields.

    Run button remains disabled.

    What is the issue?

    #2
    Hello sultanofsuede,

    May I confirm you are using 8.1.3.1?

    Are you able to reproduce this behavior when backtesting the SampleMACrossover included with NinjaTrader?

    Are you able to open a chart to the same date range, bar type, and interval and see the data load on the chart?

    Try restarting NinjaTrader, does the behavior continue?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      Here's a screen cap. Same issue. Template menu in the lower right corner is also disabled.

      I'm currently using the playback connection. Is that the issue?

      Click image for larger version

Name:	image.png
Views:	339
Size:	46.6 KB
ID:	1323098

      Comment


        #4
        Use local data only is selected. FWIW - I pay the 41 per month for data have the 1500 membership package. I thought the data streams were included in that for back testing old data.

        Thx.

        Click image for larger version

Name:	image.png
Views:	338
Size:	73.1 KB
ID:	1323100

        Comment


          #5
          Hello sultanofsuede,

          The Strategy Analyzer is not intended to function when connected to Playback.

          Either disconnect from all connections to use the cached historical data already downloaded on the computer.

          OR connect to a brokerage or data feed that has the historical data for the instrument you are testing.

          "I thought the data streams were included in that for back testing old data."

          You are connected to Playback and not to the NinjaTrader Brokerage. Connect to the NinjaTrader Brokerage if you want to download data from that connection.
          NinjaTrader provides 1 year of historical tick data and minute and day data as far back as recorded (typically 10 years) for the most popular future instruments.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            OK sounds great! Thx for the quick response!

            Comment


              #7
              Run button is enabled. Click it and says, "Running blah blah..." for 3 seconds.

              Then nothing happens. I don't see anything in the log tab. Is there another place I can look to check for errors?

              Comment


                #8
                Here's a screen cap. Run is enabled.

                Template is the same one I use fine on playbacks.

                Click image for larger version

Name:	image.png
Views:	336
Size:	79.9 KB
ID:	1323130​​
                Attached Files

                Comment


                  #9
                  Hello sultanofsuede,

                  Run-time errors will appear on the Log tab of the Control Center.

                  If there are errors, please provide the full error message.


                  Is the issue with the connection and data sorted out?

                  Are there chart bars appearing on the Chart Display of the Strategy Analyzer?


                  Try testing the Sample MA Crossover strategy included with NinjaTrader on the same chart or Strategy Analyzer using the same instrument, bar type, interval, and date range.
                  Do you see results with the Sample MA Crossover strategy? (This would confirm for us data is available and the issue is with the logic in the custom script)

                  If the strategy is getting data and the strategy is enabled or a backtest is run with no errors in the Log tab of the Control Center, and the Sample MA Crossover is returning results, then would likely indicate the logic conditions in the custom strategy did not evaluate as true or orders are being ignored or cancelled.

                  In order to better understand how the code is working, it will be necessary to use Print to see how the conditions are evaluating and enable TraceOrders to see if orders are being submitted, ignored, rejected, or cancelled.

                  Below is a link to a support article that demonstrates using prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.
                  Debugging using Print() and TraceOrders

                  Enable TraceOrders.
                  Print the time of the bar and all values used in the conditions that submit entry orders. Include labels for all values and comparison operators.
                  Let me know if you need any assistance creating a print or enabling TraceOrders.

                  Save the output from the output window to a text file and provide this with your reply.
                  I'll be happy to assist with analyzing the output.​
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Simple MA works fine.

                    Like I said, I checked the log tab before.

                    There was an error that said don't use the high resolution. I went to standard. Now it doesn't do anything but flicker for a couple of seconds.

                    I've run this during the morning on back test and it worked fine. It would be easier to test my strats without going through the playback since that is so time consuming.

                    Nothing shows up in the output. I use a Print() quite a bit and works fine in playback.

                    I'll keep experimenting.

                    Comment


                      #11
                      Hello sultanofsuede,

                      Is your custom strategy calling AddDataSeries()?

                      If you call Print(Time[0]); as the first line of OnBarUpdate() is nothing at all printing to the output window?

                      Are you compiling after making any changes?
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        [quote[Is your custom strategy calling AddDataSeries()?[/quote]

                        Yes, I am. Is this bad?

                        Comment


                          #13
                          Hello sultanofsuede,

                          It's not a bad thing. Just more considerations.

                          What instrument and bar type is being added with the call to AddDataSeries()?
                          Is there a custom TradingHours template being specified?

                          Is there historical data downloaded for the added instrument and bar type in the Tools > Historical Data Window?

                          Can you open a chart to that instrument, bar type, interval, and date range and see the full data on the chart?

                          In the custom script, in OnBarUpdate(), is the logic being run on a specific BarsInProgress?

                          If you call Print(Time[0]); as the first line of OnBarUpdate() is nothing at all printing to the output window?

                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            I commented out the AddDataSeries() call and recompiled. Still same issue. I don't think I need the data series to be set there.

                            Here's what I have: I'm only testing 10/1 - 10/2. Now it waits several more seconds before stopping, but nothing is produced.

                            My strat uses calculate on each tick (runs fine on different VMs; one family member is making money at least). I set the resolution here to high/tick. I have the tick data loaded from what I can tell.

                            I'm testing MNQ 12-24.

                            Thx Chelsea!

                            Click image for larger version

Name:	image.png
Views:	332
Size:	245.8 KB
ID:	1323149

                            Comment


                              #15
                              Hello sultanofsuede,

                              Show the Chart display in the Strategy Analyzer.

                              Show the historical data for Minute > October 1st in the Historical data window.

                              In the custom script, in OnBarUpdate(), is the logic being run on a specific BarsInProgress?

                              If you call Print(Time[0]); as the first line of OnBarUpdate() is nothing at all printing to the output window?


                              "My strat uses calculate on each tick"

                              Do you have TickReplay enabled and 1-tick intra-bar granularity implemented?
                              Developer Guide - Improving backtest order fill accuracy with intrabar granularity
                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by NullPointStrategies, Today, 05:17 AM
                              0 responses
                              51 views
                              0 likes
                              Last Post NullPointStrategies  
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              129 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              69 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              42 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              46 views
                              0 likes
                              Last Post TheRealMorford  
                              Working...
                              X