• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawing Hollow Candlesticks

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

    Drawing Hollow Candlesticks

    I would like to create an indicator whose sole function is to draw hollow candlesticks that are outlined with green for up-bars, and outlined with red for down-bars. This seems so simple, yet I can’t seem to get it to work, for the bar colors set by the Data Series don’t get changed. Can you help me get on track?

    #2
    Hello DenMan,
    Thanks for writing in and I am happy to assist you.
    Please try the following code
    Code:
    if (Close[0] >= Open[0])
    	CandleOutlineColorSeries[0] = Color.Green;
    else CandleOutlineColorSeries[0] = Color.Red;
    				
    BarColorSeries[0] = Color.Transparent;
    http://www.ninjatrader.com/support/h...olorseries.htm
    http://www.ninjatrader.com/support/h...olorseries.htm

    Please let me know if I can assist you any further.
    Joydeep M.NinjaTrader Customer Service

    Comment


      #3
      Your solution worked great. Thanks for the simple solution!

      Comment


        #4
        Hello DenMan,
        Glad it worked for you.
        Please let me know if I can assist you any further.
        Joydeep M.NinjaTrader Customer Service

        Comment


          #5
          Color Bars Indicator

          One further question. When I include this indicator in my workspace, it puts it in a new panel. Is there code to always include this in the Data Series panel, or do I have to manually change that when the indicator is included?

          Comment


            #6
            Originally posted by DenMan View Post
            One further question. When I include this indicator in my workspace, it puts it in a new panel. Is there code to always include this in the Data Series panel, or do I have to manually change that when the indicator is included?
            Overlay = true;

            ref: http://www.ninjatrader.com/support/h...ml?overlay.htm

            Comment


              #7
              Hello,
              Thanks koganam for the code snippet.

              DenMan you can use the code as suggested by koganam.

              Please let me know if I can assist you any further.
              Joydeep M.NinjaTrader Customer Service

              Comment


                #8
                Hollow bar of plotstyle

                Is anyone here knows how to make the plotstyle bar solid to plotstyel bar hollow?

                Comment


                  #9
                  Hello,
                  NinjaTrader_JoyDeep's example would accomplish this within by creating an indicator that uses the example:
                  Code:
                  if (Close[0] >= Open[0])
                  	CandleOutlineColorSeries[0] = Color.Green;
                  else CandleOutlineColorSeries[0] = Color.Red;
                  				
                  BarColorSeries[0] = Color.Transparent;
                  Cody B.NinjaTrader Customer Service

                  Comment


                    #10
                    That is not what I mean to make a hollow. I know already how to make the price bars to hollow bars. What I want is the plot style of a plot series. For example I have a dataseries name VOL so to plot the values of it is VOL.set(1023.50); and I have set the plotstyle to be a solid bar . I want to make the plotstyle of VOL to a hollow bars instead of a solid bars.

                    Comment


                      #11
                      One way would be to make a custom volume indicator with two bar plots and set the first one to match the chart background color and a slightly smaller size than the second. The problem with this is that the top of the bar will have no outline.
                      eDanny
                      NinjaTrader Ecosystem Vendor - Integrity Traders

                      Comment


                        #12
                        I think that's good idea to try out. Thanks eDanny.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by danitralla, Yesterday, 03:33 AM
                        1 response
                        18 views
                        0 likes
                        Last Post NinjaTrader_ShawnB  
                        Started by ninjo, Yesterday, 11:54 AM
                        0 responses
                        6 views
                        0 likes
                        Last Post ninjo
                        by ninjo
                         
                        Started by deblanka, Yesterday, 08:56 AM
                        0 responses
                        13 views
                        0 likes
                        Last Post deblanka  
                        Started by Boonfly8, 03-22-2019, 12:30 PM
                        7 responses
                        24 views
                        0 likes
                        Last Post sledge
                        by sledge
                         
                        Started by Sohal, Yesterday, 05:02 AM
                        2 responses
                        19 views
                        0 likes
                        Last Post techmint  
                        Working...
                        X