AFL for finding higher low with EOD data

lvgandhi

Well-Known Member
#1
Is there ready made AFL for finding stocks which has made higher lows with in a day or two. Kindly give me ref if any or can some one code it?
 

chintan786

Well-Known Member
#3
Is there ready made AFL for finding stocks which has made higher lows with in a day or two. Kindly give me ref if any or can some one code it?
Hi lvgandhi... may i know wht purpose it will serve..... i mean how u are going to trade tht..
 

chintan786

Well-Known Member
#4
don't know wht purpose it will serve for u.. but here is ur AFL....hope u was looking for this only..

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

_SECTION_BEGIN("snippet");
Q=Param("% Change",2,1,10,1);
Z= Zig(C ,q ) ;
HH=((Z<Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2)) AND (Peak(z,q,1 ) >Peak(Z,q,2)));
LH=((Z<Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2)) AND (Peak(Z,q,1 ) <Peak(Z,q,2)));
HL=((Z>Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2)) AND (Trough(Z,q,1 ) >Trough(Z,q,2)));
LL=((Z>Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2)) AND (Trough(Z,q,1 ) <Trough(Z,q,2)));
GraphXSpace = 5;
dist = 0.5*ATR(20);

for( i = 0; i < BarCount; i++ )
{
if( HH ) PlotText( "HH", i, H[ i ]+dist, colorRed );
if( LH ) PlotText( "LH", i, H[ i ]+dist, colorRed );
if( HL ) PlotText( "HL", i, L[ i ]-dist, colorViolet );
if( LL ) PlotText( "LL", i, L[ i ]-dist, colorViolet );

}
_SECTION_END();


chintan
 

RSI

Well-Known Member
#5
A much simpler code would be

Filter = L > Ref (L, -1);
Addcolumn (C, "Close");

This will explore the stocks whose lows are higher than immediately previous day's low. If you want to explore a stock whose low is greater than yesterday's low as well as day before yester day's low, then the code would be

Filter = L > Ref (L, -1) and L > Ref (L, -2) ;
Addcolumn (C, "Close");

You can add your own conditionalities to this code for further filtering of stocks. For example V> 50000 etc.

Hope this helps
 

Similar threads