[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Where is my mistake.



PureBytes Links

Trading Reference Links

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

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___