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

Export candles and indicators data to external csv file - MetaTrader 5용 스크립트

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

ExportDataToCSV is a lightweight and customizable MQL5 script designed to export historical price action data (OHLCV) and popular technical indicators directly to a .csv file.

Unlike static exporters that dump unnecessary data, this script uses dynamic handle initialization. It only creates indicator handles, waits for calculations, and writes columns for the specific parameters you enable in the input window—saving processing time and keeping your datasets clean for Excel, Python (Pandas/NumPy), R, or Machine Learning models.


Key Features:

  • Selective Export (Checkboxes): Choose exact data columns to include via boolean inputs (true /false ).

  • Resource Efficient: Only initializes and calculates indicators that are explicitly selected by the user.

  • Built-in Synchronization: Includes a safe waiting loop (BarsCalculated ) to ensure all selected indicator buffers are completely calculated before writing to the file.

  • Clean CSV Formatting: Automatically generates dynamic headers matching your selected inputs, along with formatted timestamps (YYYY.MM.DD HH:MM ).

Available Data & Indicators:

  • Timestamp: Bar date and time (exported by default under the column Date_Time ).

  • Price Action: Open, High, Low, Close (OHLC).

  • Volume: Tick Volume.

  • Volatility & Trend:

    • ATR (14)

    • ADX (14) — exports Main, +DI, and -DI buffers

  • Momentum & Oscillators:

    • RSI (7) and RSI (14)

    • MACD (12, 26, 9) — exports Main and Signal lines

    • Stochastic (5, 3, 3) — exports Main and Signal lines

    • CCI (14)

    • Momentum (14)

    • MFI (14)

Input Parameters:

  • General Settings:

    • InpCandles : Number of historical bars to export (default: 1000 ).

    • InpFileName : Output file name (default: "MT5Export.csv" ).

  • Data to Export: Individual true /false toggles for OHLC, Tick Volume, and each of the 9 technical indicators.

How to Use & Where to Find the File:

  1. Attach the script to any chart with your desired symbol and timeframe.

  2. Check the boxes for the data/indicators you want to export and set the number of candles.

  3. Click OK and check the Experts tab in the Terminal for the confirmation message.

  4. Retrieve your CSV file in MetaTrader 5 via: File -> Open Data Folder -> MQL5 -> Files.

Net Currency Exposure and Hedged Margin Simulator Panel Net Currency Exposure and Hedged Margin Simulator Panel

A real-time CCanvas on-chart utility for MetaTrader 5 that calculates net lot exposure per currency across all open positions and simulates the exact margin, Margin Level (%), and Stop-Out buffer impact of a new Buy or Sell order—automatically accounting for your broker's hedged margin rules.

Prop Firm Daily Loss and Drawdown Monitor Prop Firm Daily Loss and Drawdown Monitor

Free panel indicator for funded / prop-firm accounts: shows the room left before the daily loss limit and the static maximum drawdown, and alerts when you get close. Monitor only: it never opens, closes or blocks trades.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.