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
why interfere in an already productive discussion
The developers don't want to scare us off in case we find something interesting for them... :)
why interfere in an already productive discussion
For the following reasons:
1. To say, guys, we acknowledge (or not) that there is a problem and we will treat it.
2. To say, Quark (and Composter, since he reproduced the error on his EA), we looked at your code, the error is in it, treat so-and-so.
Otherwise it turns out you are not interested. Have fun, kids...
I will repeat my arguments:
1. Orders to open and close positions sometimes return errors.
2. These error codes have nothing to do with real life (e.g. "wrong price", even though the price is correct).
3. By repeating the attempt with the same parameters you can make the system accept the order. But nowhere in your manual does it say that the same order must be opened (closed) in a loop with error checking at each step and output to a file for later manual checking.
4. Sometimes error codes are not returned, i.e. the program behaves as if the operation was successful. But it fails.
5. Most importantly. Since the problem occurs when communicating with the demo server (Alpari, in my case), it is very likely that having found a workaround now, on the demo, we will find ourselves in the same situation again when we go to the real one. And then we will have to pay for debugging again. With your own money.
6. This is NOT a local problem of one expert. I argue that all, or at least many EAs, may simply not catch it, as there is no error catching system attached to my EAs. Hence, it follows that optimization can NOT be transferred to real, because orders will not be opened and closed in the same way and not always. It follows that people will be wasting time and money.
7. I don't really believe this is an EA problem. Point out where it is, if I am wrong. You can change the expert's logic, it's not about logic.
Here.
Roche, here are the logs for today, with an in-cycle delay after OrderSend and OrderClose of 10000ms. It seems to remove suspicions of a conflict due to timing and context (which shouldn't be there anyway):
Attempting to close short position, ticket: 1827283
9.9.2005 10:13:20 Order with this ticket still present, trying again
9.9.2005 10:13:48 No more orders with this ticket No
On second try :(
9.9.2005 0:14:54 Trying to buy, attempt 0
Bid: 1.24490000, StopLoss: 0.00700000, TakeProfit: 0.00000000 failed, error 6
9.9.2005 0:15:4 Trying to buy, attempt 1
Bid: 1.24470000, StopLoss: 0.00700000, TakeProfit: 0.00000000 successfull
On second try :(
9.9.2005 13:0:22 Trying to buy, attempt 0
Bid: 1.23900000, StopLoss: 0.00600000, TakeProfit: 0.00000000 failed, error 6
9.9.2005 13:0:48 Trying to buy, attempt 1
Bid: 1.23900000, StopLoss: 0.00600000, TakeProfit: 0.00000000 successfull
On second try :(
Pause failed...
Please note, that error 6 (the most informative one in the world) appeared only at buying, at closing there was no error. True, there was a ping error in the log, but the expert doesn't know about it...
They say if a person is talking to God, that's fine. But if God starts answering, that's a problem :) But I'm glad anyway :)
Just a reminder that the Expert Advisor will not trade on 5-minute trades by default. There's a clock coded in there, you have to change it.
Also I have no idea how easy it is to catch this on 5 minutes. Also :) if testing as you described, cycles should be disallowed as they are designed to dampen the error. There will of course be an entry in the logs, but it may be too late to push the button.
Finally, I guess, we can add the same logic (call of my functions instead of OrderSend and OrderClose) to other EAs. For the sake of consistency. I think I'll be able to catch something too.
Good luck,
Quark
send it to me. that's what we're catching
I would like to emphasize that this code does not depend on any conditions, except for triggering of the second of two pending orders. Therefore, this code was called again an hour later (I was out of my home) and the pending order was deleted. The alert message persisted.
So, the system worked this time, without restarting the terminal. I do not exclude that other cases (with urgent orders) also result from temporary terminal shutdown.
This agrees with the fact that repeating the operation request in the loop, you may succeed at the second, third and so on.
Your expert has opened a position =)))
All 8 have been hovering on the watch for a long time and no one is trading... And now at 15:00 on Alpari a position opened. Is this normal?)
All 8 have been hovering on the watch for a long time and no one is trading... And then at 3pm Alpari opened a position. Is this normal?)
It opened for me too, and at 15 :)
The previous position, also successfully, was opened on USDCAD 23.08.
Actually, it is a good Expert Advisor, and it does not fail most of the time. So does any other one. Judging by the logs, it is not the trading logic but the fact. Therefore, you can rewrite the Expert Advisor, for example, to reverse positions every hour - it will generate more trades :) And there will be more failures too.
This EA is just an example to give to developers. Otherwise they all fail from time to time. And you, too, as I understand it, so it's not because of our code...