Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Paintbars and Candles

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

    Paintbars and Candles

    Hi
    Candles get painted incorrectly by paintbar code - see attached.
    If it's an up bar the body should be hollow - otherwise the whole point of candles is kind of missed?
    Attached Files

    #2
    This is as expected behavior upon using the BetterVolume indicator.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Huh?

      It uses the word BarColor - is there a method of not filling in the body of an up candle but painting the outline/ shadows?

      Comment


        #4
        I suggest to contact the creator of the indicator regarding this inquiry.

        In addition, please see the link below for information regarding CandleOutlineColor.
        JasonNinjaTrader Customer Service

        Comment


          #5
          got it

          Ah right so you have to test if close > open and then use CandleOutlineColor if it is but Barcolor if it isn't. Makes for long winded coding.

          Comment


            #6
            You can make the candles any color you wish and still see if they close up or down by using code to make trend candles:

            if(your test here for candle color 1)
            {
            CandleOutlineColor = Color.DarkBlue;
            if(Open[0]<Close[0] && ChartControl.ChartStyleType == ChartStyleType.CandleStick )
            {
            BarColor = Color.Transparent;
            }
            else
            {
            BarColor = Color.Blue;
            }

            }


            if(Your test here for candle color 2)
            {
            CandleOutlineColor = Color.Crimson;
            if(Open[0]<Close[0] && ChartControl.ChartStyleType == ChartStyleType.CandleStick )
            {
            BarColor = Color.Transparent;
            }
            else
            {
            BarColor = Color.Red;
            }

            Make candles as many colors as you like, according to any rules and still see if they are hollow (up) or filled (down). If the outline and wicks are too thin, increase the thickness to 2-3 pixels in you chart properties.
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment


              #7
              Candles

              Thanks eDanny.

              Comment


                #8
                Candle outline thickness

                Anyone know the code line to alter CandleOutline Width??
                I can set it in Data Series properties for all candles but I would like to increase the thickness of specific candles to highlight them.

                Comment


                  #9
                  Unfortunately, CandleOutlineWidth is not a supported method.
                  JasonNinjaTrader Customer Service

                  Comment


                    #10
                    Property

                    I appreciate that - it was merely a request as to how to get to it rather than support it :-)

                    Comment


                      #11
                      Unfortunately, I am not aware of a way to access it in NinjaScript.

                      I will forward the suggestion to programmatically access the width of the CandleOutline to development.
                      JasonNinjaTrader Customer Service

                      Comment


                        #12
                        Accessing the width of CandleOutline programmatically has been added in our tracking system for possible future enhancements. It is listed under ID# 1233.
                        JasonNinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by Mindset View Post
                          Anyone know the code line to alter CandleOutline Width??
                          I can set it in Data Series properties for all candles but I would like to increase the thickness of specific candles to highlight them.
                          Code:
                                      ChartControl.ChartStyle.Pen2.Width = int width; // wick thickness
                                      ChartControl.ChartStyle.Pen.Width = int width; //candle outline thickness
                          As always, remember that NT will not even mention ChartControl, let alone discuss any problem that you have if you use it. Use at your own discretion.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by fx.practic, 10-15-2013, 12:53 AM
                          5 responses
                          5,404 views
                          0 likes
                          Last Post Bidder
                          by Bidder
                           
                          Started by Shai Samuel, 07-02-2022, 02:46 PM
                          4 responses
                          95 views
                          0 likes
                          Last Post Bidder
                          by Bidder
                           
                          Started by DJ888, Yesterday, 10:57 PM
                          0 responses
                          8 views
                          0 likes
                          Last Post DJ888
                          by DJ888
                           
                          Started by MacDad, 02-25-2024, 11:48 PM
                          7 responses
                          159 views
                          0 likes
                          Last Post loganjarosz123  
                          Started by Belfortbucks, Yesterday, 09:29 PM
                          0 responses
                          8 views
                          0 likes
                          Last Post Belfortbucks  
                          Working...
                          X