can someone tell me why when the alert goes off it will not use all the different .wav files? It does get the sounds for EurUsd,GbpUsd & UsdJpy but it uses those for other pairs also when there is a alert. If there is an alert on UsdChf it will play the sound for UsdJpy.
if(SoundOn)
{
if(Time[0]>LastAlert)
{
if(ExtMapBuffer3[1]>ExtMapBuffer4[1] && ExtMapBuffer3[2]<=ExtMapBuffer4[2])
{
LastAlert = Time[0];
PlaySound(SellSound);
ObjectSetText("mNote", "HA " + Symbol() + " " + Period() + "--Possible SELL -- ", 10, "Arial", Aqua);
mTime = TimeCurrent();
// Alert("Heiken Ashi Alert (", Symbol(), ", ", Period(), ")--Possible SELL ");
}
else if(ExtMapBuffer3[1]<ExtMapBuffer4[1] && ExtMapBuffer3[2]>=ExtMapBuffer4[2])
{
LastAlert = Time[0];
PlaySound(BuySound);
ObjectSetText("mNote", "HA " + Symbol() + " " + Period() + "--Possible BUY -- ", 10, "Arial", Aqua);
mTime = TimeCurrent();
// Alert("Heiken Ashi Alert (", Symbol(), ", ", Period(), ")--Possible BUY ");
}
}
}
return(0);
}
//+------------------------------------------------------------------+
string GetBuySound()
{
// Get the Buy.wav file for the pair
if (Symbol()=="EURUSD") return("EurUsdBuy.wav");
if (Symbol()=="GBPUSD") return("GbpUsdBuy.wav");
if (Symbol()=="AUDUSD") return("AudUsdBuy.wav");
if (Symbol()=="USDJPY") return("UsdJpyBuy.wav");
if (Symbol()=="NZDUSD") return("NzdUsdBuy.wav");
if (Symbol()=="EURJPY") return("EurJpyBuy.wav");
if (Symbol()=="USDCAD") return("UsdCadBuy.wav");
return (Symbol());
}
//+------------------------------------------------------------------+
string GetSellSound()
{
// Get the Sell.wav file for the pair
if (Symbol()=="EURUSD") return("EurUsdSell.wav");
if (Symbol()=="GBPUSD") return("GbpUsdSell.wav");
if (Symbol()=="AudUsd") return("AudUsdSell.wav");
if (Symbol()=="USDJPY") return("UsdJpySell.wav");
if (Symbol()=="NZDUSD") return("NzdUsdSell.wav");
if (Symbol()=="EURJPY") return("EurJpySell.wav");
if (Symbol()=="USDCAD") return("UsdCadSell.wav");
return (Symbol());
}
if(SoundOn)
{
if(Time[0]>LastAlert)
{
if(ExtMapBuffer3[1]>ExtMapBuffer4[1] && ExtMapBuffer3[2]<=ExtMapBuffer4[2])
{
LastAlert = Time[0];
PlaySound(SellSound);
ObjectSetText("mNote", "HA " + Symbol() + " " + Period() + "--Possible SELL -- ", 10, "Arial", Aqua);
mTime = TimeCurrent();
// Alert("Heiken Ashi Alert (", Symbol(), ", ", Period(), ")--Possible SELL ");
}
else if(ExtMapBuffer3[1]<ExtMapBuffer4[1] && ExtMapBuffer3[2]>=ExtMapBuffer4[2])
{
LastAlert = Time[0];
PlaySound(BuySound);
ObjectSetText("mNote", "HA " + Symbol() + " " + Period() + "--Possible BUY -- ", 10, "Arial", Aqua);
mTime = TimeCurrent();
// Alert("Heiken Ashi Alert (", Symbol(), ", ", Period(), ")--Possible BUY ");
}
}
}
return(0);
}
//+------------------------------------------------------------------+
string GetBuySound()
{
// Get the Buy.wav file for the pair
if (Symbol()=="EURUSD") return("EurUsdBuy.wav");
if (Symbol()=="GBPUSD") return("GbpUsdBuy.wav");
if (Symbol()=="AUDUSD") return("AudUsdBuy.wav");
if (Symbol()=="USDJPY") return("UsdJpyBuy.wav");
if (Symbol()=="NZDUSD") return("NzdUsdBuy.wav");
if (Symbol()=="EURJPY") return("EurJpyBuy.wav");
if (Symbol()=="USDCAD") return("UsdCadBuy.wav");
return (Symbol());
}
//+------------------------------------------------------------------+
string GetSellSound()
{
// Get the Sell.wav file for the pair
if (Symbol()=="EURUSD") return("EurUsdSell.wav");
if (Symbol()=="GBPUSD") return("GbpUsdSell.wav");
if (Symbol()=="AudUsd") return("AudUsdSell.wav");
if (Symbol()=="USDJPY") return("UsdJpySell.wav");
if (Symbol()=="NZDUSD") return("NzdUsdSell.wav");
if (Symbol()=="EURJPY") return("EurJpySell.wav");
if (Symbol()=="USDCAD") return("UsdCadSell.wav");
return (Symbol());
}