Listed below is a routine that emails me when a certain condition happens on a indicator. For some reason I am getting two emails at a time on each trigger. I set the MailSent Flag prior to sending out the first email so I am a bit confused as to how it could get sent twice. Any help or ideas would be appreciated.
Thanks
if (!MailSent)
{
CurrentAsk = GetCurrentAsk();
output = CurrentAsk.ToString();
if (ToTime(Time[0]) >= 54500 && ToTime(Time[0]) <= 230000) // 545AM To 11PM
{
MailSent = true;
SendMail("[email protected]","[email protected]","Long Trade Alert",output);
}
}
Comment