AFL for SH 315 for Amibroker

#1
Please find the AFL for SH 315 can be used in Amibroker --------------->courtesy: wisestocktraderdotcom

// EMA Cross-315
Range1=Optimize("range1",3,1,100,1);
Range2=Optimize("range2",15,1,100,1);
Plot( Close, "Close", colorBlack, styleCandle );
Plot(EMA( Close,range1), "3d-ema", colorRed );
Plot(EMA( Close,range2), "15d-ema", colorBlue );
Buy = Cross(range1,range2);
Buy = Cross((Close),(EMA(Close,range1)));
Buystop = Ref(EMA(Close,range1),-1);
BuyPrice = Max(Buystop,Low);
Sell = Cross(EMA(Close,range2),(Close));
Sellstop = Ref(EMA(Close,range1),-1);
SellPrice = Min(sellstop,High);
Short = Sell;
Cover = Buy;
PlotShapes(shapeUpArrow*Buy,colorBlack);
PlotShapes(shapeDownArrow*Sell,colorRed);
GfxDrawText("EMA315", 4, 12, 350, 40);


Happy trading....... by ramath
 

rahulskr

Active Member
#4
Hi Friends

I am getting the following error when i put the formula in Amibroker. I am using version 4.80. Please help me.

Thanks in advance.
Cheers

315:
Cover = Buy;
PlotShapes(shapeUpArrow*Buy,colorBlack);
PlotShapes(shapeDownArrow*Sell,colorRed);
GfxDrawText(
---------^

Error 30.
Syntax error
 

rahulskr

Active Member
#6
Hi Friends

I am getting the following error when i put the formula in Amibroker. I am using version 4.80. Please help me.

Thanks in advance.
Cheers

315:
Cover = Buy;
PlotShapes(shapeUpArrow*Buy,colorBlack);
PlotShapes(shapeDownArrow*Sell,colorRed);
GfxDrawText(
---------^

Error 30.
Syntax error
 

jayan12

Active Member
#7
Please find the AFL for SH 315 can be used in Amibroker --------------->courtesy: wisestocktraderdotcom

// EMA Cross-315
Range1=Optimize("range1",3,1,100,1);
Range2=Optimize("range2",15,1,100,1);
Plot( Close, "Close", colorBlack, styleCandle );
Plot(EMA( Close,range1), "3d-ema", colorRed );
Plot(EMA( Close,range2), "15d-ema", colorBlue );
Buy = Cross(range1,range2);
Buy = Cross((Close),(EMA(Close,range1)));
Buystop = Ref(EMA(Close,range1),-1);
BuyPrice = Max(Buystop,Low);
Sell = Cross(EMA(Close,range2),(Close));
Sellstop = Ref(EMA(Close,range1),-1);
SellPrice = Min(sellstop,High);
Short = Sell;



Cover = Buy;
PlotShapes(shapeUpArrow*Buy,colorBlack);
PlotShapes(shapeDownArrow*Sell,colorRed);
GfxDrawText("EMA315", 4, 12, 350, 40);


Happy trading....... by ramath
Ramath,

why don't you post this in SH's 315 thread itself. It could help many people who follow that thread.
 

rpc

Active Member
#9
@ hmp
just add following two lines before plotshapes(.. function and after Cover=Buy; command

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

hmp

Well-Known Member
#10
One more thing. How do I find out stocks which are crossing 15 EMA.Is this afl can be used to scan out those stocks among all the bunch?
 

Similar threads