Export Indicator Data to CSV in MetaTrader 4: A Simple Guide

Mike 2014.11.27 22:21 41 0 0
Attachments

Real Author:

I sourced the original code from Heaton Research's Encog project. This code is designed to gather data, print it to a CSV file, and then process it in real-time after optimization.

I've simplified the code so it only focuses on data collection. Just a heads-up—I don’t own the original code.

If you want more details, check out Heaton Research's project page.

To export the values of the indicators you want, add them to the section starting at Line 84. Don’t forget to update Line 31 accordingly!

Once you’ve done that, run the indicator on your chart. When the indicator window pops up, go ahead and delete it.

As soon as you delete the indicator window, it will collect the data and export it to the CSV file. You can specify the file name in the inputs section. Typically, you’ll find the CSV file saved at MT4\MQL4\Files.

List
Comments 0