I am trying to capture divergences on the TRI. I am sure
I am missing something. Can someone please review the code.
////////////////////////////////////////
pds = Param("Periods", 13, 3, 30, 1);
Pds1 = round(pds *
0.231);
TRI = RSI(pds) + MA(RSI(pds1),pds);
Plot ( TRI, "TRI("+pds+","+pds1+")", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
dp = Divergence(TRI,
C, 0.75)==1; // positive ---
dn = Divergence(C, tri,
0.75)==-1; //negative ---
shape = dp * shapeSmallCircle + dn * shapeSmallCircle
;
PlotShapes ( shape, IIf( dp, colorGreen, colorRed ),0,TRI,0
);
////////////////////////////////////////
__________ Information from ESET Smart Security, version of virus signature database 4460 (20090926) __________
The message was checked by ESET Smart Security.
http://www.eset.com
__._,_.___
**** 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/
__,_._,___
|