Skip to main content

DMI & Moving Average System for Amibroker (AFL)

elmoro94 about 16 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    trading system, amibroker

Rombout Kerstens Combining DMI And Moving Average For A Eur/Usd Trading System, describes a technique for long entry and exit that uses both J. Welles Wilders Dmi (directional movement indicator) and a moving average.

Indicator / Formula

Copy & Paste Friendly
LenMa = Param("MA period", 30, 10, 100 ); 
LenDMI = Param("DMI period", 14, 5, 100 ); 

DmiLong = PDI( LenDMI ) > MDI( LenDMI ); 
DmiShort = PDI( LenDMI ) < MDI( LenDMI ); 

MALong = C > MA( C, LenMA ); 
MAShort = C < MA( C, LenMA ); 

Buy = DMILong AND MALong; 
Short = DMIShort AND MAShort; 
Sell = Short; 
Cover = Buy;

1 comments

Leave Comment

Please login here to leave a comment.