hello there I want to set an alert on my mt4 platform but I want it on the over bought or oversold indicator. can some one help me?
- Indicators with alerts/signal
- Can some one help fix this indicator
- MT4 Trading platform
You will have to write a custom indicator to send the Alert...
//+------------------------------------------------------------------+ //| AlertIndicator.mq4 | //+------------------------------------------------------------------+ #property version "1.00" #property strict #property indicator_chart_window extern int OVERBOUGHT=70; extern int OVERSOLD=20; extern int MaxAlerts=3; double RSI; int ALERT=0; int bars; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping bars=Bars; //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start(){ if(bars!=Bars){ bars=Bars; RSI=iRSI(Symbol(),0,14,PRICE_CLOSE,1); if(RSI>OVERBOUGHT && ALERT<MaxAlerts){ Alert("RSI OVERBOUGHT"); ALERT++; } if(RSI<OVERSOLD && ALERT<MaxAlerts){ Alert("RSI OVERSOLD"); ALERT++; } if(RSI<OVERBOUGHT && RSI>OVERSOLD){ALERT=0;} } return(0); } //+------------------------------------------------------------------+
Files:
AlertIndicator.mq4
2 kb
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register