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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        56 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        133 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        73 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X