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 cmtjoancolmenero, Today, 02:31 PM
        2 responses
        4 views
        0 likes
        Last Post cmtjoancolmenero  
        Started by tradebot, Today, 01:25 PM
        2 responses
        8 views
        0 likes
        Last Post tradebot  
        Started by merc410, Today, 03:41 AM
        4 responses
        27 views
        0 likes
        Last Post merc410
        by merc410
         
        Started by Graci117, Yesterday, 11:40 PM
        2 responses
        18 views
        0 likes
        Last Post Graci117  
        Started by Taddypole, Today, 02:25 PM
        0 responses
        3 views
        0 likes
        Last Post Taddypole  
        Working...
        X