
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
WHRoeder:
Invalid last argument - not an int
Could you please elaborate on what you mean?
While the documentation (see FileOpen()) shows the delimiter being enclosed in single quotation marks, the book (see File Operations) is inconsistent regarding the use of single quotation marks: some of the code examples show the use of the double quotation marks.
Additionally, the following code:
compiled, did not have any runtime errors, and produced the following output in the file:
Sorry, "parts" . . . do you get the **** END TICK USDCHF **** message ? or does it end before that ?
Yes, the file is complete.
You have ";" not ';' . . . the error message you received talked about parameter 1, isn't that the file handle ?
Yes, someone else was talkin gabout invalid last parameter, I don't know why. Still I changed ";" for ';' but got the same problem.
Could you please elaborate on what you mean?
While the documentation (see FileOpen()) shows the delimiter being enclosed in single quotation marks, the book (see File Operations) is inconsistent regarding the use of single quotation marks: some of the code examples show the use of the double quotation marks.
Additionally, the following code:
compiled, did not have any runtime errors, and produced the following output in the file:
I tried ";" and ';' got the same problem.
My code runs and works great, the file is created and every tick the file is opened, all the info is written into it and then the file is closed. All works great until the EA opens an order, then nothing is written on the file.
The first is a string, the second is an int (as required.) The error mentioned p 1. Multiple problems?
The error is the file handle, the handle is always 1 and always works, but when the EA opens an order, the next tick it says Handle is invalid even though it is 1 again and has worked for the last hundreds of ticks. The last time I tried it handle started going up when the order opened, it became 2, 3, 4, etc.
It's the exact same code, I don't know why it doesn't stay as 1, and even when it's still 1 it still gives the error.
Any idea guys?
I can't see an issue with the code you have posted.
So I see 2 options :
I can't see an issue with the code you have posted.
So I see 2 options :
Thank you RaptorUK, I had already created an EA that replicates the issue exactly to try and fix the problem. Basically it starts, it creates the file them each tick it writs on the file counting the ticks. So the file is like tick 1, tick 2, etc.
On tick 15 it opens an order, the order info appears in the file and the end (******) also appears. After that it's supposed to write in each tick the tick number (16, 17, etc) and the status of the order, meaning if the order is still opened or not. For some reason after tick 15 the EA doesn't write on the file.
At tick 50 it's supposed to close the order but that's not important, what's important is that it keeps writing on the file when it opens the order.
In my Windows 7 machine the files are created in C:\Users\{username}\AppData\Local\VirtualStore\Program Files (x86)\SIGTrader 4\experts\files
Appdata is a hidden folder.
Thanks in advance
Code:
Thank you RaptorUK, I had already created an EA that replicates the issue exactly to try and fix the problem. Basically it starts, it creates the file them each tick it writs on the file counting the ticks. So the file is like tick 1, tick 2, etc.
On tick 15 it opens an order, the order info appears in the file and the end (******) also appears. After that it's supposed to write in each tick the tick number (16, 17, etc) and the status of the order, meaning if the order is still opened or not. For some reason after tick 15 the EA doesn't write on the file.
At tick 50 it's supposed to close the order but that's not important, what's important is that it keeps writing on the file when it opens the order.
In my Windows 7 machine the files are created in C:\Users\{username}\AppData\Local\VirtualStore\Program Files (x86)\SIGTrader 4\experts\files
Appdata is a hidden folder.
Thanks in advance
Code: