In MetaTrader4 Terminal I write a simple alert EA
I would like to run my EA on all FOREX Majors and FOREX Minors, I've got my code all done, but I want it to automatically run on all symbols in my [ Market Watch ] panel.
Here is my code, it is very simple, can someone please help in showing me how I can make this run automatically on all Symbols or Symbols in my market watch?
double RSI = iRSI( NULL,15, 7,PRICE_CLOSE,0 );
double Stoc = iStochastic( NULL,15, 5,3,3,MODE_SMA,STO_LOWHIGH,0,0);
double BoliUpper = iBands( NULL,15,20,2,0,PRICE_MEDIAN,1,1 );
double BoliLower = iBands( NULL,15,20,2,0,PRICE_MEDIAN,2,1 );
double CandlePrevHigh = iOpen( NULL,15, 1 );
double CandlePrevLow = iClose( NULL,15, 1 );
if ((RSI > 75) && (Stoc > 80)&& (BoliUpper < CandlePrevHigh) )
{
Alert(Symbol()+" is over bought");
}
else if ((RSI < 25) && (Stoc < 20)&&(BoliLower>CandlePrevLow))
{
Alert(Symbol()+" is over sold");
}