Download MetaTrader 5

How to recognize a change of account properties

To add comments, please log in or register
juxeii
88
juxeii  

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
Trew
10
Trew  
You could use the CAccountInfo class.

It has methods for getting leverage, profit, balance, free margin etc.
To add comments, please log in or register