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

Plot keeps flat lining at 0 and reload gives true plot

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

    Plot keeps flat lining at 0 and reload gives true plot

    Hello,

    I have a custom indicator on which I am using Calculate.OnBarClose. The indicator has a secondary series on it. On tick charts, one of the plot lines keeps falling to 0 and staying there (image 1 - green plot bottom right). I then have to reload NS to get the plot to show the true position (image 2 - green plot bottom right), but within a minute or two it will start the behaviour again. The plot is not behaving in this manner on MIN charts. Any ideas what the problem may be?

    Thank you

    Edited: I have dealt with a similar issue before in a previous thread, so I will check the solution there.
    Attached Files
    Last edited by GeorgeW; 05-25-2017, 11:30 AM.

    #2
    Hello,

    Thank you for the post.

    I wouldn't be certain without seeing the code, but potentially the logic is created a 0 value which is being plotted? Have you tried adding Prints in where you are setting the plot to see if it is being set to the expected value?

    Otherwise, I would likely suggest to make a second test indicator, and add the secondary series and plot to that. then check if that indicator works outside of the existing logic you have. If you are able to see the plot working normally, that would indicate some portion of the other indicator is the cause. Otherwise, if that sample fails as well, we could both look at that code and see what may be happening.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by terofs, Yesterday, 04:18 PM
    1 response
    22 views
    0 likes
    Last Post terofs
    by terofs
     
    Started by CommonWhale, Today, 09:55 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Gerik, Today, 09:40 AM
    2 responses
    7 views
    0 likes
    Last Post Gerik
    by Gerik
     
    Started by RookieTrader, Today, 09:37 AM
    2 responses
    13 views
    0 likes
    Last Post RookieTrader  
    Started by alifarahani, Today, 09:40 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X