I have created a condition for an alert to go short and one to go long - both conditions play the same .wav file and send emails to the same address (subject is different as one is short the other long), but that is the only difference.
The short condition is coded first and works fine - the long condition is second and does not work. Can anybody tell me why? Code below:
if (Falling(TrendSMA) && Tma[0] < TrendSMA[0])
{
DrawArrowDown();
DrawText();
PlaySound(@"Siren-AirRaid.wav");
SendMail(@"********@gmail.com", "********@gmail.com", "Zone Trader Alert SHORT", "");
}
if (Rising(TrendSMA) && Tma[0] > TrendSMA[0])
{
DrawArrowUp();
DrawText();
PlaySound(@"Siren-AirRaid.wav");
SendMail(@"*********@gmail.com", "********@gmail.com", "Zone Trader Alert LONG", "");
}
*Obviously DrawArrow & Text are okay/work fine - I just haven't repeated all the code here.
Thanks in advance.
Ben.
Comment