Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to show closing price with color bars

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

    How to show closing price with color bars

    I've created an indicator that uses BarColor and CandleOutlineColor. These are very useful but now I can't tell where the bar closed. I would like to draw a black horizontal line on top of the colored bar to indicate the "close". Can you please tell me how this can be done. I've tried this but it doesn't work.
    DrawLine("CloseLine" + CurrentBar, 1, Close[1], 0, Close[0], Color.Black);
    Thanks

    #2
    Hello,

    Thanks for your forum post.

    Unfortunately this would not be possible in NinjaScript to do this since the only anchor point for the line is the center of the bar. You would need to make modifications to the actual chart styles themselfs which gets into unsupported territory unfortunately.

    You might consider drawing a triangle or dot at the top of the bar or bottom of the bar to indicate the close is on the top or bottom or some other solution to this.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      I tried adding a dot but it put the dots on my panel 2 indicator instead of on the close of the current bar.
      DrawDot("My dot" + CurrentBar, false, 0, Close[0], Color.Black);
      What do I need to do to fix this?
      thanks

      Comment


        #4
        Hello,

        Add,

        DrawOnPricePanel = True;
        DrawDot();
        DrawOnPricePanel = False;

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          I put this code in my indicators' action. Bar color and candle color work fine, but dot does not show up. What am I doing wrong?

          BarColor = Color.Green;
          CandleOutlineColor = Color.Green;
          DrawOnPricePanel =
          true;
          DrawDot(
          "My dot" + CurrentBar, false, 0, Close[0], Color.Black);
          DrawOnPricePanel =
          false;

          Comment


            #6
            Hello,

            Looks like this used to work in 6.5 but no longer in 7.

            Please see the below post I found on this:



            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            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
            549 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X