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

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

    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 Gerik, Today, 09:40 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by RookieTrader, Today, 09:37 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by alifarahani, Today, 09:40 AM
        0 responses
        5 views
        0 likes
        Last Post alifarahani  
        Started by KennyK, 05-29-2017, 02:02 AM
        3 responses
        1,284 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by AttiM, 02-14-2024, 05:20 PM
        11 responses
        185 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X