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
2005.08.11 11:07:12 TradeDispatcher: all trade context is busy
I have unplugged this EA and will see what happens next.
Here it is. This is it. Here we go. 139 is locked. By whom, why - it's not clear. Then there will be 2, 6, and so on.
What is the most disappointing, there is nothing in this EA that sets it apart from others. So, either I cannot see this "something", or any Expert Advisor may be glitchy, it just may not trigger every hour and, therefore, not everyone has noticed it.
Consequently, my question to everyone - do you have such entries in your logs?
Rosh, do you use Alpari? If so, a question for Alpari - is your server working properly?
What I found out tonight :(
1. The Expert Advisor works by itself, ONE, and either does not give errors or gives them so rarely that overnight is not enough for that.
2. In combination with several other Expert Advisors (more precisely, with one, for six currencies), the error was reproduced, though not in an hour, but in 4 hours.
What follows from this?
1. There is some bug in MT (or in my Expert Advisor, but it is so simple that it is unlikely), which sometimes does not allow me to open trades. And close them too, by the way.
Of course, you can bypass it:
I don't have to tell you that this is a VERY bad programming style and it may offend the broker...
2. I have now rewritten the Expert Advisor to make it simpler, while at the same time causing an error. I will post it in the next few hours. If it appears the error will require two Expert Advisors, what can I do, I will post two :)
and we will check
Alert and blocking times are the same . I haven't looked at the EA code at all.
How to use it: for each currency (EURUSD, EURJPY, USDCHF, GBPUSD, GBPJPY,
GBPCHF, USDJPY, AUDUSD, EURGBP, USDCAD, EURCHF, EURAUD) open an hourly chart.
Each chart has an Expert Advisor. They do not interact, as they all have different charts.
Positions will be opened right away, one per chart. At the beginning of the next hour, the positions will have to be reversed, and so on.
I have had 2 errors pop up at a time, so in principle it is possible to have to wait for 2 hours.
If you have a special relationship with the trading server, it's probably better to use a regular account for the test. I use Alpari.
Also note (I assume this is an independent bug) the position of the position opening arrows. In theory, since the position opens on a new bar, the arrow should be on the same bar.
Finally, if you do not want to wait an hour, open the minute charts. The error is reproducible.
Once again, we are talking about error 139. At the same time, I haven't managed to get error 2 and 6 with this method yet. And they have mostly been before. So I guess there will be more posts.
Alert and blocking times are the same . I haven't looked at the EA code at all.
That would be fine, but I introduced alerts after noticing that trades aren't being executed. Also, the alert is in the code right after OrderSend.
Now I'm going to try switching to Print, but I doubt it...
Put Print instead of Alert to check Rosh's assumption. Alas, the whole difference is that error message 139 now appears in the log and not on the screen.
And the thing is not clear:
2005.08.11 13:08:12 '18708' : close order #680413 buy 0.10 EURUSD at 1.2385 sl: 0.0000 tp: 0.0000 at price 1.2408
and then
2005.08.11 13:08:13 '18708': order #680413 buy 0.10 EURUSD at 1.2385 sl: 1.2275 tp: 0.0000 closed at price 1.2408
In other words, at first the order goes without any stops and takeprofit, and then suddenly a stop loss appears in the order
And the thing is not clear:
2005.08.11 13:08:12 '18708' : close order #680413 buy 0.10 EURUSD at 1.2385 sl: 0.0000 tp: 0.0000 at price 1.2408
and then
2005.08.11 13:08:13 '18708': order #680413 buy 0.10 EURUSD at 1.2385 sl: 1.2275 tp: 0.0000 closed at price 1.2408
In other words, at first the order goes without any stops and takeprofit, and then suddenly a stop loss appears in the order
If you have a tested piece of code, I'd love to see "via Bars" :)
As for the zero stop - I've assigned it in init, and I don't change it anywhere else. Bug, I guess. Man, ever since I abandoned C++ I didn't think I'd have to do entomology again.
In fact, well an expert, alright. But it's so simple, that a question arises: isn't there a danger that other EAs would behave the same way? Considering that the bug only appears when there are a lot of Expert Advisors, and it produces different errors.
For example, I have an Expert Advisor using MACD + ADX + Stochastic. Having tested it with a tester (where there are no server errors by definition), will the programmer just sit and check the question "all conditions are fulfilled here but the trade is not closed"? Probably won't... Dangerous bug.
If you have a tested piece of code, I'd love to see "via Bars" :)
For example, like this:
What is SetTrace?