I have a strategy that I am looking to get email alerts for trades. I have setup both a Gmail and Outlook account for testing. When sending test emails, I have found that it seems very inconsistent and works most of the time but not all the time.
Here is my code
protected override void OnBarUpdate()
{
if (Position.MarketPosition == MarketPosition.Long && XXXXX)
{
ExitLong();
if(EmailTextAlert)
{
SendMail("myemailaddress", "Trade Alert", "EXIT LONG " + TradeInstrument + " " + Time[0].Date);
}
…
I have both a Gmail and outlook account connection setup in the share services. As stated, I can get test emails most of the time, but not consistently and I have not been able to get any when testing the strategy realtime for MES using CME group datafeed through NT Brokerage. I’m looking for some help or any suggestions to get this to work.
Thanks,
Ray