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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        154 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        306 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        244 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        345 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        176 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X