Hi Yves,
You are not defining the different ParamColor with different names -- all
are named "MACD color". Try giving each a unique name. E.g. -- "MACD
color 1", "MACD color 2" , etc.
Peace and Justice --- Patrick
----- Original Message -----
Sent: Thursday, November 05, 2009 11:09
PM
Subject: [amibroker] MACD in 3 color( 2nd
TIME )
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. yltech@xxxxxxxxxxxx
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|