MQL4 Script: Fetch a CSV value from a URL

MQL4 스크립트

명시

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.

 

 

  

 

  

응답함

1
개발자 1
등급
(26)
프로젝트
34
29%
중재
0
기한 초과
1
3%
무료
2
개발자 2
등급
(550)
프로젝트
829
73%
중재
15
53% / 13%
기한 초과
193
23%
작업중
3
개발자 3
등급
(26)
프로젝트
29
3%
중재
11
9% / 73%
기한 초과
3
10%
무료
4
개발자 4
등급
(812)
프로젝트
1389
72%
중재
114
29% / 47%
기한 초과
344
25%
작업중
5
개발자 5
등급
(66)
프로젝트
95
28%
중재
20
25% / 55%
기한 초과
24
25%
무료
6
개발자 6
등급
(47)
프로젝트
140
49%
중재
9
56% / 0%
기한 초과
27
19%
무료
7
개발자 7
등급
(28)
프로젝트
36
17%
중재
5
20% / 40%
기한 초과
17
47%
무료
8
개발자 8
등급
(49)
프로젝트
134
27%
중재
62
13% / 53%
기한 초과
58
43%
무료
9
개발자 9
등급
(1)
프로젝트
4
25%
중재
1
0% / 100%
기한 초과
1
25%
무료
10
개발자 10
등급
(62)
프로젝트
140
46%
중재
19
42% / 16%
기한 초과
32
23%
무료
11
개발자 11
등급
(1)
프로젝트
1
0%
중재
1
0% / 100%
기한 초과
0
무료
비슷한 주문
I currently have a Forex trading script in .txt format that I want to be converted to a functional/working robot (in .mq4), without altering the strategy of the script. The strategy of the script is already in and shouldn't be changed unless with mutual understanding

프로젝트 정보

예산
40 - 50 USD
개발자에게
36 - 45 USD
기한
에서 1  2 일