Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer not running

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

    Strategy Analyzer not running

    Hi,

    I am trying to run the strategy analyzer and it is not starting when I click Run. The strategy has the Keltner Channel indicator and I need to use a MA period of 2000 for the 1 minute. I am able to see it on the chart but I don't know why I can't use it on the Analyzer.

    Please let me know.

    Thanks

    #2
    Hello sptrader81,

    Thanks for your post.

    Please test running a backtest on the SampleMACrossover strategy that comes with NinjaTrader by default and note if you see backtesting results appearing.

    If you see backtest results when testing the SampleMACrossover strategy but not when backtesting your custom strategy, this indicates there is likely an issue with the logic of your custom strategy.

    Note that you will need to test your strategy over a minimum of 2000 bars so that there are enough bars for the MA period to calculate in the script.

    In that case, debugging prints need to be added to the strategy to understand how the strategy is behaving.

    Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

    Below is a NinjaTrader Support article detailing Debugging using Print() and TraceOrders.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thanks Brandon. I am able to run the analyzer when I use a 200 ma period (up to 250 I belive) but when go over this the analyzer doesn't run. I built the strategy on Builder.

      Comment


        #4
        Hello sptrader81,

        Thanks for your notes.

        The MA Period you are passing in would need to be less than the number of bars being tested on so that the indicator value calculates.

        You could add a print to your script that prints out CurrentBar to see the number of bar indexes there are. And, add debugging prints to the strategy to understand how your logic is behaving as noted in post # 2.

        This means you would need to increase the amount of data you are backtesting on so that at least 2000 bars are being loaded if you want to set the MA Period to 2000.

        Backtesting: https://ninjatrader.com/support/help...a_strategy.htm

        Below is a NinjaTrader Support article detailing Debugging using Print() and TraceOrders. See the Debugging with the Strategy Builder demonstration video on this Support article.


        Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).
        Last edited by NinjaTrader_BrandonH; 04-14-2024, 08:31 PM.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        24 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        122 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        92 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        136 views
        0 likes
        Last Post cmoran13  
        Working...
        X