How to turn the following AFL into a scan/exploration? - Aussie Stock Forums

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

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

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

2. ## Re: How to turn the following AFL into a scan/exploration?

_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;

_SECTION_END();

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Aussie Stock Forums