Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why do markers stop painting even tho no compile errors

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

    Why do markers stop painting even tho no compile errors

    1. The attached code shows line 83 encircled. If this is commented out, the code above it (lines 55 through 78) execute correctly... uncommented, they don't. There are no compile errors either way.

    2. I am trying to set up variables in order to test whether or not Stochastics(1,20,3).K is rising... while I understand that I can use the "Rising" method directly on the Stochastics data series, what is there about line 83 that can cause the above lines to be in error?

    TIA
    Attached Files

    #2
    saroj, this 'stops working' because you access a value not present in your dataseries object at the start of your chart - http://www.ninjatrader-support2.com/...ead.php?t=3170

    If this occurs, please make it a habit to check the Log tab of the Control Center for errors, this would be reported there then.

    Comment


      #3
      At the top of your OnBarUpdate section try this line:

      if(CurrentBar < 1) return;

      You are trying to access a prior bar before there is one.
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        Thanks... corrected this... works fine now

        Thanks... corrected this... works fine now

        Originally posted by eDanny View Post
        At the top of your OnBarUpdate section try this line:

        if(CurrentBar < 1) return;

        You are trying to access a prior bar before there is one.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        155 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        90 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        137 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        130 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X