//+------------------------------------------------------------------+ //| Alert_DMI.mq4 | //| Kalenzo | //| bartlomiej.gorski@gmail.com | //+------------------------------------------------------------------+ #property copyright "Kalenzo" #property link "bartlomiej.gorski@gmail.com" extern int period = 14; extern int applied_price = PRICE_CLOSE; #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- double dip = iADX(Symbol(),0,period,applied_price,MODE_PLUSDI,0); double dim = iADX(Symbol(),0,period,applied_price,MODE_MINUSDI,0); double pdip = iADX(Symbol(),0,period,applied_price,MODE_PLUSDI,1); double pdim = iADX(Symbol(),0,period,applied_price,MODE_MINUSDI,1); if((pdip >= pdim && dip < dim) || (pdip <= pdim && dip > dim) ) Alert(Symbol()+" DMI CROSS"); //---- return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Indicator Curves created:
Indicators Used:
Movement directional index
Custom Indicators Used:
Order Management characteristics:
Other Features:
It issuies visual alerts to the screen