Download Automaticaly file

MQL5 Experts

Job finished

Execution time 1 day
Feedback from customer
Alain Is very professional data scientist, I full recommend, this is the man!
Feedback from employee
Interesting job and very nice customer. Recommended.

Specification

Hi,


   I have an EA that is feed with a file wich need to be extracted from internet every day from a web site. To do this mannualy I need to click on a button in this site and the file is downloaded (picture bellow), but I would like to do this automatically, Using WebRequest() The file must be downloaded on actual date of the form to "File" folder and then unziped there overwirting the older file.

http://www.b3.com.br/pt_br/market-data-e-indices/servicos-de-dados/market-data/consultas/mercado-a-vista/opcoes/posicoes-em-aberto/


You can use the code bellow as example, it works but the date of the form is fixed, you need put always the actual date

Use Chrome to inspect, the execution and debug what happens



oid OnStart() 
  { 
   string cookie=NULL,headers; 
   char   post[],result[]; 
   string url="http://www.b3.com.br/lumis/portal/file/fileDownload.jsp?fileId=8AE490C96A051101016A0596E52F6182"; 
//--- para trabalhar com o servidor é necessário adicionar a URL "https://finance.yahoo.com" 
//--- na lista de URLs permitidas (menu Principal->Ferramentas->Opções, guia "Experts"): 
//--- redefinimos o código do último erro 
   ResetLastError(); 
//--- download da página html do Yahoo Finance 
   int res=WebRequest("GET",url,cookie,NULL,500,post,0,result,headers); 
   if(res==-1) 
     { 
      Print("Erro no WebRequest. Código de erro =",GetLastError()); 
      //--- é possível que a URL não esteja na lista, exibimos uma mensagem sobre a necessidade de adicioná-la 
      MessageBox("É necessário adicionar um endereço '"+url+"' à lista de URL permitidas na guia 'Experts'","Erro",MB_ICONINFORMATION); 
     } 
   else 
     { 
      if(res==200) 
        { 
         //--- download bem-sucedido 
         PrintFormat("O arquivo foi baixado com sucesso, tamanho %d bytes.",ArraySize(result)); 
         //PrintFormat("Cabeçalhos do servidor: %s",headers); 
         //--- salvamos os dados em um arquivo 
         int filehandle=FileOpen("url.zip",FILE_WRITE|FILE_BIN); 
         if(filehandle!=INVALID_HANDLE) 
           { 
            //--- armazenamos o conteúdo do array result[] no arquivo 
            FileWriteArray(filehandle,result,0,ArraySize(result)); 
            //--- fechamos o arquivo 
            FileClose(filehandle); 
           } 
         else 
            Print("Erro em FileOpen. Código de erro =",GetLastError()); 
        } 
      else 
         PrintFormat("Erro de download '%s', código %d",url,res); 
     } 
  }


Responded

1
Developer 1
Rating
(277)
Projects
334
55%
Arbitration
14
36% / 29%
Overdue
1
0%
Free
2
Developer 2
Rating
(94)
Projects
148
59%
Arbitration
16
38% / 13%
Overdue
25
17%
Free
Published: 1 code
3
Developer 3
Rating
(144)
Projects
285
42%
Arbitration
19
63% / 5%
Overdue
29
10%
Free
Published: 2 codes
4
Developer 4
Rating
(23)
Projects
25
12%
Arbitration
1
0% / 100%
Overdue
8
32%
Free
5
Developer 5
Rating
(215)
Projects
302
79%
Arbitration
4
25% / 0%
Overdue
62
21%
Free
Published: 7 codes
Similar orders
Project Name EliavTrade – Supply & Demand Prop Firm Trading System Executive Summary EliavTrade is an MT5 Expert Advisor designed to trade funded accounts and personal retail accounts using a rule-based Supply and Demand methodology combined with institutional risk management. The EA's primary objective is capital preservation and consistent account growth rather than aggressive returns. The system must be capable
Description: I am looking for a highly experienced MT5 developer to build a manual‑execution Expert Advisor called Chain Flow . This project is not suitable for beginners , indicator‑only developers, or anyone who has not previously built complex object‑based systems. The EA relies heavily on chart objects , state machines , and clean UI panel logic . Project Overview (High‑Level): Chain Flow is a manual execution EA
I'm after a solid, ready-to-use indicator (already built — not looking to commission from scratch) with the following: Clear BUY / SELL signals — clean and easy to read on the chart Around 75% accuracy (backtested / proven results preferred) Clear labeling directly on the chart for every signal Built-in Stop Loss levels Smart Take Profit targets (multiple TPs ideal) Fast-reacting — picks up moves quickly without
Hello, I am interested in working . I have several strategies that I want to automate. However, I need a developer beforehand to explain the strategies and discuss the next steps
Read signal and enter trade and close trade at good profits and open trade again. Either bullish or bearish signals at 0.1 on XAUUSD. Maximum trade a day should be 4-5 times with good opens and close signals. Looking foward to a long cooperation and also a honest and genuine person
Strategy Overview: I am looking for a professional MQL5 developer to create an Expert Advisor named "AURAE". The EA is based on a hybrid strategy that combines trend momentum analysis with volatility filters to identify high-probability entry points. Core Requirements: Logic: The EA should analyze trend direction using Moving Averages and confirm momentum using RSI. Entry Rules: * Buy: When the price closes above
AlphaGreen 150 - 200 USD
Hello, I need a professional MT5 Expert Advisor (EA) developed for a custom indicator-based strategy. Strategy Logic: Determine the trend direction: Uptrend = Buy opportunities only. Downtrend = Sell opportunities only. Entry Conditions: The indicator has 4 lines: 2 Green lines, 1 Red line, and 1 Blue line. Open a Buy trade when both Green lines move inside/between the Red and Blue lines during an uptrend. Open a
Robot trading 30+ USD
A trading robot that operates with a balance of $20 to $50, with a loss of $5 and a profit of $10, and a maximum of three trades per day
Prop Firm EA 30 - 40 USD
I am looking for an MT5 Expert Advisor specifically designed to help meet common prop-firm evaluation requirements while prioritizing consistency, low drawdown, and strong risk management. The EA should use a robust trend-following and market structure-based strategy with multi-timeframe confirmation, momentum filtering, and optional news filtering to avoid low-quality trades. It must include configurable risk
The bot uses: RSI MA(2/7) crossover for entry signals Price Bollinger Bands as trend filter RSI Bands(34) as confirmation London/NY session filter (M5 only) ATR-based SL/TP Gap bridge between sessions Here's your EA. Here's what it replicates from the Pine Script bot: Strategy logic RSI MA(2) crosses MA(7) for entry signals Price Bollinger Bands(20) as trend filter RSI Bands(34) as confirmation filter ATR-based SL/TP

Project information

Budget
30 - 40 USD