Loading…

Discipline Score Card

A win rate or an average R measures outcome, not process. A trader can be profitable over a stretch of trades while still sizing erratically, skipping stops on setups that "feel safe", or closing trades with no comment at all - none of that shows up in a P/L number, and all of it tends to catch up eventually. This script checks four things independently across the closed-trade history: how consistently lot size stayed near the account's median lot (a trader who mostly risks one size and occasionally doubles or triples it without a documented reason is sizing inconsistently even if the average lot looks reasonable); what percentage of trades carried a stop loss at close; how many trades breached a configured per-trade risk cap or, if required, had no stop at all; and what percentage closed with a non-empty comment, which this catalogue's tools use as the trade's tag. Each axis scores 0-100 independently, and the composite is a plain equal-weighted average of the four - stated as a deliberate, documented choice rather than a claim that every trader should weight the four axes the same way. The full CSV includes every axis's score and every trade that failed a check, not just the composite. Notes and limitations MT4 keeps no historical equity snapshot, so risk-per-trade is computed against the account's CURRENT balance, not the balance that actually existed at the moment each trade was opened - a deliberate, documented approximation, not an attempt to replay history exactly. Stop-loss usage reads OrderStopLoss() as it stood at close, which reflects the last modification before the trade closed, not necessarily the stop that was in place at entry if it was moved. Tag completeness only checks whether a comment exists, not whether it names a real, consistent setup.

Script · MT5 · v1.0 · Free

About Discipline Score Card

Discipline Score Card is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 8 settings, such as From date, To date and Current symbol only. MQL source code included.

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

Settings

SettingDefaultWhat it does
From date0From close time (1970.01.01 = no lower bound)
To date0To close time (1970.01.01 = up to now)
Current symbol onlyfalseOnly this chart's symbol
Magic filter-1Magic number filter (-1 = all)
Max lot variance pct50.0Lot size allowed to differ from the median by this %, still "consistent"
Require stop losstrueEvery trade should have carried a stop loss
Max risk percent per trade2.0Risk above this % of current balance flags a breach
Output folderDisciplineScoreCardSubfolder under MQL5\Files

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: Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria