Download MetaTrader 5

Type of the start/stop of strategy

To add comments, please log in or register
Tomas Krupicka
8
Tomas Krupicka  

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
15590
whroeder1  
Grupislav: . Is MQL4 able to recognize whether the EA was launched/stopped by user or by terminal?
Perhaps WindowPriceOnDropped - MQL4 Documentation
peter.MT4Web
157
peter.MT4Web  

Hi!

The OnDeinit gets a parameter called reason.

Analyze this uninitialization reason code.

To add comments, please log in or register