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

Using different tick bars renko, i get error

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

    Using different tick bars renko, i get error

    Hello:
    Im using renko 3 and renko 9 tick bars...

    I used addrenko(instrument.fullname,9, marketdatatype.last)

    How can i call an indicator for this bar array to use in combination with renko 3 indicators?

    I tries rsi( barsarray[1], 14,3) but ninjatrader does no recognize it and telss me it does not exist..

    #2
    Originally posted by Yandychang View Post
    Hello:
    Im using renko 3 and renko 9 tick bars...

    I used addrenko(instrument.fullname,9, marketdatatype.last)

    How can i call an indicator for this bar array to use in combination with renko 3 indicators?

    I tries rsi( barsarray[1], 14,3) but ninjatrader does no recognize it and telss me it does not exist..
    NinjaScript, like its parent, C#, is cAsE SeNsItIvE. You must pay attention to the case of what you write in code.

    Comment


      #3
      case sensitivity is not an issue...

      I was just typing quick, without attention to detail, I wanted to know the correct syntax.
      I got it to work, I had functional error, although the syntax was correct. However, It worked but now I get the attached error. now I get an issue that I cant figure out because I dont remember changing anything before the error came up. I only got a new chart... and changed the amount of days to look back. Any help would be appreciated.
      Attached Files
      Last edited by Yandychang; 07-26-2014, 12:43 PM. Reason: Got it to work... thank you very much

      Comment


        #4
        Originally posted by Yandychang View Post
        I was just typing quick, without attention to detail, I wanted to know the correct syntax.
        I got it to work, I had functional error, although the syntax was correct. However, It worked but now I get the attached error. now I get an issue that I cant figure out because I dont remember changing anything before the error came up. I only got a new chart... and changed the amount of days to look back. Any help would be appreciated.
        I would suggest that you do a CurrentBars check, to ensure that you have valid bar object to access. You probably want to escape while CurrentBars[1] < 3, as your Rising() and Falling() calls are looking 3 bars back.

        You will need to check both CurrentBars objects for validity regardless.
        Code:
        if (CurrentBars[1] < 3 || CurrentBars[0] < 3) return;
        at the top of your OnBarUpdate() handler.

        Comment


          #5
          Thank you thats exactly what it was... it worked well...

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Brevo, Today, 01:45 AM
          0 responses
          3 views
          0 likes
          Last Post Brevo
          by Brevo
           
          Started by aussugardefender, Today, 01:07 AM
          0 responses
          3 views
          0 likes
          Last Post aussugardefender  
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          240 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          9 responses
          384 views
          1 like
          Last Post Gavini
          by Gavini
           
          Started by oviejo, Today, 12:28 AM
          0 responses
          6 views
          0 likes
          Last Post oviejo
          by oviejo
           
          Working...
          X