Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Removing "connection" lines on PriorDayOHLC

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

    Removing "connection" lines on PriorDayOHLC

    HI - I use the stock PriorDayOHLC indicator on minute-based RTH charts. The indicator has an annoying artifact which is that there is a "connecting line" drawn from the High line (same for OLC) of the day prior to the High line of the current day. I'd like to get rid of this line as it makes reading the first bar of all my RTH charts difficult. Can anyone give me simple instructions on how to do this?

    I don't want to erase the lines from previous days - just get rid of the "connecting" lines.

    thanks!

    #2
    Hi Surly,

    Plots will draw continuously for every bar, so there is no easy technique to disable the connecting lines. You could use drawing objects like lines instead, but these will cause a much greater resource demand than plots.

    If you are willing to lose the value for the first bar each day, you could try setting transparent then.

    if(Bars.FirstBarOfSession)
    {
    PlotColors[0][0] = Color.Transparent;
    PlotColors[1][0] = Color.Transparent;
    PlotColors[2][0] = Color.Transparent;
    }
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks - that was exactly what I needed. There were 4 plots so I just added one more line to your code example. happy holidays!

      Comment


        #4
        I'm glad that worked for you. Thanks for the follow up and Happy Holidays!
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by Surly View Post
          HI - I use the stock PriorDayOHLC indicator on minute-based RTH charts. The indicator has an annoying artifact which is that there is a "connecting line" drawn from the High line (same for OLC) of the day prior to the High line of the current day. I'd like to get rid of this line as it makes reading the first bar of all my RTH charts difficult. Can anyone give me simple instructions on how to do this?

          I don't want to erase the lines from previous days - just get rid of the "connecting" lines.

          thanks!
          You can place this block of code just before you "Initialize the current day settings to the new days (sic) data".
          Code:
          if (Bars.FirstBarOfSession)
          {
          PriorOpen.Reset(1);
          PriorHigh.Reset(1);
          PriorLow.Reset(1);
          PriorClose.Reset(1);
          }

          Comment


            #6
            Wouldn't changing the lines from solid to hash be the easiest fix?
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment

            Latest Posts

            Collapse

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