Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JesseNinjaTrader Customer Service

    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 bmartz, 03-12-2024, 06:12 AM
      4 responses
      32 views
      0 likes
      Last Post bmartz
      by bmartz
       
      Started by Aviram Y, Today, 05:29 AM
      4 responses
      12 views
      0 likes
      Last Post Aviram Y  
      Started by algospoke, 04-17-2024, 06:40 PM
      3 responses
      28 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by gentlebenthebear, Today, 01:30 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by cls71, Today, 04:45 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X