Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Script | Collect Data (Date, Time and Close Price)

MetaTrader Experts, Indicators, Scripts and Libraries

As you can see this is a short script used to collect close price and place it in a column after a date string and a time (hour and minute) string.

The data is saved to a comma separated values (CSV) file in the MQL5/Files folder by default, for outside use as needed.

There are no frills, bells or whistles on this and I am not yet familiar enough to know whether it would be better (or if it is possible) to use CopyTime and CopyRates built-in functions rather than the iClose and iTime functions. 

There are more than one ways to skin a cat as they say.

56064