Hi,
I'm trying to set the Properties of moving Averages in the following
code.
I would like to use ParamToggle ( On,Off) to show or hide the moving
Average, But it is not working.
----------------------------------------------
UpColor = colorBrightGreen;
DownColor = colorRed;
_SECTION_BEGIN("MA50");
UpColor = ParamColor("Up Color",UpColor );
DownColor = ParamColor("Down Color",DownColor );
STYLE = ParamStyle("Style",styleDots );
AVERAGES = ParamToggle("AVERAGES ON/OFF","ON,OFF",0);
_SECTION_END();
_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 50, 2, 200, 1, 10 );
COND = IIf( MA(P, Periods ) > Ref( MA(P, Periods ), -1 ), UpColor ,
DownColor );
Plot( MA( P, Periods ),"", AVERAGES | COND , Style);
_SECTION_END();
-----------------------------------------------
Any one can help please?
Regards