try to change this:
to
handle=FileOpen(filename, FILE_BIN|FILE_READ|FILE_WRITE); FileWrite(handle,"Symbol","Time"); if(handle<1) { Print("can't open file error-",GetLastError()); return; }
to
handle=FileOpen(filename, FILE_TXT|FILE_WRITE); if(handle == INVALID_HANDLE) { Print("can't open file error-",GetLastError()); return; } FileWrite(handle,"Symbol","Time");Good luck.

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 am trying to write SMA to file but it doesn't write to file. Can someone please tell me what I am doing wrong here..Thanks a lot in advance