Australian (ASX) Stock Market Forum

How to turn the following AFL into a scan/exploration?

Joined
30 November 2008
Posts
27
Reactions
0
Hello,

How can I turn the following AFL into a scan/exploration where it selects stocks trading at 80 or above as well as stocks trading 20 or below? Thank you for any and all help.

_SECTION_BEGIN("Stochastic Slow");
periods = Param( "Periods", 14, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Plot( StochK( periods , Ksmooth), "%K"+_PARAM_VALUES(), ParamColor( "%K color", colorCycle ), ParamStyle("%K style") );
Dsmooth = Param( "%D avg", 3, 1, 200, 1 );
Plot( StochD( periods , Ksmooth, DSmooth ), "%D"+_PARAM_VALUES(), ParamColor( "%D color", colorCycle ), ParamStyle("%D style") );
Plot(80,"", colorRed , styleDots | styleNoLine );
Plot(20,"", colorGreen , styleDots | styleNoLine );
if( Status("action") == actionCommentary )
{
printf("(Interpretation is not available yet)");
}
_SECTION_END();

Tim
 
_SECTION_BEGIN("Stochastic Slow");
periods = Param( "Periods", 14, 1, 200, 1 );
Ksmooth = Param( "%K avg", 15, 1, 200, 1 );
Plot( StochK( periods , Ksmooth), "%K"+_PARAM_VALUES(), ParamColor( "%K color", colorCycle ), ParamStyle("%K style") );
Dsmooth = Param( "%D avg", 15, 1, 200, 1 );
Plot( StochD( periods , Ksmooth, DSmooth ), "%D"+_PARAM_VALUES(), ParamColor( "%D color", colorCycle ), ParamStyle("%D style") );
d = StochD( periods , Ksmooth, DSmooth );
k = StochK( periods , Ksmooth);

Plot(80,"", colorRed , styleDots | styleNoLine );
Plot(20,"", colorGreen , styleDots | styleNoLine );
if( Status("action") == actionCommentary )
{
printf("(Interpretation is not available yet)");
}

filter = Cross(k,d) AND k<40 AND d<40; // and variations of this;
AddColumn(C*V,"approx. turnover $");

_SECTION_END();
 
Top