Respected Khushi JI...
THANKS FOR REPLY
in u r starting post... u write the below afl code
EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,2,1)
or
EMA(C,13)>EMA(EMA(C,13),9)
.....................
i found the below afl...
_SECTION_BEGIN("MABIUTS");
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,5,1)) ;
Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));
Short=EMA(C,13)<EMA(EMA(C,13),9) AND Cross (Trough(C,5,1),C) ;
Cover =Cross (EMA(C,13),EMA(EMA(C,13),9));// OR Cross (C,Peak(C,2,1)) ;
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
MYcolor = IIf( EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,2,1), colorLime, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1),colorBlue, colorRed));
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar|styleThick );
shape = Buy * shapeUpArrow + Sell * shapeDownArrow + Short * shapeDownTriangle + Cover * shapeUpTriangle;
PlotShapes( shape, IIf( Buy, colorGreen, IIf(Short, colorYellow ,IIf(Cover, colorTurquoise,colorRed ))),0, IIf( Buy, Low, High ) );
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 );
if( Sell ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist, colorRed);
if( Short ) PlotText( "Short\n@" + C[ i ], i, H[ i ]+dist, colorYellow);
if( Cover ) PlotText( "cover\n@" + C[ i ], i, H[ i ]+dist, colorTurquoise);
}
_SECTION_BEGIN("Volume");
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorLavender ), styleNoTitle | ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick | styleNoLabel, maskHistogram ), 2 );
_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("EMA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
***Can i use above afl for choosing stocks for trading ? BUT.....HOW ?
Can u pls tell me KHUSHI JI....
**my english is poor, pls undersatd..
Warm Regards
Chinmay