Write data to file during optimization in MT5

MQL5 전문가 다른

작업 종료됨

실행 시간 3 일
고객의 피드백
Worked very hard to complete my complicated task and communicated well. I was impressed. Will hire again :)
피고용인의 피드백
Great! Thank you for interesting task! Cheers!

명시

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.


응답함

1
개발자 1
등급
(133)
프로젝트
174
18%
중재
17
47% / 18%
기한 초과
0
무료
2
개발자 2
등급
(27)
프로젝트
36
72%
중재
1
0% / 0%
기한 초과
2
6%
무료
3
개발자 3
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
비슷한 주문
Im looking for an coder to code an EA: Trade management 1. opening trades according to the indicator 2. trades settings to choose from like: open all trades according to the signal open only trade 1,2,3 or 4 % per trade ( example 50/30/20 of the lot settings, with 4 trades it would be for example 50/30/10/10) 3. SL/Trailing settings: Move SL to entry after hitting TP1/TP2 or TP3 moving SL by % keep the original SL
Hi I'm looking to have 2 of my pinescript strategies converted to MQL5 and was wondering if you could first give me a quote for the more simple strategy and then for both the simple and complex strategy together. The simple strategy is a MACD crossover type thing that uses a special EMA script that filters out some ranging price action and also fractal candles for the stop loss. The second strategy is market
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money
I have developed a very strong TradingView strategy in Pine Script but unfortunately, a third-party connector is requiired and in my opinion, I want a more direct connection. I am not brilliant at coding, but I have coded the majority of the MT5 code and I would like you to make sure that the MT5 code matches my TradingView script and executes the same way as the TradingView script that I will provide if you are
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Dr Pattern 30+ USD
good day i need the service of the seaso coder to help me fix my ea The Job required 1 knowledge of Mt4 and Mt5 indicator coding 2. Telegram code 3. ability to code indicator to work on multiple Time frame combine to trade 4 Ability to Join two or three indicator on same ir different time frame if you have these skill please let chart i will discuss the details of the Job inside to you The required day including
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
Hello, I am looking for a professional programmer to optimize my existing EA integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. i want it to be an EA that can be trusted to carry trade with the help of chat gpt and also have a very low drawdown
Hello, I am looking for a professional programmer to create a trading expert on the MT4 platform, integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. Further details will be provided to the applicants later

프로젝트 정보

예산
30 - 50 USD
개발자에게
27 - 45 USD
기한
에서 1  10 일