Your if statement is kinda strange and you have missed a parameter on the second RSI statement .. here is how I would write it:
Inserted Code
int start() { if (iRSI(NULL,0,21,PRICE_CLOSE,0) > 49 && iRSI(NULL,0,21,PRICE_CLOSE,0) < 51) { PlaySound("sirenhilo.wav"); } return (0); }
QuoteDislikedWhat's wrong with the following?
//+------------------------------------------------------------------+
//| RSIAlert.mq4 |
//| Palmer |
//| http://www |
//+------------------------------------------------------------------+
#property copyright "Palmer"
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
if(iRSI(NULL,0,21,PRICE_CLOSE,0) > 49 && if(iRSI(NULL,0,21,PRICE_CLOSE,) < 51;
{
PlaySound("sirenhilo.wav");
}
return (0);
}
//+------------------------------------------------------------------+