MQL4 Script: Fetch a CSV value from a URL

MQL4 Scripts

Termos de Referência

I need a script which fetches a value from a website URL, and then makes that fetched value available within the script to be compared against another manually typed in value. 

The value is found here:

https://www.quandl.com/data/FRED/PAYEMS-All-Employees-Total-nonfarm

 

The value can be fetched using the below URL:  

https://www.quandl.com/api/v3/datasets/FRED/PAYEMS.csv?exclude_column_names=true&rows=1&api_key=my_api_key

 A value of 2016-08-01, 144598.0 is returned. 

 

Once the value of [2016-08-01, 144598.0] has been fetched from the URL, I need to be able to compare it against another number which I will manually type in. 

I will be comparing the values using if and else statements, which would look something like this: 

 

void OnStart()
{

... //  code which fetches the value of 2016-08-01, 144598.0 from the .csv URL

double x = 155876.0     // value manually TYPED IN by myself
       y = 144598.0     // VALUE FETCHED FROM THE .CSV URL
                        // ignore column 1 consisting of 2016-08-01
   if ( x > y ) {

                        // executes code which I have already written

} 

else { 

                        // execute other code which I have already written

}

}


Ideally, if anyone can make it so that the date column of [2016-08-01] was ignored, that would be helpful as I only want to compare the numerical value of [144598.0] with another typed in value.

 

 

  

 

  

Respondido

1
Desenvolvedor 1
Classificação
(26)
Projetos
34
29%
Arbitragem
0
Expirado
1
3%
Livre
2
Desenvolvedor 2
Classificação
(564)
Projetos
844
73%
Arbitragem
15
53% / 13%
Expirado
193
23%
Livre
3
Desenvolvedor 3
Classificação
(26)
Projetos
29
3%
Arbitragem
11
9% / 73%
Expirado
3
10%
Livre
Publicou: 1 código
4
Desenvolvedor 4
Classificação
(845)
Projetos
1446
72%
Arbitragem
119
29% / 47%
Expirado
355
25%
Trabalhando
Publicou: 3 artigos
5
Desenvolvedor 5
Classificação
(66)
Projetos
95
28%
Arbitragem
20
25% / 55%
Expirado
24
25%
Livre
6
Desenvolvedor 6
Classificação
(47)
Projetos
140
49%
Arbitragem
9
56% / 0%
Expirado
27
19%
Livre
7
Desenvolvedor 7
Classificação
(28)
Projetos
36
17%
Arbitragem
5
20% / 40%
Expirado
17
47%
Livre
Publicou: 5 códigos
8
Desenvolvedor 8
Classificação
(49)
Projetos
134
27%
Arbitragem
62
13% / 53%
Expirado
58
43%
Livre
Publicou: 273 artigos, 1 código
9
Desenvolvedor 9
Classificação
(1)
Projetos
4
25%
Arbitragem
1
0% / 100%
Expirado
1
25%
Livre
Publicou: 6 códigos
10
Desenvolvedor 10
Classificação
(64)
Projetos
144
46%
Arbitragem
19
42% / 16%
Expirado
32
22%
Livre
11
Desenvolvedor 11
Classificação
(1)
Projetos
1
0%
Arbitragem
1
0% / 100%
Expirado
0
Livre

Informações sobre o projeto

Orçamento
40 - 50 USD
Prazo
de 1 para 2 dias