Download MetaTrader 5
To add comments, please log in or register
Do you have questions on how to turn your idea into reality? Ask them on the Forum!
Tomas Krupicka
8
Tomas Krupicka 2015.04.01 20: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! 

whroeder1
13641
whroeder1 2015.04.02 12:55  
Grupislav: . Is MQL4 able to recognize whether the EA was launched/stopped by user or by terminal?
Perhaps WindowPriceOnDropped - MQL4 Documentation
peter.MT4Web
158
peter.MT4Web 2015.04.02 21:26  

Hi!

The OnDeinit gets a parameter called reason.

Analyze this uninitialization reason code.

/
To add comments, please log in or register