Loading…

Leverage Tier Table Builder

The leverage a broker advertises is usually the headline figure for a small trade. Many brokers quietly reduce the effective leverage - meaning they demand more margin per unit of notional - once a position on a given symbol grows past certain size thresholds. That schedule is rarely published anywhere in one readable table, and finding it by trial and error with real orders is an expensive way to learn it. This script uses AccountFreeMarginCheck(), which answers "what would my free margin be after this hypothetical order" without ever sending anything. It probes a symbol at a geometrically increasing sequence of volumes, computes the notional value and the margin actually consumed at each step, and derives the effective leverage (notional divided by margin used) at every probe point. A flat effective leverage across all probes means no tiering was hit in the tested range; a step down in effective leverage between two consecutive probes is the signature of a tier boundary, and the table marks it plainly. Notes and limitations - No orders are ever sent. Every row comes from AccountFreeMarginCheck(), a pure query function. - The measurement is taken against the account's CURRENT free margin and any exposure already open on the account. Run this with no other open positions for the cleanest reading of one symbol's own tier schedule. - A broker with genuinely flat leverage across all realistic volumes will correctly show no tier boundary - that is a valid result, not a failure of the probe. - AccountFreeMarginCheck() reflects this account's current margin mode and any account-specific leverage override; the schedule found here is not guaranteed to be identical for every account type at the same broker.

Script · MT5 · v1.0 · Free

About Leverage Tier Table Builder

Leverage Tier Table Builder is a script for MetaTrader 5. It has 5 settings, such as Symbol, Start volume and Max volume. MQL source code included.

Files in the download: LeverageTierTableBuilder.ex5, LeverageTierTableBuilder.mq5, LeverageTierTableBuilder.txt.

Settings

SettingDefaultWhat it does
SymbolSymbol to probe, empty = current chart symbol
Start volume0.10First probe volume, in lots
Max volume50.0Largest probe volume to attempt, in lots
Volume multiple1.5Each probe volume multiplied by this to get the next
Tier step percent3.0Effective-leverage change, percent, that counts as a new tier

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the script onto a chart to run it once.

Download the PDF guide

Tags: Volume · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria