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

[amibroker] create colorful cmf



PureBytes Links

Trading Reference Links

Hello
I have been trying to create the cmf index like 
http://stockcharts.com/education/IndicatorAnalysis/indic_ChaikinMoneyFlo
w1.html

I modifed the code from the afl library and can only create a 
histogram. How do i make it look like the ex link from stockcharts in 
terms of smoothness and colors. I do read from the docs that it is 
possible but dont know how to make it happen.

My sample modified code is below.

function CMF(r1)
{
//Graph0=(AD(C,H,L,V,r1)*V)/ Sum(V,r1);
Graph0=Sum(IIf( H>L && V>0,((( C-L )-( H-C )) / ( H-L ))*V,0),r1) / Sum
(V,r1);
dynamic_color = IIf( Graph0> 0, colorGreen, colorRed ); 
Plot(Graph0, "Chaikin Money Flow ("+r1+")", ParamColor( "Color", 
colorCycle ), styleHistogram | styleThick);

}
r1=Param("Periods", 21);
CMF(r1); 


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.19/663 - Release Date: 2/1/2007 2:28 PM