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

Advanced Trade History Exporter: MAE, MFE and Time-Based Excursions (Points) - MetaTrader 5용 스크립트

조회수:
83
게시됨:
업데이트됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동


Evaluating your trading edge requires more than just looking at your win rate and net profit. You need to know how efficient your entries and exits are. Are your stop losses too wide? Are you leaving money on the table by closing too early?

This script analyzes your historical deals, reconstructs your trades, and calculates advanced quantitative metrics, outputting everything into a clean .csv file that you can open directly in Excel.

Key Features & Metrics Calculated:

  • MAE (Maximum Adverse Excursion): Calculates the maximum number of points the market moved against your position during the lifespan of the trade. Helps you optimize your stop-loss placement.

  • MFE (Maximum Favorable Excursion): Calculates the maximum number of points the market moved in your favor before the trade was closed. Helps you identify if you are giving back too many unrealized gains.

  • Forward Returns (Time-Based Excursions): Analyzes the exact price difference relative to your entry price at specific future intervals (T+30m, T+1h, T+4h, T+12h, T+1d, T+1w). This answers the quantitative question: "What if I had just held the trade for exactly X hours?" If a future time period hasn't occurred yet, it safely outputs n/a .

  • T+1w MIN (Forward Risk): Calculates the absolute worst-case drawdown (maximum adverse points) that occurred over the entire 1-week period following your entry. If the trade never went against you during that week, it reports 0 .

Output Format: The script generates a CSV file with the following columns: Position ID | Symbol | Type | Open Time | Close Time | Duration (Hrs) | Open Price | Close Price | Profit ($) | Profit (Pts) | MAE (Pts) | MFE (Pts) | T+30m | T+1h | T+4h | T+12h | T+1d | T+1w | T+1w MIN

Input Parameters

  • Start Date: Choose how far back in your terminal's history you want the script to scan (Default: 2026.01.01 ).

How to Use

  1. Download the .mq5 source code file.

  2. In your MetaTrader 5 terminal, go to the top menu and click File -> Open Data Folder.

  3. Navigate to the MQL5\Scripts folder and place the .mq5 file inside.

  4. Open the MetaEditor (press F4 on your keyboard).

  5. In the MetaEditor Navigator, find the script under the Scripts folder, open it, and click the Compile button at the top (or press F7).

  6. Back in the MT5 terminal, open the Navigator panel (Ctrl+N).

  7. Expand the Scripts folder, find Export_MAE_MFE_Points , and drag it onto any open chart.

  8. Set your desired Start Date and click OK.

  9. The script will process your history and save a file named TradeHistory_Stats_Points.csv in your MQL5\Files folder.

Note: The script utilizes M1 timeframe data ( CopyHigh , CopyLow , CopyClose ) to calculate the highly accurate excursion metrics. Please ensure you have sufficient M1 history downloaded from your broker for the symbols and dates you are querying, otherwise, some metrics may report as 0.

Frontend EA : UI cleanup + quick-trading layer for MT5 Frontend EA : UI cleanup + quick-trading layer for MT5

A chart-cleanup + quick-trading layer for MT5

Calculate Lot Percent Calculate Lot Percent

Function for lot calculation from deposit percentage

ASQ Order Executor ASQ Order Executor

ASQ Order Executor — Institutional order execution wrapper for MQL5 EAs ASQ Order Executor provides institutional-grade order execution with automatic retry logic, slippage monitoring, partial fill handling, requote management, and comprehensive execution statistics. Drop it into any EA for production-ready trade execution.

MACD Signals MACD Signals

Indicator edition for new platform.