A smart way for filling an array ?

 

Hello,

I'm a newbie in MQL4, and a quite bad developper in other languages ;-)

I have to fill an array with the datas of the financials announcements.

The only way i found is that :

Evenement[0][0]="2010.09.21 18:15";
Evenement[0][1]="USD";
Evenement[0][2]="Déclaration de la FOMC";

Evenement[1][0]="2010.09.21 18:15";
Evenement[1][1]="USD";
Evenement[1][2]="Relevé taux d intérêt";

Evenement[2][0]="2010.09.23 12:30";
Evenement[2][1]="USD";
Evenement[2][2]="Unemployment Claims";

It works, but it's very hard to write and modifiy !

Is it possible to fill an array from a text file or a CSV like that :

2010.09.21 18:15;USD;Déclaration de la FOMC;

2010.09.21 18:15;USD;Relevé taux d intérêt;

2010.09.23 12:30;USD;Unemployment Claims;

It will be a great help, thank you if you can.

Bye

Vincent

 

its also possible to automatically extract the date from a website ;)

maybe you find what you need in this source code: http://www.forexfactory.com/showthread.php?t=19293

 
zzuegg:

its also possible to automatically extract the date from a website ;)

maybe you find what you need in this source code: https://www.mql5.com/go?link=https://www.forexfactory.com/showthread.php?t=19293


Thank you zzueg, the thing is interesting.

But I prefer extracting data from a text or CSV file (even if I dont know how ;-) for 2 reasons :

- my trading system is independant of a website (end of the site, crash of the server, change in the HTML code ???)

- I can do backtests when I want

Thanks & bye

Vincent

 

Hello,

I found the solution in the article "Interaction between MetaTrader 4 and Matlab via CSV Files " in this web site.

Thanks, guys, your work is great !

Bye

Vincent

Reason: