Adding Symbol ID to email Header or Body??

Created at 16 Jul 2018, 12:53
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
Symposium's avatar

Symposium

Joined 16.07.2018

Adding Symbol ID to email Header or Body??
16 Jul 2018, 12:53


ChartObjects.DrawText(String.Format("ArrowUp{0}", index), "▲ Buy", index, UpSeries.LastValue - Symbol.PipSize * ArrowSpacing, VerticalAlignment.Center, HorizontalAlignment.Center, Colors.Lime);

                    if (SoundAlert)

                        Notifications.PlaySound(SoundFilePathB);

                    if (SendEmail)

                        Notifications.SendEmail(EmailAddressF, EmailAddressT, "XeroLag Indicator is now displaying a BUYING opportunity", emailBodyB);

I am trying to add the Symbol ID to the email message that is sent when this alert is triggered. I have numerous charts open at one time and while the email alert (and sound alert) indicate a change in trend, I need the email to confirm which pair (chart) it originated from.....and be Parameter adjustable...

[Parameter("Symbol", DefaultValue = "EURUSD")]
 public string SymbolCode { get; set; }

Eg: Email Header    " EURUSD XeroLag Indicator is now displaying a BUYING opportunity"

Thanks in Advance...


@Symposium
Replies

PanagiotisCharalampous
16 Jul 2018, 15:20

Hi Symposium,

Thanks for posting in our forum. You can try the code below

Notifications.SendEmail(EmailAddressF, EmailAddressT, SymbolCode + " XeroLag Indicator is now displaying a BUYING opportunity", emailBodyB);

Best Regards,

Panagiotis


@PanagiotisCharalampous

Symposium
16 Jul 2018, 16:40

RE: Thanks for such a prompt reply :-)

Worked perfectly, Thanks Panagiotis, much appreciated.


@Symposium

Symposium
20 Aug 2018, 17:17

Adding Chart Timeframe to email Header or Body??

if (SendEmail)

Notifications.SendEmail(EmailAddressF, EmailAddressT, TimeFrame, SymbolCode + " | XeroLag Indicator is now displaying a BUYING opportunity", emailBodyB);

Hi Panagiotis, I am now trying to add the Chart Timeframe to the email message that is sent when this alert is triggered. I have numerous charts open at one time and while the email alert (and sound alert) indicate a change in trend, I need the email to confirm which pair (chart) it originated from.....and be Parameter adjustable...

[Parameter("Symbol", DefaultValue = "EURUSD")]
 public string SymbolCode { get; set; }

Eg: Email Header    " (60min) EURUSD    |    XeroLag Indicator is now displaying a BUYING opportunity"

Thanks once again in Advance...


@Symposium

PanagiotisCharalampous
21 Aug 2018, 08:51

Hi Symposium

You can use this

Notifications.SendEmail(EmailAddressF, EmailAddressT, TimeFrame.ToString() + " " + SymbolCode + " | XeroLag Indicator is now displaying a BUYING opportunity", emailBodyB);

Best Regards,

Panagiotis


@PanagiotisCharalampous

Symposium
21 Aug 2018, 10:56

RE:

Panagiotis Charalampous said:

Hi Symposium

You can use this

Notifications.SendEmail(EmailAddressF, EmailAddressT, TimeFrame.ToString() + " " + SymbolCode + " | XeroLag Indicator is now displaying a BUYING opportunity", emailBodyB);

Best Regards,

Panagiotis

Cheers Panagiotas, once again, thanks for your prompt reply and solution to my question. :-)

Hopefully the Email Notification coding in this thread can be of help to others trying to get some time away from the screens.


@Symposium