handle=FileOpen("Pivots", FILE_CSV|FILE_WRITE|FILE_READ, ';');
Dear Stringo,
No luck! I still get a single row of values written in my output file...here is the code...
Edited: 03 Feb 06 to make the thread more presentable...
No luck! I still get a single row of values written in my output file...here is the code...
//Write to the file - by default, all files are stored in metatrader 4\tester\Files directory handle=FileOpen("Pivots", FILE_CSV|FILE_WRITE|FILE_READ, ';'); if(handle>0) { // write table columns headers FileWrite(handle, "Time;High;Low;Close;Pivot;R1;R2;R3;S1;S2;S3"); // write data FileWrite(handle, Time[1], High[1], Low[1], Close[1],Pivot, R1, R2, R3, S1, S2, S3) ; FileClose(handle); } //Print("High=",YH," Low=",YL," Close=",YC," Pivot=",Pivot," R1=",R1," R2=",R2," R3=",R3," S1=",S1," S2=",S2," S3=",S3); return(0); }
Edited: 03 Feb 06 to make the thread more presentable...
use fileseek(handle,0,seek_end) right after you open the file for edit. before writing
the new line to ti
Bottom of page http://www.metaquotes.net/experts/articles/feat_expert
Aaha!
This works....also, thanks for the link! Back to coding now... :)
This works....also, thanks for the link! Back to coding now... :)
Maratha:
Hi,
I tried the FileWrite function and it works, but it writes only one line...how do I use it in 'append' mode so the output file can store the complete history of EA run in backtesting? I'm attaching my code below...
Hi,
I tried the FileWrite function and it works, but it writes only one line...how do I use it in 'append' mode so the output file can store the complete history of EA run in backtesting? I'm attaching my code below...
handle=FileOpen("Pivots", FILE_CSV|FILE_WRITE, ';'); if(handle>0) { // write table columns headers FileWrite(handle, "Time;High;Low;Close;Pivot;R1;R2;R3;S1;S2;S3"); // write data FileWrite(handle, Time[1], High[1], Low[1], Close[1],Pivot, R1, R2, R3, S1, S2, S3) ; FileClose(handle); }
Dear,
I realy need your help, since I am trying to do exactly what you are doing, I am looking for away to write the complete history of the EA run in backtesting into a file , the reason is that i want to add more studies during the backtesting. so this way i can have a full table of entries exits and MAE and MFE.
Please help, I wanted to know how and where I can place such code in my EA or is it only a script?
plesese reply ...
thank you
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I tried the FileWrite function and it works, but it writes only one line...how do I use it in 'append' mode so the output file can store the complete history of EA run in backtesting? I'm attaching my code below...