Loading…

Risk Ladder Printout

"What does 0.30 lots with a 25 pip stop actually cost me" is a question most traders answer with mental arithmetic mid-setup, under time pressure, using a rough pips-to-money conversion they memorised for one particular symbol. That conversion is wrong the moment the symbol changes - gold, indices and JPY crosses all have a different money-per-pip-per-lot from a standard FX pair. This script builds a full matrix instead: rows are lot sizes across a configurable range, columns are stop distances in pips, and every cell shows both the money at risk and that money as a percent of account balance (or equity, if preferred). Every figure comes from the broker's live tick value and tick size for the chart's actual symbol, so the table is correct for whatever is on the chart, not a hardcoded pip value. The matrix prints to the Experts tab for a quick on-screen check, and - because a plain Print() cannot be sent to a printer - is also written as a CSV file into MQL4\Files\ (or MQL5\Files\ on the native MQL5 build) when InpExportCsv is left at its default of true, in a simple long-form layout (one row per lot/stop combination) that opens cleanly in any spreadsheet program for a proper desk printout. Notes and limitations - Reports risk for the chart's own symbol only - it does not build a multi-symbol ladder in one run. Attach it to a different chart for a different symbol's table. - The percent-of-balance (or equity) column is a snapshot at the moment the script runs; it does not update live and will drift as the account balance changes. - The CSV file, if enabled, is written into the sandboxed MQL4\Files\ (or MQL5\Files\ on the native MQL5 build) folder, not directly to a printer or an arbitrary location on disk - it must be opened from there manually. - A very wide lot or stop range combined with a small step produces a large matrix; the Experts tab and CSV both handle this without truncation, but a genuinely enormous table becomes hard to read either way. Keep the ranges to what is actually useful for the account.

Script · MT5 · v1.0 · Free

About Risk Ladder Printout

Risk Ladder Printout is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 9 settings, such as Min lot, Max lot and Lot step. MQL source code included.

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

Settings

SettingDefaultWhat it does
Min lot0.10Smallest lot size row
Max lot1.00Largest lot size row
Lot step0.10Lot size step between rows
Min stop pips10.0Smallest stop distance column, pips
Max stop pips50.0Largest stop distance column, pips
Stop step pips10.0Stop distance step between columns, pips
Use balancetruePercent column uses account balance (false = equity)
Export csvtrueAlso write the matrix to MQL5\Files\ as CSV
Csv file nameRiskLadderPrintout.csvOutput file name (inside the sandbox)

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: Gold (XAUUSD) · Risk & Lot Size · Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria