Loading…

Deposit Timing Performance Split

A raw equity curve treats every rise the same way, whether it came from winning trades or from a fresh deposit hitting the account. A trader who tops up their balance mid-month and then looks at "results improved" is often looking at the deposit, not their edge. This script reads the account's own history and finds every balance operation (deposit, withdrawal, and optionally credit adjustment) - MT4 stores these as history rows with an order type of 6 or 7, carrying no symbol and no real open/close pair, distinct from every ordinary closed trade. Each one becomes a boundary. The closed trades in between two boundaries are grouped into a period, and each period gets its own trade count, win rate, total lots, net profit and profit factor. The result is a table showing performance period by period, so a deposit-driven balance increase is visible as what it is - new capital - rather than folded silently into a single misleading headline number. Notes and limitations Periods are defined purely by the timing of cash operations, not by any strategy or symbol change - a period can span multiple symbols and magic numbers. History must be loaded far enough back to include every deposit that matters; MT4 loads a limited window by default. A period with very few trades produces a statistically thin profit factor - read the trade count alongside it, not the ratio alone.

Script · MT5 · v1.0 · Free

About Deposit Timing Performance Split

Deposit Timing Performance Split is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Treat credit as boundary, Min boundary amount and Export csv. MQL source code included.

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

Settings

SettingDefaultWhat it does
Treat credit as boundaryfalseTreat credit operations (DEAL_TYPE_CREDIT) as period boundaries too
Min boundary amount0.01Ignore cash operations smaller than this (currency units)
Export csvfalseAlso write the period table to a CSV file
DelimiterDelimiterCommaCSV column separator

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