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

Execution and Slippage Forensics audits MetaTrader 5 account history - MetaTrader 5용 스크립트

Margarita Florencia Del Aguila
Margarita Florencia Del Aguila
Welcome to AIPID. I am 54 years old, married, and have two children. I am an engineer, and for nearly 20 years, trading has been my hell and is my passion.
WHY HAS IT BEEN MY HELL?
조회수:
95
평가:
(1)
게시됨:
업데이트됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
Execution and Slippage Forensics

Core Idea
Execution & Slippage Forensics is a standalone diagnostic script for MetaTrader 5 (no external #include dependencies) that audits your real account trading history by pairing every executed trade deal back to its parent historical order via HistoryOrderSelect(). By comparing ORDER_PRICE_OPEN (requested price) against DEAL_PRICE (actual fill price), it quantifies execution quality in both points and account currency without fabricating numbers when market orders omit requested prices (Req=0.0).

How to Interpret the Output
1. Sign Convention:
   - Positive (+) values in points or currency represent favorable price improvement (filled better than requested).
   - Negative (-) values represent adverse slippage (filled worse than requested).
2. Four Execution Buckets:
   - ALL_MEASURED: Aggregate portfolio fill statistics.
   - ENTRIES (IN / INOUT): Entry execution quality under normal liquidity.
   - SL_EXITS (DEAL_REASON_SL): Stop-Loss execution slippage, isolating stop-hunting or liquidity gaps.
   - OTHER_EXITS: Take-Profit, manual, and automated closes.
   Each category reports Count, Mean (pts), Median (pts, robust against outliers), Adverse %, Positive %, and Net Slippage ($).
3. 24-Hour Server Profile & Hidden Execution Drag:
   - Identifies exact Broker Server hours (00:00 - 23:00) where rollover or low liquidity widens adverse slippage.
   - Computes Hidden Execution Drag = Commissions + Fees + Swaps + Adverse Slippage expressed as a percentage of Gross Winning Profit.
4. Exports:
   - Prints the full report and worst adverse deals in the Experts tab, displays a concise summary on the chart, and exports ExecutionForensics_Deals.csv and ExecutionForensics_Hourly.csv to MQL5\Files\.

External Input Parameters
- InpLookbackDays (default 90): Number of past days to audit. Set 0 to audit the entire loaded account history.
- InpSymbolFilter (default ""): Empty string audits all symbols; "CURRENT" audits only the active chart symbol; or specify an exact symbol name.
- InpMagicFilter (default -1): -1 includes all EAs and manual trades; set a positive MagicNumber to isolate a single Expert Advisor.
- InpExportCSV (default true): Enables CSV export of deal-level records and the 24-hour execution table into MQL5\Files\.
- InpShowChartComment (default true): Displays a compact summary overlay on the active chart.
- InpTopWorstDeals (default 5): Number of worst adverse-slippage fills to list in the Experts log (0 disables).

Recommended Usage
Attach the script to any chart after ensuring the desired date range is loaded in your MT5 Account History tab. Works on all Forex, Metals, Indices, and CFD symbols in both Hedging and Netting accounts.

Giano ATR Regime Giano ATR Regime

Classifies volatility on closed bars using ATR(14), with three color-coded regimes and optional alerts.

TrailGuard - break-even and trailing stop manager for open trades TrailGuard - break-even and trailing stop manager for open trades

Moves the stop loss to break-even and then trails it on trades that are already open. It never opens or closes a trade.

Tick-Based Spread Distribution Profiler reads historical Bid/Ask ticks via CopyTicksRange Tick-Based Spread Distribution Profiler reads historical Bid/Ask ticks via CopyTicksRange

Tick-Based Spread Distribution Profiler reads historical Bid/Ask ticks via CopyTicksRange() and plots 24h spread percentiles (P50, P90, P99) in a separate subwindow. Key Features: - True Tick Percentiles: Plots Median (P50 histogram), P90 (orange line), and P99 (red dotted line) in points for every server hour (00-23h). - Unbiased Reservoir Sampling: Samples multi-week history within InpMaxSamplesPerHour without biasing early days. - Closed-Bar Friction Ratio: Uses closed-bar iATR (shift=1) to show Spread_P50 / ATR (%) and spot low-friction hours. - Clean Subwindow HUD: Displays global/current-hour stats and best/worst hours, with zero log spam and full OnDeinit() cleanup. - Optional CSV Export: Exports 24h Min/P50/P90/P99/Max stats to MQL5\Files\SpreadProfile_<Symbol>.csv. Inputs: InpLookbackDays (14), InpMaxSamplesPerHour (50000), InpAtrTimeframe (M15), InpAtrPeriod (14), InpRefreshMinutes (60), InpShowSummaryHUD, InpExportCSV.

Range Compression Zones Breakout Range Compression Zones Breakout

Range Compression Zones Breakout draws range compression zones and marks breakouts that pass a higher-timeframe high/low filter and a volume filter. Inspired by the range compression idea in Domenico D'Errico's Accumulation/Distribution study (TASC, August 2018). Independent implementation, not a literal port of the published study.