Change Timeframe and Close MetaTrader

 

Hi guys.

when we change timeframe or close metatrader paltform, OnDeinit() function is called. I need to code whether timeframe is changed or Meta Trader is closed. Is there any way to check and distinguish  this difference ?

 
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Uninitialization Reason Codes
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Uninitialization Reason Codes
  • www.mql5.com
//| get text description                                             | //| Expert deinitialization function                                 |
 
Keith Watford:

https://www.mql5.com/en/docs/constants/namedconstants/uninit

This is for MQL4 and MQL5

Thanks a lot

Reason: