Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Price Series Offset

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

    Price Series Offset

    I searched the forums and couldn't quite find something that hit what I was looking for. I would like to offset the entire price series that an existing paintbar indicator is working from. That way it just prints X ticks higher or lower then the another instance of that same price series.

    The end result being that I want to have a single data series loaded on a chart. Then a couple paintbar indicators. One would be showing one type of information on the default price series, while the other indicator is painting just above or below depending on the offset number. I can achieve the same thing by loading multiple data series, but then they don't print as nicely being in separate panels etc. Any help? Thanks!

    #2
    Hello Mabba,

    Thank you for your note.

    Could you clarify what you mean by paintbar indicator? Could you provide a screenshot that illustrates what you're looking for?

    If you have access to the code of the indicator, you can make a version that offsets where plots or drawing objects like texts are drawn, yes. I'm attaching an example that will plot two SMAs that are identical, except one is offset above or below the actual sma by the specified number of ticks for the offset (a negative number of ticks will plot it below the real SMA and a positive number will plot it above.

    Thanks in advance; I look forward to assisting you further.
    Attached Files

    Comment


      #3
      I just colored the plot according to Aroon Oscillator being above or below 0 in the attached example (I don't need an answer to the questions in the pic, I just used it for other things I am working on). Then just set BarBrush = PlotBrush. My current understanding is that the barbrush setting through which I am accomplishing this just paints the existing price series. it's not actually coloring a 'plot' on the chart. The plot is below the price bar panel. So in order for it to do that I would need to create a plot, but then it wouldn't be in the same panel if I wanted to see the oscillator as well correct?

      I guess I could create a different version of the indicator that just made the plot the price values, then I could adjust the values of the plot offset that way? It feels a little cumbersome but I could see that maybe meeting my goal.
      Attached Files

      Comment


        #4
        Hello Mabba,

        Thank you for your reply.

        You can certainly create an indicator that has IsOverlay set to true to automatically overlay that indicator on the price panel, indicators don't have to be plotted in separate panels in most cases.

        However, we're still a little unclear on what you're trying to accomplish. Would you be able to mock up a screenshot of what you'd like to see on the chart?

        Thanks in advance; I look forward to assisting you further.

        Comment


          #5
          Thank you for following up Kate, I have attached a couple pictures for reference. One being the standard way to show data series up in one window, each one on their own panel. I am looking for a way to get something like the other picture, where two separate price series are on the same panel, but offset a little on the 'Y' axis.

          I would like to put some type of paintbar on one series, and then another on the other. I am guessing this can't really be done the way I am describing so I was exploring other methods to synthesize the output. Hence my description of one price series, but multiple instances of a paint bar indicator, but with one of them containing an 'offset'. Let me know if this gets across what I am trying to do. Thanks!

          Comment


            #6
            Hello Mabba,

            Thank you for your reply.

            You could look at modifying this indicator, publicly available on our User App Share, to plot a second series of bars at an offset on the chart:

            This is a sample of how to create an indicator in Candlestick (OHLC), which was tooked from the Spread Indicator with Candlesticks developed by kdoren and originally coded for the NinjaTrader 7 platform by NinjaTrader_AdamP.


            As this is an example of how to create such an indicator, this just takes the open, high, low, and close of the primary series and plots it in a second panel. You could simply add a user input for the number of ticks to offset, and then just add that to the appropriate data point, for example:

            IndOpen[0] = Open[0] + (myOffsetTicks * TickSize);

            You could then use a negative number of ticks to offset the price below the actual bars and a positive to offset it above the price.

            By default this example plots to a second panel, but you can make it plot to the price panel by setting IsOverlay = true in State.DataLoaded.

            Please let us know if we may be of further assistance to you.

            The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

            Comment


              #7
              Sounds promising, thank you for your help! I will let you know if I need further assistance

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              579 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
              554 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