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

[amibroker] AFL Code for a "Smoothed" Money Flow Indicator



PureBytes Links

Trading Reference Links

One of my favorite leading indicators is the FVE money flow indicator 
(by Markos Katsanos - see April and Sept 2003 TASC).  It combines the 
best of both inter (OBV) and intra (Chaikin MF) money flow 
indicators.  When graphed, the FVE tends to be "jagged".  For someone 
who is looking for divergences between the money flow and the prices -
 the "jaggedness" may, on occasion, lead to a wrong conclusion.  So - 
I've added a few lines of code to the indicator to "smooth" out 
the "jag".  You won't get any more additional insight but it will 
be 'easier on the eye' when you graph it - consequently - easier to 
spot divergences....in my opinion...anyway.
Sometimes - money flow trends up but one is not sure at what point to 
take an interest in the stock.  To solve this - I've added an EMA of 
13 periods to the code.  Use the 'Buy' code as a scan - when the FVE 
line (plotted in red) crosses the EMA 13 (plotted in green) from 
below - you get a signal - that money is flowing into this stock.  
Chances are the stocks the scan pulls up are divergences - money flow 
is coming in but prices are going down or flat.  Keep track of these 
stocks and then buy when you see candlestick reversals and prices 
start to go up.
*************************************

_SECTION_BEGIN("FVE Modified for Intraday");
/* Volatility modified FVE chart 
** plus Volatility color-coded Volume chart + trading system
** TJ for S&C Traders Tips Sep 2003, 
*/
Period = Param("Period for FVE", 22, 5, 80, 1 );
Coeff = Param("Coeff for Cutoff", 0.1, 0, 2, 0.01 );

intra=log(H)-log(L);
Vintra = StDev(intra, period );
inter = log(Avg)-log(Ref(Avg,-1));
Vinter = StDev(inter,period);
Cutoff = Coeff * (Vinter+Vintra)*C;
MF = C- (H+L)/2 + Avg - Ref( Avg, -1 );
VC = IIf( MF > Cutoff, V,
IIf( MF < -Cutoff, -V, 0 ));
FVE = 100 * Sum( VC, Period )/(MA( V, Period ) * Period ); 

FVESm = 100 * ( EMA( EMA( FVE - Ref( FVE, -1 ) ,25 ) ,13) 
/ EMA( EMA( abs( FVE - Ref( FVE, -1) ),25 ), 13 ) );

Plot( FVESm, "Smoothed FVE", colorRed, styleThick );
Plot (0,"",colorBlue,styleNoLabel);
Plot (EMA(FVESm, 13), "EMA 13", colorBrightGreen, styleThick);

Buy = Cross (FVESm, EMA (FVESm, 13));
Sell = Cross (EMA (FVESm, 13), FVESm);


_SECTION_END();

**************************************************




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/