Download Automaticaly file

MQL5 Experts

Trabalho concluído

Tempo de execução 1 dia
Comentário do cliente
Alain Is very professional data scientist, I full recommend, this is the man!
Comentário do desenvolvedor
Interesting job and very nice customer. Recommended.

Termos de Referência

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); 
     } 
  }


Respondido

1
Desenvolvedor 1
Classificação
(277)
Projetos
334
55%
Arbitragem
14
36% / 29%
Expirado
1
0%
Livre
2
Desenvolvedor 2
Classificação
(94)
Projetos
148
59%
Arbitragem
16
38% / 13%
Expirado
25
17%
Livre
3
Desenvolvedor 3
Classificação
(142)
Projetos
279
42%
Arbitragem
17
65% / 6%
Expirado
29
10%
Trabalhando
4
Desenvolvedor 4
Classificação
(23)
Projetos
25
12%
Arbitragem
1
0% / 100%
Expirado
8
32%
Livre
5
Desenvolvedor 5
Classificação
(215)
Projetos
302
79%
Arbitragem
4
25% / 0%
Expirado
62
21%
Livre
Pedidos semelhantes
Looking for an experienced and free dev to work on a FVG MT5 EA (experienced devs only) to create a FVG trading bot compatible across different assets (Crypto, Forex, Commodities). Only apply if you have past FVG experience and a proof of concept with a good win rate. It needs to have accurate buying and selling logic and custom text IOS alerts Lot size option Trailing Stop Loss Logic (once the trade does x ratio or
Ea-Reynerie 30 - 200 USD
The ocean gets dry and you can be fate and you are my type and the one who texting first is to be hundred I would live in the world to get your matric results
LEO INDICATOR 10000+ USD
//@version=5 indicator("Infinity and Sniper by Leo", overlay=true, precision=0, explicit_plot_zorder=true, max_labels_count=500) // Get user input emaEnergy = false sensitivity = input.float(6, " Sensitivity (0.5 - 10)", 0.5, 10, step=0.1) keltner_length = 10 atrPeriod = 10 factor = 3.5 // Keltner Channel function keltner_channel(src, length) => ma = ta.sma(src, length) rangec = high - low upper = ma + rangec
Hi, i need a Expert Advisor, that can pass prop firm Challenges like FTMO / E8 / 1OF1FUNDING Profit 10% Max Drawdown (DD) 10% Max Daily Loss 4% All trades with SL NO trades during and after high impact news NO trades during Weekend Profitable backtest from 2010 to 2024 Trades Forex (If you already have a finished EA, send me the backtest) PLease contact me asap
Pls guys I need help. About the file i need I have ea ex4 file but it use to set buystop or sellstop oders etc now what I want is to fit the propfirm am using because the propfirm am using have a lot size consistency rules so what I need is even if the ea set multiple buystop the file will only allow the ea to pick 2 positions and automatically delete the nearest limit Oder it can only allow the ea buystop or new
FOREX ROBOT TRADING //+------------------------------------------------------------------+ //| Simple MQL5 robot | //+------------------------------------------------------------------+ #property copyright "Your Name Here" int start=2017.01.01; double lot=0.01; string symbol= "VIX"; int period=PERIOD_M1; bool BuyCond=false; bool SellCond=false; bool OrderOpen=false; void BuyTrade() { double
Expert Advisor 100 - 200 USD
Hello, I would like to create an EA based on several indicators with various signals that can be activated or not for optimization purposes. It includes basic money management such as SL/TP, BE, trailstop. Please check the attached specifications carefully to confirm that you are able of achieving it 100% before offering your services. THANKS
Account Protector Modifications I would like the following modifications to the enclosed Account Protector EA. Take Profit Amount Min Stop Loss Amount Max Stop Loss amount Close All Settings Close All Trades True/False Close Hour Close Min The EA automatically detects the accounts current balance. The way the EA works is that it will actually close the trades and close all open charts when Take Profit or
I NEED A PROGRAMMER TO CONVERT AN EXISTING EXPERT ADVISOR FROM MT4 TO MT5. THE PARAMETERS OF THE CONVERTED EXPERT ADVISOR MUST BE EXACTLY THE SAME AS THE ORIGINAL EA, IT MUST NOT BE MODIFIED. I WILL GIVE THE SOURCE CODE OF THE MT4 EXPERT ADVISOR
Hi there, I am looking for someone that would be interested in some more work. I do have a lot of work going on and could use help of some developers. I normally pay between 20-50 USD per job depending on complexity. It can be simple as RSI/MA EAs, grids, licensing system (remote ones) or more advanced jobs. But in general I do get a lot of straight forward job. If anyone is interested please do let me know. I am

Informações sobre o projeto

Orçamento
30 - 40 USD
Desenvolvedor
27 - 36 USD