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 sjsj2732, Yesterday, 04:31 AM
            0 responses
            33 views
            0 likes
            Last Post sjsj2732  
            Started by NullPointStrategies, 03-13-2026, 05:17 AM
            0 responses
            286 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            286 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            133 views
            1 like
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            91 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Working...
            X