The best thing for you would be to ask a freelancer to do it for you!
But please be sure to read beforehand:
https://www.mql5.com/en/job/rules // rules
https://www.mql5.com/en/articles/4368 // EA requirements specification
https://www.mql5.com/en/articles/4304 // Indi requirements specification
https://www.mql5.com/en/articles/117 // How to Order a Trading Robot in MQL5 and MQL4

- 2022.08.03
- www.mql5.com
-
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
You have only four choices:
-
Search for it (CodeBase or Market). Do you expect us to do your research for you?
- Beg at:
- Coding help - MQL4 programming forum
- Make It No Repaint Please! - MQL4 programming forum
- MT4 to MT5 code converter - MQL5 programming forum
- Please fix this indicator or EA - General - MQL5 programming forum
- Requests & Ideas (MQL5 only!) - Expert Advisors and Automated Trading - MQL5 programming forum
- Indicator to EA Free Service - General - MQL5 programming forum
-
MT4: Learn to code it.
MT5: Begin learning to code it.If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
-
Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum (2019)
We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
No free help (2017) -
- Your posted code does not print oldest to newest; it prints one (at index i). Always post all relevant code (using Code button) or attach the source file.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I don't really know anything about programming in MQL5 but I would like someone to help me edit this script by modifying this one so that can add a line of code that can print a header of reference for each column such as: Date, Open, High, Low, Close for each CSV book and that the data can be printed from the most recent to the oldest instead of the oldest to the newest
string str_write = "";
StringConcatenate( str_write
, TimeToString( rates_array[i].time, TIME_DATE )
, ",", DoubleToString( rates_array[i].open , digits )
, ",", DoubleToString( rates_array[i].high , digits )
, ",", DoubleToString( rates_array[i].low , digits )
, ",", DoubleToString( rates_array[i].close , digits )
, "\n" );
FileTxt.WriteString( str_write );
//---
FileBin.WriteDouble ( rates_array[i].open );
FileBin.WriteDouble ( rates_array[i].low );
FileBin.WriteDouble ( rates_array[i].high );
FileBin.WriteDouble ( rates_array[i].close );
}
Print( symbol, ", ", EnumToString( period ), ": ", IntegerToString( copy_count ), " bars have been written to \"", FileTxt.FileName(), "\" and \"", FileBin.FileName(), "\" within ", DoubleToString( (GetTickCount() - start)/1000.0, 1 ), " sec!" );
FileTxt.Close();
FileBin.Close();