Skip to main content

EMA Cross Over for Amibroker (AFL)

jahan999 over 16 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    trading system, amibroker
The formula is meant to work with Buystops and Sellstops at the previous days 7d-ema crossovers. Appears to work well with long trades in about 20% of the SPX. Designed for weekly traders.

Indicator / Formula

Copy & Paste Friendly
// EMA Cross
Range1=Optimize("range1",7,1,20,1);
Range2=Optimize("range2",7,1,20,1);
Plot( Close, "Price", colorBlack, styleCandle ); 
Plot(EMA( Close,range1), "7d-ema", colorRed );  
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;

0 comments

Leave Comment

Please login here to leave a comment.