MQL4 Script: Fetch a CSV value from a URL

MQL4 Script

Specifiche

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.

 

 

  

 

  

Con risposta

1
Sviluppatore 1
Valutazioni
(26)
Progetti
34
29%
Arbitraggio
0
In ritardo
1
3%
Gratuito
2
Sviluppatore 2
Valutazioni
(564)
Progetti
844
73%
Arbitraggio
15
53% / 13%
In ritardo
193
23%
Gratuito
3
Sviluppatore 3
Valutazioni
(26)
Progetti
29
3%
Arbitraggio
11
9% / 73%
In ritardo
3
10%
Gratuito
Pubblicati: 1 codice
4
Sviluppatore 4
Valutazioni
(845)
Progetti
1446
72%
Arbitraggio
119
29% / 47%
In ritardo
355
25%
In elaborazione
Pubblicati: 3 articoli
5
Sviluppatore 5
Valutazioni
(66)
Progetti
95
28%
Arbitraggio
20
25% / 55%
In ritardo
24
25%
Gratuito
6
Sviluppatore 6
Valutazioni
(47)
Progetti
140
49%
Arbitraggio
9
56% / 0%
In ritardo
27
19%
Gratuito
7
Sviluppatore 7
Valutazioni
(28)
Progetti
36
17%
Arbitraggio
5
20% / 40%
In ritardo
17
47%
Gratuito
Pubblicati: 5 codici
8
Sviluppatore 8
Valutazioni
(49)
Progetti
134
27%
Arbitraggio
62
13% / 53%
In ritardo
58
43%
Gratuito
Pubblicati: 273 articoli, 1 codice
9
Sviluppatore 9
Valutazioni
(1)
Progetti
4
25%
Arbitraggio
1
0% / 100%
In ritardo
1
25%
Gratuito
Pubblicati: 6 codici
10
Sviluppatore 10
Valutazioni
(64)
Progetti
144
46%
Arbitraggio
19
42% / 16%
In ritardo
32
22%
Gratuito
11
Sviluppatore 11
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito

Informazioni sul progetto

Budget
40 - 50 USD
Scadenze
da 1 a 2 giorno(i)