Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Extend plot lines in to future

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

    Extend plot lines in to future

    Hi,

    I am using opening range breakout indicator for NT 8 that is available here.

    Is it possible to extend the plot lines in to future?
    As of now they extend when every bar closes. (screenshot attached)

    this is what I am trying to do -

    This is a 30 min breakout
    once piloted they should extend till the end of the current day.

    Thank you.
    Attached Files

    #2
    Hello

    Thank you for your post.

    Glad to assist. To test, please right click on the chart > select Indicators > try changing the Calculate setting to "On each tick" see if this will extend the lines to the current bar. Regarding extending into the future, also review the settings for way to accomplish this.

    If none is found, then the indicator would need to changed to extend the lines. Our NinjaTrader team would be able to follow up with programming assistance if you would like, or I can have someone reach out with a list of third parties that would be interested in building this for you.

    Please let us know if you need further assistance.

    Comment


      #3
      Thanks Eric,

      Yes, when I switched to - on each tick - lines do extend to current bar however there are no specific settings in properties panel to extend the lines in future. Specifically once plotted they should extend till the end of the current day.

      If programming team can help that would be great

      code below.

      namespace NinjaTrader.NinjaScript.Indicators
      {

      /// <summary>
      /// </summary>
      public class OpeningRangeIndicator : Indicator
      {
      double highestPrice = 0.0;
      double lowestPrice = 0.0;
      bool bFirst = true;
      double d30minbar = 0.0;

      protected override void OnStateChange()
      {
      if (State == State.SetDefaults)
      {
      Description = "Opening Range Indicator";
      Name = "Opening Range Indicator";
      IsOverlay = true;
      IsSuspendedWhileInactive = true;

      AddPlot(Brushes.Red, "Opening Range High");
      AddPlot(Brushes.Red, "Opening Range Low");

      }
      else if (State == State.Configure)
      {
      AddDataSeries(BarsPeriodType.Minute, 30);
      }
      }

      protected override void OnBarUpdate()
      {

      if (BarsPeriod.BarsPeriodType == BarsPeriodType.Minute )
      {
      if (bFirst)
      {
      d30minbar = (30/BarsPeriod.Value)-1;
      bFirst = false;
      }

      if (CurrentBar < 20)
      {
      return;
      }


      if( BarsPeriod.Value == 30)
      {
      if( Bars.BarsSinceNewTradingDay == 0)
      {
      highestPrice = Highs[1][0];
      lowestPrice = Lows[1][0];
      }
      }

      if (Bars.BarsSinceNewTradingDay > d30minbar)
      {
      HighOfRange[0] = highestPrice;
      LowOfRange[0] = lowestPrice;
      }
      }
      }

      #region Properties
      [Browsable(false)]
      [XmlIgnore()]
      public Series<double> HighOfRange
      {
      get { return Values[0]; }
      }

      [Browsable(false)]
      [XmlIgnore()]
      public Series<double> LowOfRange
      {
      get { return Values[1]; }
      }
      #endregion
      }

      Comment


        #4
        Hello prashant290,

        Thanks for your reply.

        You would not be able to extend plot lines into the future. One way to accomplish your goal would be to draw a line using the Time overload that would allow you to specify the end of session. Reference: https://ninjatrader.com/support/help...?draw_line.htm To obtain the end of session time automatically you would need to have a session iterator, reference: https://ninjatrader.com/support/help...sessionend.htm

        Alternatively, you could use another indicator that already provides this capability, here is a short video of the "Repeater V2.2" indicator that offers an opening range type (in addition to other capabilities): https://Paul-ninjaTrader.tinytake.co...Q0Nl84NzkyNTA1

        Here is a link to that indicator if it is of interest: https://ninjatrader.com/support/foru...d=7&linkid=680

        Comment


          #5
          You guys are awesome....

          this is exactly what I was looking for.

          Thank you so much for your help.

          Comment


            #6
            Originally posted by NinjaTrader_PaulH View Post
            Hello prashant290,

            Thanks for your reply.

            You would not be able to extend plot lines into the future. One way to accomplish your goal would be to draw a line using the Time overload that would allow you to specify the end of session. Reference: https://ninjatrader.com/support/help...?draw_line.htm To obtain the end of session time automatically you would need to have a session iterator, reference: https://ninjatrader.com/support/help...sessionend.htm

            Alternatively, you could use another indicator that already provides this capability, here is a short video of the "Repeater V2.2" indicator that offers an opening range type (in addition to other capabilities): https://Paul-ninjaTrader.tinytake.co...Q0Nl84NzkyNTA1

            Here is a link to that indicator if it is of interest: https://ninjatrader.com/support/foru...d=7&linkid=680
            Multi functional repeater of up to 10 X and/or Y Highlight regions daily or day of week. User interface expands for up to 10 events. Each event configurable as a time region, price region, fixed rectangle or dynamic rectangle (adjusts on price), select a day of the week or daily. Here is a quick video [&#8230;]

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            566 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 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
            547 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X