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 is always zero in real time

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

    Plot is always zero in real time

    I have an indicator that works fine when you first load it, and you review historical data, but as time moves forward one of the various plots is always zero.

    This only seems to happen on non-tick charts, best I can tell. For instance, on a 5m chart this issue occurs. But, on a 233 tick chart, or a 5 range chart, it works fine in real time.

    In addition, the plot is really just a value of another indicator. When I pull up that other indicator on the same "problem" chart, it works fine.

    Here is the code for the Set:
    VWMA.Set(TrendStrengthA(Typical, VC.NinjaScript.Utility.MovingAverageType.VWMA, Slowlength, 10, 10).TrendStrength[0]);

    Below are some screen shots, and then the export of the indicator is attached.

    Click image for larger version

Name:	1.png
Views:	1
Size:	69.3 KB
ID:	891907

    Click image for larger version

Name:	2.png
Views:	1
Size:	77.7 KB
ID:	891908

    Thanks,
    Mike

    #2
    Works the same here on minute charts as well as tick ones - isn't one LinReg value always 0 depending on the up / dn oscillation?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Works fine here as imported but if you change CalculateOnBarClose to false it will plot at zero. I have seen this happen before when referencing other indicators. I have had to change the other referenced indicators by adding another dataseries that I could call data from.
      Last edited by eDanny; 04-20-2009, 07:33 AM.
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        Thank you. I need sleep! I actually noticed that hours ago... and then promptly forgot to fix my template!!!

        Mike

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by geotrades1, Today, 10:02 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rajendrasubedi2023, Today, 09:50 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by bmartz, Today, 09:30 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        3 responses
        26 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X