TradeLens Trade and Market Statistics
- Utilitaires
- Version: 1.0
- Activations: 20
Overview
TradeLens is an analysis utility. It does not trade and sends no orders. It reads the account history, calculates statistics for the traded market, and places the two side by side.
Most analysis tools show either your own trades or the market. TradeLens connects them. It answers not only how the past months went, but whether those results match what the traded market statistically offered during the same period.
What the program measures
Account metrics
From the closed positions within the selected period:
- Win rate, profit factor, expectancy per trade, payoff ratio
- Sharpe and Sortino on a per-trade basis
- Maximum drawdown in absolute terms and percent, recovery factor
- Longest winning and losing streak
- Breakdown by symbol, weekday, entry hour and magic number
- Equity curve with the drawdown path shown underneath
Position reconstruction
Each position is rebuilt from the individual deals. Partial entries and partial exits are averaged by volume, and a position counts as closed only once the volume is balanced. On netting accounts a reversal is handled correctly as closing the old position and opening an opposing one. The account type is detected automatically. The overview reports how many positions were scaled.
MAE and MFE per position
For every closed position, the M1 data covering the holding period is used to determine how far it moved against the entry (MAE) and how far in favour of it (MFE). Two analyses follow from this:
Stop calibration. The program determines how much adverse movement the profitable positions actually needed and compares that with the stop that was set. If the average stop sits below the 80th percentile of the winners' MAE, this is reported together with a concrete suggestion in points.
Target calibration. The capture ratio shows what share of the movement actually available was realised. A low value points to exits taken too early.
R-multiples
The stop loss of the opening order is read from the order history. This yields each position's result expressed in multiples of the risk taken, retroactively for every trade that had a stop in place.
Cost block
Commission and swap are totalled and expressed as a share of the gross result, alongside the average holding time.
Behaviour after losses
The program compares average position size and trade frequency in the hour following a loss with the values outside those windows. This metric surfaces a pattern that standard account reports do not show.
Market statistics
For the selected focus symbol:
- Seasonality by hour, weekday and month, with median, quartiles and sample size
- Average daily and weekly range, and how much of it is typically used
- Hit rate of the previous day's high and low
- Gap statistics including the closing rate
- Session ranges for Asia, London, New York and the overlap
- Volatility regime based on ATR terciles
- Skewness, kurtosis and the Jarque-Bera test
- Hurst exponent and lag-1 autocorrelation
Significance testing
Every seasonality pattern is put through a bootstrap test. The p-value and sample size are reported. A pattern is only flagged as notable once it falls below the chosen significance level. Statements such as "Tuesday is strong" therefore always come with the question of whether the difference can be separated from chance.
Correlation and cointegration
A rolling correlation matrix across a freely chosen symbol set. For a selected pair, additionally: hedge ratio via OLS, an Engle-Granger test on the residuals, the half-life of reversion, and the current z-score of the spread.
Calendar reactions
Using the economic calendar interface built into the terminal, the program measures how the focus symbol moved on average after significant releases, separated by whether the actual value came in above or below the forecast. No external data sources are contacted.
Monte Carlo
The order of trades is reshuffled repeatedly. The distribution of the maximum drawdown, the 95th percentile, and the share of runs reaching a selectable loss threshold are reported.
Prop firm check
The configured rules for daily loss, maximum drawdown and consistency are checked against the actual history. The worst day, the number of rule breaches, and the best day's share of total profit are reported. Drawdown is tracked in three variants: static from the starting balance, trailing with the equity high, and trailing with a lock at the starting balance. The smallest gap the equity ever had to the trailing floor is reported as well.
Intraday check via the equity log
The deal history contains closing figures only. A breach that occurred intraday and resolved before the close cannot be reconstructed from it — and those are exactly the cases that end a funded account during an evaluation.
The program therefore records equity from installation onward at a configurable interval, plus on larger moves. From that recording come the actual intraday path, the true intraday drawdown, the moment the trailing floor was touched, and, as a metric of its own, the number of days that breached the limit intraday while looking unremarkable at the close.
Bridge module
This is where account data and market statistics are combined:
- The hours you traded against the symbol's volatility profile
- Your average stop against MAE and the daily range
- Results separated by volatility regime
- The share of trades inside news windows and how their expectancy compares
- Simultaneously open positions in correlated symbols
- Your own win rate against the base rate of the same context
Findings appear as a list with context and, where it can be calculated, an estimate of the effect in account currency.
Pair analysis
For a selectable symbol pair: hedge ratio via OLS, an Engle-Granger test on the residuals with the t-statistic and critical value shown, the half-life of reversion, and the current z-score of the spread with the 2-sigma band marked.
Slippage and latency
Executions are logged from installation onward: requested price, executed price, the difference in points, and latency. Reported are the mean, median, worst value, share of adverse executions, and a breakdown per symbol.
Interface
English and German, switchable or taken automatically from the terminal language. Seven tabs, changed by click or with keys 1 to 7. When a tab's content exceeds the panel height a scrollbar appears on the right; scrolling works with the mouse wheel, arrow keys, page up and down, and Home and End.
Computed values are cached so that a rebuild does not have to read the entire minute history again.
Demo mode
No real account history exists in the strategy tester. So that the free trial version does not appear empty, the program generates a sample history of roughly 320 positions there. This data is reproducible and deliberately contains three common patterns so the analyses visibly do their work: stops set too tightly, increased position size after losses, and one weaker trading hour.
Demo mode is clearly marked as such in the panel and in every report. It can also be switched on during live operation via an input parameter, in order to view the presentation without an own history.
Export
An HTML report and a CSV export of individual trades are written to the MQL5/Files folder, either at startup or via the R key.
Operation
Six tabs: Overview, Trades, MAE/MFE, Market, Bridge, Risk. Switch by clicking or with keys 1 to 6.
Technical notes
- Pure MQL5. No DLL, no access to external servers, no data transmission.
- The program sends no trade orders.
- Runs as a utility on any chart. The focus symbol for market statistics is freely selectable and need not be the chart symbol.
- Session times refer to the broker's server time and may differ.
Settings
| Parameter | Meaning |
|---|---|
| Language | |
| Interface language | Auto follows the terminal language; otherwise English or German |
| Period | |
| Analysis period in days | How far back the account history is analysed |
| Primary symbol | Symbol used for market statistics; empty means the chart symbol |
| Market stats for every traded symbol | Builds separate market statistics for each symbol you trade |
| Magic filter | Restricts the analysis to one magic number; −1 includes all |
| Symbol filter | Restricts the analysis to one symbol; empty includes all |
| Market statistics | |
| History for seasonality | Depth in days. More days give more reliable p-values |
| Bootstrap iterations | Runs per significance test. Higher is steadier but slower |
| Significance level | Threshold at which a pattern counts as significant (commonly 0.05) |
| Correlation set | Comma-separated symbol list for the correlation matrix |
| Correlation window | Number of bars for correlation and cointegration |
| Correlation timeframe | Timeframe used for that calculation |
| Pair analysis | |
| Pair leg A / Pair leg B | The two symbols for spread, hedge ratio and the ADF test |
| Pair window | Number of bars for the pair analysis |
| Calendar | |
| Use calendar statistics | Enables the analysis of calendar reactions |
| Event window in minutes | Window around a release in which price reaction and trades are measured |
| Prop firm rules | |
| Max daily loss % | Daily loss limit checked against the history |
| Max drawdown % | Drawdown limit for both the static and trailing checks |
| Max share of best day % | Consistency rule: highest permitted share for the best day |
| Risk model | |
| Monte Carlo on percentage returns | Works with shares of equity rather than fixed amounts. Suits percentage-based risk |
| MAE/MFE | |
| Compute MAE/MFE | Turns the calculation off entirely, useful with very large histories |
| Prefer tick data over M1 candles | Uses ticks for exact bid/ask evaluation, otherwise M1 with an approximated spread |
| Max ticks per position | Budget per position. Beyond it the M1 variant takes over |
| Max holding time for MAE/MFE | Positions held longer than this are skipped |
| Cache MAE/MFE between rebuilds | Stores computed values so a rebuild runs faster |
| Equity log | |
| Record equity for intraday checks | Records equity. Basis of the intraday check |
| Sampling interval in seconds | Spacing of samples. Shorter is more precise but produces larger files |
| Layout | |
| Panel X / Panel Y | Position of the panel on the chart |
| Panel width / Panel height | Size of the panel. It is not scaled below 900 × 620 |
| Export | |
| Write HTML report on start | Writes the report to MQL5/Files at startup |
| Write CSV export on start | Writes individual trades to MQL5/Files at startup |
| File prefix | Name prefix for all generated files |
| Demo mode | |
| Force sample data | Shows the sample history during live operation too |
| Number of sample trades | Size of the generated sample history |
Panel shortcuts: keys 1 to 7 switch tabs, R writes a report, F rebuilds all data.
Limitations you should know before buying
Slippage is only recorded from installation onward. The order history stores the executed price, not the requested one. Slippage therefore cannot be measured retroactively. The program logs it from the moment it runs.
The equity log begins at installation. For periods before that, the prop firm check still relies on trade close prices, and intraday breaches there go undetected. The panel shows which period is covered.
The recording samples equity, it does not trace it continuously. At a five-minute interval a very brief spike can fall between two samples. A shorter interval closes the gap but produces larger files.
MAE and MFE use ticks where available. When tick history exists, bid and ask are evaluated separately: longs against the bid, shorts against the ask. No spread approximation is needed. If ticks are missing or a position exceeds the configured budget, the M1 variant with an approximated spread takes over. Which source was used per position appears in the panel and in the CSV export. Where sources are mixed, the program points out that precision is not uniform.
R-multiples require a stop. Positions without a stop in the opening order are excluded from that analysis.
No cross-account analysis. Each installation analyses the account it runs on. Combining several accounts is possible only via the CSV export outside the terminal.
Statistics are not forecasts. All metrics describe the period analysed. They permit no conclusion about future results.
Before buying
The free version in the strategy tester shows every tab using the sample history. This lets you check whether the presentation and the metrics suit your way of working before a purchase decision arises.
