Type of the start/stop of strategy

Back to topics list To post a new topic, please log in or register
avatar
1
Grupislav 2015.04.01 22:07
 

Hi all,

1. Is MQL4 able to recognize whether the EA was launched/stopped by user or by terminal?

I've got a part of EA code to be executed only when the EA is launched/stopped by user himself and not when it is launched/stopped during starting/closing of Metatrader. Functions OnInit and OnDeInit are great but they are executed regardless of who/what launched/stopped the EA.

2.  Is it possible for code to send email to another address then specified in MT4 settings? Or this inevitably leads to dll?


Any suggestions or workarounds how to make this work? I've run out of ideas.

Thank you! 

avatar
12985
WHRoeder 2015.04.02 14:55 #
 
Grupislav: . Is MQL4 able to recognize whether the EA was launched/stopped by user or by terminal?
Perhaps WindowPriceOnDropped - MQL4 Documentation



avatar
108
eddie 2015.04.02 23:26 #
 

Hi!

The OnDeinit gets a parameter called reason.

Analyze this uninitialization reason code.


Back to topics list  

To add comments, please log in or register