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

Access to second series data in Renko

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

    Access to second series data in Renko

    Hi. I have a strategy based on Renko chart. Default Renko Brick Size is 6 and I added a new Renko series to my strategy. new Renko brick size is 4.
    Code:
    AddRenko(Instrument.FullName, 4, MarketDataType.Last);
    Now I'm trying to get Closes value for the second series.
    Code:
    Closes[1][0]
    It returns a true value for the first index, but for other indexes throw error: Index was out of range.



    #2
    Hello Soghandi ,

    Thanks for your post.

    Are you using a currentBars[] check at the top of OnBarUpdate() so that you are only accessing when the bars are available?
    Reference: https://ninjatrader.com/support/help...urrentbars.htm

    You would need to check for both the chart bars [0] as well as the added data series [1].
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Yes. At the first of OnBarUpdate, I had checked it. also, I checked BarInProgress for efficiency.
      As you can see in the attached image,the second bar series has 416 rows.

      Comment


        #4
        Hello Soghandi,

        Thanks for your reply.

        Please post your source code as an attachment for review.

        If you do not wish to post in public please write into PlatformSupport[at]NinjaTrader[dot]com and attach your script to your e-mail. Mark the e-mail Atten:Paul and please include a link to this thread for reference.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        1 response
        7 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 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
         
        Working...
        X