MT4 has functions for writing CSV or Binary files.
You could add file writing to indicator code...
Or...
Write a script/indicator using iCustom() calls to get indicator values and write to a file
OK. I made my script and in C:\Programs\FXDD - MetaTrader 4\experts\files I expected
to find several csv...
Assuming that every script like this below - or more complex - is rightly to output one or more files into the directory above...
----------------------------------------
int start()
{
int handle;
datetime orderOpen=OrderOpenTime();
handle=FileOpen("filename.csv", FILE_WRITE|FILE_CSV);
if(handle>0)
{
FileWrite(handle, Close[1], Open[0], High[0], Low[0], TimeToStr(orderOpen));
FileClose(handle);
}
return(0);
}
----------------------------------------
... why nothing happens, neither there nor in different folders?
Thanks,
SA
Do you get an error?
Your file writing code works fine here.
Do you get an error?
Your file writing code works fine here.
The fact is:
- I have my C:\Programs\FXDD - MetaTrader 4\experts\files folder empty;
- I launch the script;
- No compiling errors;
- My C:\Programs\FXDD - MetaTrader 4\experts\files folder is still empty;
- In the "Experts" terminal page I found " 'test' ( - my script - ) is compiling" even after a lot of time;
- So I tried to restart the platform but... terminal.exe did not even open and did slow down pc as if there were heavy pendent processes.
I must plan to reinstall the platform,
Replies are always very appreciated.
SA
Do you get an error?
Your file writing code works fine here.
The fact is:
- I have my C:\Programs\FXDD - MetaTrader 4\experts\files folder empty;
- I launch the script;
- No compiling errors;
- My C:\Programs\FXDD - MetaTrader 4\experts\files folder is still empty;
- In the "Experts" terminal page I found " 'test' ( - my script - ) is compiling" even after a lot of time;
- So I tried to restart the platform but... terminal.exe did not even open and did slow down pc as if there were heavy pendent processes.
I must plan to reinstall the platform,
Replies are always very appreciated.
SA
OK. I found it. I realized the only way to make the script work is to drag and drop to Graph...
Thanks a lot.
SA
Hi,
DDE or whatever. Is There a protocol for obteining the same as for historical quotes (History Centre): that is to say, downloading indicator output bar-by-bar?
Thank you so much,
SA
MT4 build 200 has been ready with historical data dowloader. You may find on Menu-Tool-Historical data. Just export to CSV file.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
DDE or whatever. Is There a protocol for obteining the same as for historical quotes (History Centre): that is to say, downloading indicator output bar-by-bar?
Thank you so much,
SA