Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

SymbolInfo Sample Script Enhancement of Margin and Leverage Data - MetaTrader 5 Script

author EAcpu | 4 reads | 0 comments |

SymbolInfo example script Enhancement with margin and leverage data - script for MetaTrader 5

SymbolInfo example script Enhancement with margin and leverage data - script for MetaTrader 5

The original SymbolInfo sample script consists of a source file and two header files. In this version, each file has been changed to contain two functions, calls to those functions, and a new design for the output screen. Added 9 output fields, 7 standard symbol properties, required margin (as named in MT4) and standard leverage (leverage usually changes according to the broker's trading volume).

Basically, the required margin depends on the symbol property "Margin Calculation Mode", while the leverage depends on the required margin. Calculation details are taken from the standard MQL5 Help.

SymbolInfo example script Enhancement with margin and leverage data - script for MetaTrader 5


Attachment download

📎symbolinfo.mqh (36.92 KB)

📎 symbolinfosampleinit.mqh (1.98 KB)

📎 symbolinfosample.mq5 (9.16 KB)

Source: MQL5 #36636

Verification code Refresh