거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
스크립트

Magic Number Inventory, Trade Logging and Classifying by Magic Number - MetaTrader 5용 스크립트

Seckin Erkut
Seckin Erkut
Algo Trading Systems Developer. I develop strategies and portfolios not by hypes but from solid academic literature.

I put my money where my mouth is, be sure to check the performance of my EAs through my signals.
조회수:
113
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

If you run more than one Expert Advisor on the same account - or you trade manually alongside an EA - the account statement stops answering the question you actually have. The equity curve is a sum. It tells you the account made money; it does not  tell you which of your systems paid for the others, which one quietly stopped trading three months ago, or which one is carrying the whole result on its own. 


The magic number already contains that information. Every deal an EA places carries its magic, so the history is fully separable. This script does the separation and prints the table.

Load it on any chart of the account you want audited. It reads history only: it never opens, modifies or closes anything, and it does not need algorithmic trading to be enabled. The chart symbol is irrelevant - the whole account is scanned regardless of which chart the script sits on. Being a script, it runs once and removes itself.


WHAT IT PRINTS


One line per magic number, sorted by net result, best first, with these columns:

- trades      closed round turns (see the note on partial closes below)
- net P/L     realised result including swap and commission
- win%, PF    win rate and profit factor computed per round turn
- avgWin/Loss average winning and losing round turn
- open(vol)   positions open right now for this magic, and their volume
- pend        pending orders currently placed by this magic
- first..last first and last activity date
- symbols     instruments traded (truncated with "+" beyond three)

A totals row closes the table. Magic 0 collects manual trades and any EA that does not set a magic number - on most terminals that bucket is a mixture, not one system, so read it accordingly.

With InpExportCSV enabled (default) the same table is written to MQL5\Files\MagicInventory.csv for spreadsheet work.



TWO IMPLEMENTATION DETAILS THAT CHANGE THE NUMBERS


Both are easy to get wrong, and both are wrong in the direction that flatters you.

1. A partial close is ONE trade. A position closed in two parts produces    one entry deal and two exit deals. Counting exit deals would report two trades for one round turn - inflating the trade count, and worse, splitting a single result into a separate "win" and "loss" when the parts closed on opposite sides of breakeven. This script aggregates deals by DEAL_POSITION_ID first, so win rate and profit factor stay honest on scale-out systems.

2. Entry commission counts. On most commission-charging brokers half of the round-turn commission is charged on the entry deal, where DEAL_PROFIT is zero. A tool that reads closing deals only never sees it and overstates net P/L by roughly half the commission bill. Here every deal of a position contributes to that position's net.

Positions still open - and positions partially closed with a remainder still running - are not counted as trades, because their cost is not final yet. They appear in the open(vol) column instead.


HOW TO READ THE TABLE


- A magic with many closed trades but zero open positions and zero pendings has gone quiet. Either a filter is keeping it out of the market, or it stopped working. Check the last activity date.

- A magic whose entire net comes from a handful of large wins (high avgWin against a low win rate) is not necessarily broken, but its result depends on rare events - size it accordingly.

- Profit factor below 1.0 with a long history is a system paying rent. Profit factor above 2.0 on twenty trades is noise; wait for the sample to grow before believing either number.

- If two magics always show open positions at the same time on related symbols, you may be running one exposure under two names. The correlation between them is measurable - see the companion script Portfolio Correlation Analyzer, which computes exactly that on monthly P/L.


NOTES


- Only what the terminal holds is analysed. If the History tab is set to a short period, load "All history" (right-click in History -> All history) and run the script again.
- Deposits, withdrawals, credits and corrections are not trades and are excluded.
- Very old history without a position id is skipped rather than mis-counted.
- All output is read-only. The bundled guide covers installation and interpretation in more detail.

Structure Range Structure Range

Sell Arrow SL Box: Extends UPWARDS from the Sell Arrow. Buy Arrow SL Box: Extends DOWNWARDS from the Buy Arrow.

Scale Out Value Analyzer Scale Out Value Analyzer

A native MQL5 tool that reconstructs closed positions from deal-level history, flags the ones closed through more than one exit, and reprices each one at its own first, last, and best exit rates to measure whether scaling out actually added value. Reports a Value-Add Ratio, a Scale Out Win Rate, an Efficiency figure, and a single-trade dependence check, combined into an A+ to F score with recommendations. Runs out of the box against a built-in demonstration data set; a companion script exports the real input file from your own account history. Pure MQL5, no external libraries.

Daily Zone Recovery EA mt5 for GOLD Daily Zone Recovery EA mt5 for GOLD

Daily Zone Recovery is a multi-strategy trading expert advisor for MetaTrader 5 that operates based on the previous trading day’s high and low levels. The expert advisor monitors price behavior near daily extremes, uses three independent entry strategies, and can manage positions using a fixed-volume grid.

Previous Week High Low Indicator Previous Week High Low Indicator

Plots the previous trading week's High and Low as horizontal reference levels across the current week, with optional multi-week history for context. No repainting, no discretion — the levels are read directly from the completed Weekly bar.