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

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.

    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.

        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            32 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            4 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            19 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            6 views
            0 likes
            Last Post cre8able  
            Started by Haiasi, Today, 06:53 PM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X