Selecting CSV column for walk forward optimization

Karl Robeck  

hello, I'm new on reading files through mql5 and i don't think my code is working as intended. my purpose on why I need to read csv file is that I'm trying to walk forward test my system without optimization. gathering multiple csv and comparing them to get the optimal parameters that I will use for my EA when back testing so it will get optimal parameters every time. I've created steps on how this code will run so that I will not be confused later on.

first I gathered manual optimization csv files and placed in a folder

Optimization Files

Check the current date and if the current date is not yet optimized, get the optimal parameters using the optimization files.

if optimization files are insufficient or out of date stop the back test.

string LastOptimization;

int CountOptimizationFiles;

void Ontick(){

        string CurrentDate = TimeToString(TimeCurrent(), TIME_DATE);

                if(CountOptimizationFiles<5)// I don't know how to find "out of date" optimization files hehe

if were in the GetOptimalParameters Function 

First, Read the 5 files

Second, Select The Column that contains the parameters in csv file.

Third, place it in Array

int OptimizationParameters[parametercount]// parametercount: count all of the parameters on csv

Forth, find the optimal Value using frequency distribution

Fifth, place the result as the latest input for the EA

Sixth, exit the function

I will update this thread and add code once I learn more about reading files and using different code to implement my idea.

if you have any suggestion or idea on how to read csv files, you can comment here. it will help me a lot!!