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 NullPointStrategies, Today, 05:17 AM
        0 responses
        50 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 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