Customising Indicator Email alerts

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Customising Indicator Email alerts

Postby 7510109079 » Tue Jul 02, 2019 4:47 am

Question to anyone out there:

How do we add the Instrument and timeframe to the email header of the alert that gets sent out

e.g. change this first one to the second one:
2019-07-02 08 47 08.jpg


Can anybody summarise the standard edits to a typical lua file that Apprentice has coded?

thx
7510109079
FXCodeBase: Graduate
 
Posts: 410
Joined: Wed May 18, 2011 7:23 am

Re: Customising Indicator Email alerts

Postby Apprentice » Wed Jul 10, 2019 3:30 pm

You will have something like this.
local Subject="Two Average Cross Alert" .. "(" .. source:instrument() ..", ".. source:barSize() ..")" ;
local Email_Text="Some Text";
terminal:alertEmail(Email, Subject, Email_Text);
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Customising Indicator Email alerts

Postby 7510109079 » Thu Jul 11, 2019 9:16 am

thx Apprentice. Will try as you suggest
7510109079
FXCodeBase: Graduate
 
Posts: 410
Joined: Wed May 18, 2011 7:23 am

Re: Customising Indicator Email alerts

Postby 7510109079 » Fri Aug 16, 2019 4:01 am

OK i tried but could not get the currency pair (source:instrument??) to appear in the subject header alongside the filename (profile:id??)

Can you please help, thanks
Attachments
2 MA Cross Alert 2pip.lua
(16.93 KiB) Downloaded 605 times
7510109079
FXCodeBase: Graduate
 
Posts: 410
Joined: Wed May 18, 2011 7:23 am

Re: Customising Indicator Email alerts

Postby Apprentice » Mon Sep 02, 2019 5:12 am

2 MA Cross Alert 2pip.lua
(17.33 KiB) Downloaded 618 times

Try this version.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Customising Indicator Email alerts

Postby 7510109079 » Mon Sep 02, 2019 7:07 am

excellent many thx Apprentice :D
7510109079
FXCodeBase: Graduate
 
Posts: 410
Joined: Wed May 18, 2011 7:23 am


Return to Discussions

Who is online

Users browsing this forum: No registered users and 4 guests