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
評価
(175)
プロジェクト
225
20%
仲裁
19
42% / 16%
期限切れ
0
取り込み中
2
開発者 2
評価
(27)
プロジェクト
36
72%
仲裁
1
0% / 0%
期限切れ
2
6%
パブリッシュした人: 2 articles, 12 codes
3
開発者 3
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
類似した注文
I have pine editor script I want to convert this into MT5 EA Main i want to match tv and mql5 buy and sell signal to match in trading view i use this with heikin ashi candles things to add in this but after main need to be done 1 Ea start stop time 2 Manual lot size 3 tp sl - on Ea start if i want to add separate tp for first 2 trades and after that same tp 4 halt ea and close all trades after over all daily profit
Hello Programmer! **Objective** Create an **MT4 Expert Advisor (“Monitor EA”)** that runs on a single blank chart and acts as an **execution firewall and auto-recovery controller** for all other EAs trading on the account. Because existing EAs are **not editable**, the Monitor EA will control trading by **closing and reopening charts/templates** instead of modifying EA logic. Target Platform: **MT4** Broker Type
💰 BUDGET: $2000-$4000 XAUUSD EA (Negotiable) Institutional XAUUSD EA with 20+ Systems | Sharpe 4.2+ | Quant Firm Standards DESCRIPTION I need an experienced MQL5 developer to build a professional institutional-grade EA with 20+ integrated trading systems for MetaTrader 5. CORE REQUIREMENTS: Architecture: • 20+ independent trading systems (trend, mean reversion, volatility, breakout) • ON/OFF toggle for each system
Hi , I am finding scalping Ea for Mt5 which can work on all pairs and have back tested results at least of 1 year and is currently running in Mt5 so i can login and see how it is performing who ever have message me
Strategy Name: SHA & Fast Ema Pullback for BTCUSD Scalping Indicators Used: Smoothed Heiken Ashi Candles MT5.ex5, Fast EMA, Trend Ema, RSI Filters Used: Break Even Filter, Ema Slope Filter, Day-wise Filter, Session/ Time Filter, Loss Filter Lots: Fixed Size, 50% lots booked when Risk to Reward is 1:1 Stop Loss: in Points Trailing SL: starts once Risk to Reward 1:1 is achieved Target: 2000 Pts (max) Buy Setup Ema
(15M + 1H Support & Resistance + Liquidity Wick + Trailing SL) 🎯 Objective Develop an MT5 Expert Advisor (MQL5) for XAUUSD (Gold) based on 15-minute liquidity rejection at H1/M15 Support & Resistance zones , with candle-close based trailing stop loss . 📊 On-Chart Display Detected Support & Resistance zones Trade direction Current SL & trailing level Active session 🔐 Risk Rules Only one trade per signal No
Hi, im not looking into developing a new EA. I am looking into purchasing an existing EA that can deliver such results like: mq5 source, 4 year backtest 2021‑2025 report, equity curve, trade list, strategy description, and 1‑month demo access. i need a concrete prove of experience functioning existing EA working perfectly and as contained on my description, then we can't strike a deal. Thank you
I’m looking for an experienced EA developer to develop a hedging Expert Advisor for XAUUSD , designed with the primary objective of maximizing broker commission rebates while maintaining overall account profitability . The EA should: Trade XAUUSD only Use a hedging strategy (frequent buy/sell positions) Be optimized for high trading volume to “milk” broker commissions Still aim to keep the net account profitable or
1.Session high low will use GMT time as range. I am not sure how the EA will handle the DST. When GMT+1 is xx:00 - xx:00 When GMT is xx:00 - xx:00 above is Asia range. When GMT+1 is xx: 00 - xx:00 When GMT is xx:00 - xx:00 Above is London range. Entry windows one for London Session and one for NY Session Emas for bias Fractals indicator for invalidation We will discuss more later
Hello all developers! I need a profitable EA ready made, I am paying good, but only serious offer please. In first message please send me backtesting resaults and demo version. If you will not do this your application will be rejected, no exceptions. Source of code of course required

プロジェクト情報

予算
30 - 50 USD
締め切り
最低 1 最高 10 日