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

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 Waxavi, Today, 02:00 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by alifarahani, Today, 09:40 AM
            5 responses
            23 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by Kaledus, Today, 01:29 PM
            4 responses
            11 views
            0 likes
            Last Post Kaledus
            by Kaledus
             
            Started by gentlebenthebear, Today, 01:30 AM
            3 responses
            16 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by PhillT, Today, 02:16 PM
            2 responses
            7 views
            0 likes
            Last Post PhillT
            by PhillT
             
            Working...
            X