How write a MACD in 3 color and the zero line
I'm write this formula, but I'm have always time 2 color
Why ?
Thank
--------------------------------------------------------------------------------
_SECTION_BEGIN("MACD-3C");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
Plot( ml = MACD(r1, r2),StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2),
IIf(MACD(r1, r2)>=0 AND MACD(r1,r2)>EMA(MACD(r1,r2),r3),ParamColor("MACD
color", colorBlack ),
IIf(MACD(r1, r2)>=0 AND MACD(r1,r2)<EMA(MACD(r1,r2),r3), ParamColor("MACD
color", colorBlue ),
IIf(MACD(r1, r2)<0 AND MACD(r1,r2)>EMA(MACD(r1,r2),r3), ParamColor("MACD
color", colorBlue ),
ParamColor("MACD color", colorTeal ) ))), ParamStyle("MACD style") );
Plot( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(),
ParamColor("Signal color", colorTeal ),styleDashed );
_SECTION_END();
--------------------------------------------------------------------------------
Merci
YLTech ( Yves L. )
Le présent message et les documents qui y sont joints sont réservés
exclusivement au destinataire indiqué. Il est strictement interdit d'en
utiliser ou d'en divulguer le contenu. Si vous recevez le présent message par
erreur, veuillez le détruire S.V.P. et nous en aviser immédiatement afin que
nous puissions corriger nos dossiers. Merci.
This message and the attached documents may contain privileged or confidential
information that are intended to the addressee only. Any unauthorized
disclosure is strictly prohibited. If you happen to receive this message by
error, please delete it and notify us immediately so that we may correct our
internal records. Thank you.
[email protected]