How to receive an email alert when trade condition is met and a trade is triggered in sim mode

Questions about MultiCharts and user contributed studies.
AlgoDoc
Posts: 2
Joined: 07 Dec 2020
Has thanked: 4 times

How to receive an email alert when trade condition is met and a trade is triggered in sim mode

Postby AlgoDoc » 12 Sep 2021

Is there a way to receive an email alert when trade condition is met and a trade is triggered in sim mode?

I realize that you can do this in signal settings when you are in live trading mode (SA mode) but I would like to get this email when the strategy is running in the background without being traded live. I can do that in TS.

Can someone please help?

Thank you

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: How to receive an email alert when trade condition is met and a trade is triggered in sim mode

Postby Tammy MultiCharts » 14 Sep 2021

Hello AlgoDoc,

Alerts can work in both auto trading and forward-testing.
In order to have the alerts work you need to specify the alert conditions in your signal script using Alert reserved word.
Once that is done, please follow the instructions here to set up the email alerts for your signal.

AlgoDoc
Posts: 2
Joined: 07 Dec 2020
Has thanked: 4 times

Re: How to receive an email alert when trade condition is met and a trade is triggered in sim mode

Postby AlgoDoc » 14 Sep 2021

Thanks, is there a power language manual I can refer to for examples of how these Alert emails are coded ? Where is the manual located if so?

Thank you
Last edited by AlgoDoc on 14 Sep 2021, edited 1 time in total.

User avatar
Vlada MultiCharts
Posts: 293
Joined: 22 Apr 2020
Has thanked: 8 times
Been thanked: 76 times

Re: How to receive an email alert when trade condition is met and a trade is triggered in sim mode

Postby Vlada MultiCharts » 14 Sep 2021

Hello,

Alerts are generated when the Alert reserved word is triggered in your code.

Here is an example of the code that we have developed to trigger an alert only once with tick by tick alert condition check is selected.

Code: Select all

[IntrabarOrderGeneration=true] vars: intrabarpersist posopen(0), intrabarpersist vrs(1), intrabarpersist mp(0); if mp <> marketposition then posopen = 0; if (marketposition <> 0) and (posopen = 0) then begin alert("Postion Opened"); posopen = 1; end; mp = marketposition;


Return to “MultiCharts”