How to recognize a change of account properties

 

Hello,

in MQL5 we have OnTick() to see that there was quote update.

But how ayout account information properties?

For example, if the balance, leverage or something else accounr related changes, how can one simply test this?

It would be a pain to test all properties explicitly.

Do you know of simple method?


Thanks in advance,

Juergen

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Documentation on MQL5
 
You could use the CAccountInfo class.

It has methods for getting leverage, profit, balance, free margin etc.