AFL was posted long ago ..... Use some filter intraday after scanning the stocks ...
DON'T ASK ME ANY QUESTIONS. I DON'T TRADE USING THIS AFL...
_SECTION_BEGIN();
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 )) ));
Buy=EMA(C,13)>EMA(EMA(C,13),9) AND Cross (C,Peak(C,1.5,1));
//Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));
MYcolor = IIf( EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,1.5,1), colorGreen, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1),colorBlue, colorOrange ));
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar |styleThick );
//shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
shape = Buy * shapeUpArrow ;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );
//Buy = ExRem(Buy,Sell);
//Sell = ExRem(Sell,Buy);
Filter = Buy ;
AddColumn(Buy,"buy",1.2);
GraphXSpace = 5;
dist = 1.5*ATR(10);
for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist, colorGreen );
}
DON'T ASK ME ANY QUESTIONS. I DON'T TRADE USING THIS AFL...
_SECTION_BEGIN();
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 )) ));
Buy=EMA(C,13)>EMA(EMA(C,13),9) AND Cross (C,Peak(C,1.5,1));
//Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));
MYcolor = IIf( EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,1.5,1), colorGreen, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1),colorBlue, colorOrange ));
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar |styleThick );
//shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
shape = Buy * shapeUpArrow ;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );
//Buy = ExRem(Buy,Sell);
//Sell = ExRem(Sell,Buy);
Filter = Buy ;
AddColumn(Buy,"buy",1.2);
GraphXSpace = 5;
dist = 1.5*ATR(10);
for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist, colorGreen );
}