Leverage Double Edge Table
Leverage marketing typically shows one side of a symmetric identity: a favourable price move of m% becomes a return of (m% * L) on the margin actually committed, where L is the leverage ratio - a striking number when m% is small and L is large. The exact same identity applies with the sign flipped, and that half is usually left out: an adverse move of the same size produces an equally large loss on margin, and once that loss reaches -100% the margin is not just damaged, it is gone. This script never shows one side without the other. It builds a fixed grid of price-move percentages (from -20% to +20%) against a fixed set of leverage levels (1:10 through 1:500) and prints every cell, flagging any cell where the loss side reaches -100% or worse as RUIN rather than printing a number that implies the position still exists. It then repeats the same calculation once more using the account's own real leverage (read from AccountLeverage(), not assumed) against a chosen example equity, so the abstract grid connects to a number a trader can actually check against their own statement rather than staying purely theoretical. Notes and limitations - This is a pure arithmetic table (move% * leverage), not a margin calculator against a specific symbol, spread, or swap - it deliberately isolates the leverage effect from everything else that also affects a real position's outcome. - The grid does not account for margin calls or stop-outs that a broker would trigger BEFORE the loss actually reaches -100% - most accounts are closed out earlier than pure ruin, which this table does not model since stop-out percentages vary by broker. - Leverage levels and move percentages are fixed arrays chosen to cover a representative range, not user-configurable in this version, to keep the table's shape consistent and easy to read at a glance.
Script · MT5 · v1.0 · Free
About Leverage Double Edge Table
Leverage Double Edge Table is a script for MetaTrader 5. It has 1 setting, such as Example equity. MQL source code included.
Files in the download: LeverageDoubleEdgeTable.ex5, LeverageDoubleEdgeTable.mq5, LeverageDoubleEdgeTable.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Example equity | 1000.0 | Example account equity for the money-terms worked example |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: MT5 Script · MQL5 Source Code