MQL4 Script: Fetch a CSV value from a URL

MQL4 Sripts

Tarea técnica

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.

 

 

  

 

  

Han respondido

1
Desarrollador 1
Evaluación
(26)
Proyectos
34
29%
Arbitraje
0
Caducado
1
3%
Libre
2
Desarrollador 2
Evaluación
(564)
Proyectos
844
73%
Arbitraje
15
53% / 13%
Caducado
193
23%
Libre
3
Desarrollador 3
Evaluación
(26)
Proyectos
29
3%
Arbitraje
11
9% / 73%
Caducado
3
10%
Libre
Ha publicado: 1 ejemplo
4
Desarrollador 4
Evaluación
(845)
Proyectos
1446
72%
Arbitraje
119
29% / 47%
Caducado
355
25%
Trabaja
Ha publicado: 3 artículos
5
Desarrollador 5
Evaluación
(66)
Proyectos
95
28%
Arbitraje
20
25% / 55%
Caducado
24
25%
Libre
6
Desarrollador 6
Evaluación
(47)
Proyectos
140
49%
Arbitraje
9
56% / 0%
Caducado
27
19%
Libre
7
Desarrollador 7
Evaluación
(28)
Proyectos
36
17%
Arbitraje
5
20% / 40%
Caducado
17
47%
Libre
Ha publicado: 5 ejemplos
8
Desarrollador 8
Evaluación
(49)
Proyectos
134
27%
Arbitraje
62
13% / 53%
Caducado
58
43%
Libre
Ha publicado: 273 artículos, 1 ejemplo
9
Desarrollador 9
Evaluación
(1)
Proyectos
4
25%
Arbitraje
1
0% / 100%
Caducado
1
25%
Libre
Ha publicado: 6 ejemplos
10
Desarrollador 10
Evaluación
(64)
Proyectos
144
46%
Arbitraje
19
42% / 16%
Caducado
32
22%
Libre
11
Desarrollador 11
Evaluación
(1)
Proyectos
1
0%
Arbitraje
1
0% / 100%
Caducado
0
Libre

Información sobre el proyecto

Presupuesto
40 - 50 USD
Plazo límite de ejecución
de 1 a 2 día(s)