Colored candle

#1
Hi
An AFL and its associated chart is given below.
How to get the candles also colored as EMA?
Thanks in advance
SRJC
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 50, 2, 300, 1, 10 );
Plot(EMA( P, Periods ), _DEFAULT_NAME(),
IIf(EMA( P, Periods ) > Ref(EMA( P, Periods ),-1),ParamColor("Rising EMA", colorBlue),ParamColor("Falling EMA", colorRed)),
ParamStyle("style",styleLine+styleDots,maskAll));
_SECTION_END();
 

Similar threads