Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Candle Body Outline Colour

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

    Candle Body Outline Colour

    Hi,

    Is it possible to set the candle body to be the same colour as the bar body, e.g. green for an up bar and red for a down bar without effecting the wick of the candle? I've managed to change the whole candle colour to match the body but this also effects the wick, ideally the wick would remain the colour set in the chart options or be configurable within the Ninjascript (I can't find references to it within the help pages).

    Indicator I've used is attached.

    Thanks
    Attached Files

    #2
    I believe BarBrush is the property you are looking for. This is the NT8 replacement for BarColor

    Code:
    		protected override void OnBarUpdate()
    		{
    			if (Close[0]>Open[0])
    			{
    				CandleOutlineBrush = Brushes.Green;
    				BarBrush = Brushes.Green;
    			}
    			if (Close[0]<Open[0])
    			{
    				CandleOutlineBrush    = Brushes.Red;
    				BarBrush	= Brushes.Red;
    			}
    			if (Close[0]==Open[0])
    			{
    				CandleOutlineBrush   = Brushes.White;
    				BarBrush = Brushes.White;
    			}
    		}
    	}
    edit: The CandleOutlineBrush will change both the outline and the wick. If you're looking to keep the wick, but only color the candle body and outline, you will need to develop your own custom bar type. There is a similar chart style another beta user developed here which I think will help achieve your goal:

    Last edited by NinjaTrader_Matthew; 07-07-2015, 03:31 PM.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    7 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X