.

Money Flow Histogram System - Amibroker AFL Code

Click Image To Enlarge. Please Rate And Comment.

Money Flow Histogram System

_SECTION_BEGIN("Money Flow");

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);
Plot(Graph0, "Money Flow Histogram ("+r1+")", IIf(Graph0>Ref(Graph0,-1),ParamColor("Up Color", colorGreen ),
ParamColor("Down Color", colorRed )), ParamStyle( "Style", styleHistogram | styleThick, maskHistogram  ) );

}

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

_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();
Previous Post Next Post