Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Regarding the renko and multi-time frames

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

    Regarding the renko and multi-time frames

    Hello,

    I'm in the process of developing a multi time frame indicator. The primary series are renko bars (say 6 ticks), while I need few more (might be up to 8) bar series based on minutes mainly.

    The first problem with renko and, say, 1 minute bars is once I apply both dataseries to chart, renko chart is very far left, while minute chart is very far right and renko has big gaps (I apply 2nd series into a separate panel, not same). I don't really care too much about this one as I only need minute bar values from 0 and 1 bar.

    The main problem is, it doesn't allow me to access secondary data series at all:
    "Error on calling 'OnBarUpdate' method for indicator 'testindicator' on bar 0: You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart."

    I load 40 days on my main series and it flips even when I'm accessing 1 minute data. I access just price data (Highs[x][0], Lows[x][0] and so on), none other indicators are involved.

    Any ideas where I might look for mistakes?

    Thank you in advance.

    #2
    RobertasJ, do you a current bars check in your OnBarUpdate() for all your added series in this script?



    For the first display issue on a MultiSeries chart the outcome would be unfortunately expected - when using a MultiSeries chart you're using the non equidistant bars spacing per default, since all bars have to be aligned by their timestamp. This would not been though when working with a MultiSeries indicator / strategy on a single series chart, so all bars are only added internally for calculation purposes then.

    Comment


      #3
      I just did for all series - it helped greatly.

      But one more question rose for me immediately, though not really associated with the issue I've had before.

      Can I somehow use DrawTextFixed method while using different colors for text of the message?

      Comment


        #4
        Great.

        Yes, you can use the second, more advanced overload to provide a custom color - http://www.ninjatrader.com/support/h...wtextfixed.htm

        Comment


          #5
          I think you've misunderstood me a bit.

          I want to use different colors in same location. If I use same method few times with different colors message will be overlapped and it will look nasty.

          Example:

          I have a message "BUY this" which I want to display in the left corner of my chart. But I want "BUY" to be in red, while "this" - in yellow.

          I'm pretty sure it's not possible with DrawTextFixed, but is there a way around this?

          Comment


            #6
            Thanks for the clarification - you're correct this is not possible with DrawTextFixed. The text string shown will have the one color spec'ed.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            577 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X