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

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.
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        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.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,404 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            95 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            8 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            159 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            8 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X