SetBarFillColor
- set bar/candlestick/cloud chart fill color

Indicators
(AFL 3.1)


SYNTAX SetBarFillColor( colorarray )
RETURNS NOTHING
FUNCTION SetBarFillColor( colorarray ) allows to independently control candlestick, bar, cloud, and area chart fill color

SetBarFillColor must PRECEDE the Plot() function call it applies to.

when applied to:

  • styleCandle - SetBarFillColor controls the color of interior of candle body, shadows and outline is controlled by color passed in Plot statement
  • styleArea - SetBarFillColor controls the color of interior of histogram bars
  • styleBar - SetBarFillColor controls the color of the bar (H-L), open and close ticks color is controlled by Plot statement
  • styleCloud - SetBarFillColor controls the color of interior of the cloud, outline is controlled by color passed in Plot statement
Other styles are not affected
EXAMPLE SetBarFillColor( IIf( MACD()>Signal(), colorYellow, colorBlue ) );
Plot( C, "Price", IIf( C > O, colorGreen, colorRed ), styleCandle )
SEE ALSO PLOT() function

References:

The SetBarFillColor function is used in the following formulas in AFL on-line library:

More information:

Updated on-line reference