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


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.
Attachment download
📎symbolinfo.mqh (36.92 KB)
📎 symbolinfosampleinit.mqh (1.98 KB)
📎 symbolinfosample.mq5 (9.16 KB)
Source: MQL5 #36636
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •