_SECTION_BEGIN("MACDval");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
dynamic_color = IIf( MACD() > 0, colorGreen, colorRed);
MACD_trend = IIf( MACD() >= 0, 2.5, -2.5);
Plot( MACD(), "MACD(12,26)", dynamic_color, styleHistogram | styleThick);
Plot( MACD_trend, "MACD Trend", dynamic_color, styleLine | styleThick);
_SECTION_BEGIN("SIGNALval");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( MACD(12,26),9 ),"signal 9",colorYellow,styleHistogram |styleThick, ParamStyle("Style") );
Comments
Post a Comment