FileWrite data incomplete...

 

I have the following command in an EA. The EA is running on nine separate windows. The output of each is directed to its own file.


FileWrite(handle,Symbol(),ticket,ordertype,TimeToStr(OrderOpenTime(),TIME_DATE|TIME_SECONDS),

TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS),GlobalVariableGet(Symbol()+"...entryflag"),
profitexit, DoubleToStr(GlobalVariableGet(Symbol()+"...minprofit"),2),

DoubleToStr(GlobalVariableGet(Symbol()+"...maxprofit"),2),DoubleToStr(profit,2));


When the failure occurs, the first few letters of the first field, which is the pair symbol are missing. Can anyone see anything wrong with the command string. Thank you.


EURUSD|10020502|0|2009.06.05 21:43:50|2009.06.05 22:23:29|3|20|-27.00|21.00|9.00
RUSD|10020173|2009.06.05 21:40:11|2009.06.05 21:43:42|3|20|-9.00|24.00|15.00


It gets even more strange. After displaying the file several more time with Notepad, I have the result shown below.


EURUSD|10024539|buy|2009.06.05 22:45:14|2009.06.05 22:51:16|4|31|-30.00|0.00|-30.00
D|10020173|2009.06.05 21:40:11|2009.06.05 21:43:42|3|20|-9.00|24.00|15.00

 
Could you show the whole code from open the file to close.
 
Roger:
Could you show the whole code from open the file to close.

May have found the problem. I had duplicated the original FileOpen code block with the intention of changing it to open to open another file. Got side-tracked and never return to complete the change. I had two FileOpens using the same handle. Thanks for your reply. Caused me to go back and look at it.

Reason: