Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Indictor stops painting

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

    Strategy Indictor stops painting

    I appologize in advance for not including all the required information to make answering this question easy. Sadly this is my first attempt at doing this and I don't exactly know what would be helpful or not.

    That being said, I have an indictor that is loaded via a strategy. I can load this same indictor on a chart without the strategy and the indictaor works perfectly.

    When I load the same indicator programmatically via the strategy, it starts off ok. But about 10-20 bars in the indictor just stops working. I don't see anything in the logs to indicate a failure.

    What debugging steps would you suggest to help me track down what's going on?

    Thanks!


    #2
    Hello CopyPasteGhost,

    Thanks for the post.

    If there are no errors and the strategy is not disabling then it may be the way the indicator was used or possibly the indicators conditions to plot are not becoming true.

    The best way forward would be to use some prints to address where the problem is starting. A first step would be to add prints into the indicators OnBarUpdate. Run it manually and see how the prints look then run the strategy and see if the output is different. The prints could be something as simple as printing the CurrentBar index next to where you plot:
    Code:
    Value[0] = Close[0];
    Print(CurrentBar);
    That lets you know if the indicator is being called in the same way or not. if you see the same result you could try printing the plot value and see if the calculation you are doing is reaching a different result:

    Code:
    Value[0] = Close[0];
    Print(Time[0] + " - " + Value[0]);
    If you cant see what is happening I would suggest to either attach your strategy + indicator as an export so we can test it or send that attachment into scriptingsupport [at] ninjatrader.com along with the ticket id 3166366

    I look forward to being of further assistance.

    Comment


      #3
      This is Great Advice! Thanks Jesse. Let me play around with it a little and get back to you with results.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      44 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      65 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