|
New help request
I could use some help with my nested if statement below - the Alertmsg & the email triggers are happening properly, but the sound files are not playing appropriately - they are playing but not the right sound with the event.
any help would be appreciated:
Dave
*******************
{
ind_buffer3[i] = EMPTY_VALUE; ind_buffer4[i] = EMPTY_VALUE;
if (ind_buffer1[i] > ind_buffer2[i] && ind_buffer1[i+1] < ind_buffer2[i+1])
{ ind_buffer3[i] = Low[i] - 1 * Point;
AlertMsg = "BUY Signal";
TradeType = 1 ;
PlaySound("airforce.wav");}
if (ind_buffer1[i] < ind_buffer2[i] && ind_buffer1[i+1] > ind_buffer2[i+1])
{ ind_buffer4[i] = High[i] + 1 * Point;
AlertMsg = "SELL Signal";
TradeType = -1;
PlaySound("tires.wav");}
if (eMailAlerts_On && LastTradeType != TradeType && LastTradeTime != Time[0])
{LastTradeType = TradeType;
LastTradeTime = Time[0];
SendMail("EA Alert: Mac-Daddy Lunge// ",Symbol()+" - "+AlertMsg);}
}
//---- done
return(0);
}
|