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

Re: [amibroker] Need help with writing a one line code for a scan



PureBytes Links

Trading Reference Links

Dickie
Can you give us the reference or rationale for FVE . IE How was it put together.
Thanks
Dave Fitch
 
----- Original Message -----
Sent: Wednesday, June 22, 2005 7:53 AM
Subject: [amibroker] Need help with writing a one line code for a scan

Below is the afl code for overlaying a money flow indicator onto the
price chart.  Normally - the money flow and the prices move in
unison.  Once in a while - there is a divergence and the money flow
goes in one direction and the price in another.  Looks very dramatic
on the chart.
Qts - how can I write a line of code that allows me to scan for
stocks where the money flow indicator (FVE in the code) cuts the
price line on the price chart?

********************************************************
Col = IIf(Close>Ref(Close,-1), colorGreen,colorRed);
Plot(Close,"Price", Col, styleBar);

Col=IIf(Close>Ref(Close,-1),colorGreen,colorRed);
Plot(Close,"PRICE",COL,styleBar);

_SECTION_BEGIN("Volume");
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorBlueGrey ),
ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick,
maskHistogram  ), 2 );
_SECTION_END();

Col=IIf(Close>Ref(Close,-1),colorGreen,colorRed);
Plot(Close,"PRICE",COL,styleBar);

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %
g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}",
O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("FVE");
Period = 22;

// users of v4.25 or higher can use Param to adjust period in real
time
// Period = Param("FVE period", 22, 10, 80, 1 );

MF = C - (H+L)/2 + Avg - Ref( Avg, -1 );

Vc = IIf( MF > 0.003 * C, V,
IIf( MF < -0.003 * C, -V, 0 ) );

FVE = Sum( Vc, Period )/MA( V, Period )/Period * 100;

Plot( FVE, "FVE", colorRed, styleOwnScale );

_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





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