This script writes the MAE (maximum adverse excursion) and MFE (maximum favourable excursion) of every closed position in your account history to a CSV file: in price, in account money and in R when the first entry had a stop loss. MAE is how far the price went against the position before it closed; MFE is how far it went in its favour. Set next to the result and the initial stop loss, they show how much room each trade needed and how much of the move it kept. The script only reads the history: no trade functions, no DLL imports, no network.

MAE and MFE of a closed long trade: a drawing of the method, not account data.
How it works
How to read the results
Use
Drag the script from Navigator > Scripts onto any chart, set the days of history and press OK. The Experts log says how many positions were written. The file is MQL5\Files\MAE_MFE_ClosedTrades.csv (File > Open Data Folder), one row per closed position: position, symbol, direction, entry and exit time, entry and exit price, exit reason, net result, initial stop loss, MAE and MFE in price and money, 1R in money, R, MAE and MFE in R, and the number of M1 bars used.
Input
Limitations
Server-Midnight Daily Floating Drawdown and Spread Spike HUD
Read-only chart HUD tracking server-midnight daily floating drawdown (Max Balance/Equity anchor), remaining daily buffer, per-Magic P&L attribution, and 23:00-00:15 rollover spread spikes.
Execution Quality Recorder
Records every fill on the account and shows how it was executed: slippage against the requested price on entries and on stop-loss and take-profit exits, the spread at the fill and the execution delay. Per-symbol panel, hour-by-hour heatmap, CSV log and a side-by-side broker comparison. It does not trade.
Accelerator Oscillator (AC)
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
MACD Signals
Indicator edition for new platform.