Trying to export tickdata during trades ONLY, for further analysis in excel:
I have written an ea, so when an position is taken, i want every tick or 1 minutebar-low to be exported inte an document.
I have never used the file-commands before, but I gave it a try:
The problem is that with this i don't get a file at all. I shuold be placed in the experts-folder, right?
Am I on the right track, or is my code really fucked up?
Thanks in advance,
Johan
I have written an ea, so when an position is taken, i want every tick or 1 minutebar-low to be exported inte an document.
I have never used the file-commands before, but I gave it a try:
Inserted Code
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) { int handle=FileOpen("Breakout-export.csv",FILE_WRITE|FILE_CSV,"\t"); if(handle>0){ // write header FileWrite(handle,OrderSymbol(),OrderTicket(),Bid); FileClose(handle); }}
The problem is that with this i don't get a file at all. I shuold be placed in the experts-folder, right?
Am I on the right track, or is my code really fucked up?
Thanks in advance,
Johan