Announcement

Collapse
No announcement yet.

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].

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        77 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X