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

History Export from the Strategy Tester (Bars and Ticks) - MetaTrader 5용 expert

조회수:
54
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Exports price history from the Strategy Tester to CSV files: closed bars of any timeframe and, optionally, every tick.

Why from the tester? On a chart, history is limited by the "Max bars in chart" setting (100,000 bars by default, about three months of M1 data). The tester has no such limit, so years of M1 bars, or the real ticks of a period, come out in one run.

Tester journal and the first rows of the exported files

How to use

  1. In the Strategy Tester, select HistoryExportTester, the symbol and the date range. The test timeframe does not matter: the exported timeframe is set by an input.
  2. For bars only, any model works, and "1 minute OHLC" is the fastest. For ticks, use "Every tick based on real ticks"; other models export the tester's generated ticks.
  3. Run the test. The files are written to Terminal\Common\Files (or to the tester agent's MQL5\Files folder when "Write to the common folder" is off).

Files

  • <symbol>_<timeframe>_bars.csv: time, open, high, low, close, tick_volume, real_volume, spread. Only closed bars are written; the bar still forming when the test ends is skipped.
  • <symbol>_ticks.csv: time_msc, time, bid, ask, last, volume, flags.

Gap report. At the end, the journal shows how many gaps longer than N bars fall inside the symbol's trading sessions, and lists the ten largest. Weekends and daily breaks are not gaps. Market holidays are reported, because the session schedule still lists them as trading time.

Example (XAUUSD on a demo account): 646,444 M1 bars from January 2025 to October 2026 in one run, with 39 gaps, all of them holidays (Good Friday, Christmas, New Year, early closes on US holidays). One week of real ticks was 3.6 million ticks, about 240 MB of CSV, so export ticks in short date ranges.

Inputs

  • Bars to export: the timeframe (default M1).
  • Also export every tick: default false.
  • File name prefix: default is the symbol name.
  • Write to the common folder: default true.
  • Report gaps longer than this many bars: default 5.

The Expert Advisor only reads data and never places, modifies or closes an order.

MTF Order Block Zones Indicator MTF Order Block Zones Indicator

MTF order blocks from the chart timeframe or a higher one, shaded on the chart and followed bar by bar: fresh until price comes back, tested after that with every return counted, broken once a close goes through. Sizes are measured in average ranges, so the defaults fit any symbol, and a new zone absorbs the ones it overlaps, so zones never stack.

Info Panel – candle countdown, spread, ATR and daily range Info Panel – candle countdown, spread, ATR and daily range

Panel showing a candle countdown, spread, daily ATR and the proportion of the daily range already used.

NY Open Candle: The Basics NY Open Candle: The Basics

A basic expert advisor that trades in the direction of the 9.30 am New York 5-minute candle on index CFDs (US100 / NAS100). One trade per day, fixed stop-loss and take-profit levels, forced closure; no martingale or grid strategy.

Round Numbers – automatic psychological thresholds Round Numbers – automatic psychological thresholds

Horizontal lines at round figures around the displayed price, with a spacing that adjusts according to the zoom level.