SEARCHING for PROMPT AFL for AMI BROKER

#11
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 )) ));

ShowMAs = ParamToggle("Show MAs", "No|Yes", 1);

//-- Modified by KelvinHand V3.0 -----
MA1=EMA(C,13);
MA2=EMA(MA1,9);

//MA3=BBandTop(C,20,2);//Ref(MA(C,3), -3);
//MA4=BBandBot(C,20,2);//Ref(MA(C,3), -3);


MA5=MA((H+L+C)/3,5);
stk = StochK();
std = StochD();

if(ShowMAs)
{
Plot(MA1, "MA1", colorYellow);
Plot(MA2, "MA2", colorRed);
//Plot(MA3, "MA3", colorGrey40, styleDashed);
//Plot(MA4, "MA4", colorGrey40, styleDashed);
//Plot(MA5, "MA5", colorDarkYellow, styleDashed);

}



Buy = Cross (MA1,MA2);
Sell= Cross (MA2,MA1);

Short = MA1>MA2 AND BarsSince( Cross(stk, std)) AND std>80 AND Cross(ma5,C) AND C<O;
Cover = MA1<MA2 AND BarsSince( Cross(std, stk)) AND std<20 AND Cross(C,ma5) AND C>O;


Buy= ExRem(Buy, Sell);
Sell= ExRem(Sell, Buy);


BullColor = ParamColor("Bull Color", colorGreen);
BearColor = ParamColor("Bear Color", colorRed);
NTColor = ParamColor("Bear Color", colorDarkYellow);


MYcolor = IIf( C>MA1, BullColor,
IIf(C<MA1 , BearColor, NTColor));
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleCandle );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

shape = Short * shapeSmallDownTriangle;
PlotShapes( shape,ColorRGB(128,0,128),0, High);

shape = Cover * shapeSmallUpTriangle;
PlotShapes( shape,ColorRGB(128,128,0),0, Low);



GraphXSpace = 5;
dist = 1.123*ATR(10);


for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy\[email protected]" + C[ i ], i, L[ i ]-dist, colorGreen );
if( Sell ) PlotText( "Sell\[email protected]" + C[ i ], i, H[ i ]+dist, colorRed);
if( Short ) PlotText( "@" + C[ i ], i, H[ i ]+dist, ColorRGB(128,0,128));
if( Cover ) PlotText( "@" + C[ i ], i, L[ i ]-dist, ColorRGB(128,128,0));

}
 
Last edited:

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?