Write data to file during optimization in MT5

MQL5 Experts Other

Job finished

Execution time 3 days
Feedback from customer
Worked very hard to complete my complicated task and communicated well. I was impressed. Will hire again :)
Feedback from employee
Great! Thank you for interesting task! Cheers!

Specification

I need help writing a bit of modular MQl5 code for EA integration.

The purpose of the code is to write the information of 20 different variables into a .csv file (in a format readable by excel) during the optimization in MT5.

It needs to write the information for all currently running optimization passes simultaneously in ontick()

(in other words, it needs the Frame() function)


I want it to write into a different file for each optimization pass.

(FrameInputs() does this)

So in other words pass1.csv pass2.csv, ect.


The variables to be written are empty, I will fill them later in my own. But the indexes need to have a variable name so I can feed them with information from another function.

The only variable I want you to write in is the TimeCurrent() into the first variable.


Here is an example of my (failed) code.

void OnTick()


  {

   int  data[20];
   data[0] = variable1;
   data[1] = variable2;
   data[2] = variable3;
   data[3] = variable4;
   data[4] = variable5;
   data[5] = variable6;
   data[6] = variable7;
   data[7] = variable8;
   data[8] = variable9;
   data[9] = variable10;
   data[10] = variable11;
   data[11] = variable12;
   data[12] = variable13;
   data[13] = variable14;
   data[14] = variable15;
   data[15] = variable16;
   data[16] = variable17;
   data[17] = variable18;
   data[18] = variable19;
   data[19] = variable20;

   ArrayInitialize(data,0);

// int values(int& data[])

   int hl=FileOpen("filetest",FILE_CSV|FILE_WRITE|FILE_SHARE_WRITE|FILE_ANSI|FILE_COMMON);

   if(hl==INVALID_HANDLE)
     {
      printf("Error %i creating tester file",GetLastError());
     }
   else
     {
      FileSeek(hl,0,SEEK_END);
      FileWrite(hl,data[0],data[1],data[2],data[3],data[4],data[5],data[6],data[7],data[8],data[9],data[10],data[11],data[12],data[13],data[14],data[15],data[16],data[17],data[18],data[19]);
      FileClose(hl);


      if(!FrameAdd("Statistics",0,0,data[
20 ]))
         printf("FrameAdd failed with error %i",GetLastError());
      else
        {
         Print("Frame added");
        }
     }


  }
//+----------------------

The results in the file should look something like this 

So excel reads them like this




The names and variables should be an empty value and return nothing unless I fill the variable.

So variable1 = 2, variable2 = "" variable3 = ""

and variablename1 = "drawdown", variablename2 = "", variablename3 = ""


Or something to that effect.


The end result is I want it to be modular and fill the file with whatever data I choose at a later point.


Responded

1
Developer 1
Rating
(130)
Projects
167
17%
Arbitration
17
47% / 18%
Overdue
0
Working
2
Developer 2
Rating
(27)
Projects
36
72%
Arbitration
1
0% / 0%
Overdue
2
6%
Free
3
Developer 3
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Cloning URGENT 30+ USD
i need to clone an ea, it's urgent so if you have overdue please don't apply i need a developer available asap, i will have also new jobs after this thank you
Hello all, I need someone to create a NO REPAINT indicator/strategy on tradingview. It will grab the logic from an existing indicator I have but it has to be recreated so it doesn't repaint and I need to adjust the way it's calculating the raids. If you are someone that knows how to code in tradingview and has experience on this please reach out. Thanks
Hello there and how are you doing?..I need a ninjatrader developer to help me do some modifications on my script so kindly bid this if you are available and we can get started immediately
Hello all, I am currently looking for someone that has a telegram copier to copy signals to MT5 and/or MT4. Or also may need customised abit. Will send samples Much help is appreciated Thanks
i need a copier for tradestation to tradestation, its urgent, is there anyone that can do it? from master to slave accounts, send me some image or video of how it works send me your real bid
hello i need some developer for tradestation, i need to copy trade from master to slave accounts can you send me the some screenshot/video of how it works? thank you
I have created a MT5 EA, backtested since 2008. I have forward test it using MT5. I have analyze the backtest with Quant Analyzer 4. I have also gather information for the results from https://www.earnforex.com/report-analysis/ I have attached the results in a zip. Do you have any other usefull sites, tools, ways to get info for my backtest
Ctrader bot 30 - 45 USD
Hello! I need a cTrader bot that can receive trading signals from tradingview via webhook URL, read the syntax from the tradingview message and place the trades on cTrader. Is that something you can do? Under which of your gigs would this fall under? Thank you! This is how we expect the trade syntax to work: https://www.loom.com/share/089e783466a64d3d99214e1dbb548b4c?sid=39125f96-3b47-4446-8d75-3706dceda3c4 -
Hello! I need a cTrader bot that can receive trading signals from tradingview via webhook URL, read the syntax from the tradingview message and place the trades on cTrader. Is that something you can do? Under which of your gigs would this fall under? Thank you! This is how we expect the trade syntax to work: https://www.loom.com/share/089e783466a64d3d99214e1dbb548b4c?sid=39125f96-3b47-4446-8d75-3706dceda3c4 - Please
Hello, How are you doing? I need a developer who can convert my tradingview script to ninjatrader. The source code and requirements will be sent via inbox. Kindly bid if this is what you can do. Thanks

Project information

Budget
30 - 50 USD
For the developer
27 - 45 USD
Deadline
from 1 to 10 day(s)