Fresh MQL5 code release – perfect for enhancing your MT4/MT5 strategies.

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.
Grid trading done right – try the robust Grid Expert Advisor for controlled risk. Details here.
-
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:).
-
InpFileName : Output file name (default:).
-
-
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:
-
Attach the script to any chart with your desired symbol and timeframe.
-
Check the boxes for the data/indicators you want to export and set the number of candles.
-
Click OK and check the Experts tab in the Terminal for the confirmation message.
-
Retrieve your CSV file in MetaTrader 5 via:File -> Open Data Folder -> MQL5 -> Files.
Level up your trading with professional RobotFX expert advisors and indicators. Visit robotfx.org for proven MT4/MT5 tools.
79915