Join our fan page
- Views:
- 1235
- Rating:
- Published:
- 2025.02.15 20:08
- Updated:
- 2025.02.19 09:51
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
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.

PrintXYZ() library to print massive information from the terminal.

A script which when dragged onto the chart will print out in the experts window the number of bars that are on that chart - like magic.

The indicator plots two lines. The lower line is calculated based on the latest SMA period that caused a bounce up. The upper line is calculated based on the latest SMA period that caused a bounce down.

These are some #define statements that are useful to perform operations in your EA. You only need to assign the name of your variables at the beginning of the file, and then let the other #define statements do the work. In order to use this file, add #include <DEFINE_statements.mqh> to the first line in your EA file.