int TotalBars; int Handle; string Val; if(TotalBars<Bars) Handle= FileOpen("E.txt",FILE_READ | FILE_WRITE,';'); if(Handle>0) { FileWrite(Handle," High"," Low"," Open"," Close"); //example for(int i = 1; i < Bars; i++){ FileWrite(Handle,High[i], Low[i],Open[i],Close[i]); } }
Thank you for your great help. It recorded all the history.
double Value = High[0]-High[1]; int Handle; Handle= FileOpen("E.txt",FILE_READ | FILE_WRITE,';'); if(Handle>0) { FileWrite(Handle," Values List"); FileWrite(Handle,Value); } }
Question: How can I modify the code that the Values not to be overwritten but
be written in one column? Thank You.
double Value = High[0]-High[1]; int Handle; Handle= FileOpen("E.txt",FILE_READ | FILE_WRITE,';'); if(Handle>0) { FileSeek(handle, 0, SEEK_END); // add the data to the end of the file FileWrite(Handle," Values List"); FileWrite(Handle,Value); }Use FileSeek and Seek to the dn before writing your data to the file.
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 need help to write second etc. lines of values.
Just what to be added to the code?
Thanks a lot.