Request to Metaquotes to find a better solution. - page 2

 
Ok, tradermaji

Let's look what happened 2 years ago
There was MT 3.XX client terminal and MQL II. MQL II is language for "lazy programming by the traders".
We've received masses of questions and requests like:
- How can I control opening, closing, modifying of my positions?
- Why cannot I process more than one trade operation per one EA launch?
- What is asinchronous trade operation and what is trade thread?
- Which of my 5 EAs processes trading operation succesfully?
- My EA cannot open order with different symbol name.
- I need to access to other timeframes.
- Why does not my EA work more than 1000 milliseconds? I can prevent infinite loop myself.
etc., etc.
Traders wrote simple EAs first and then exploited them. And then such problems (questions, requests, etc.) arose.
We cannot fully undertake solving of problems like yours since it will then be a "black box with unknown contents".

There can be a quite non-complicate solution in situations like yours.
there can be a set of functions, in which the proper error handling is programmed, that are incapsulated in a template to be applied to creation of an EA in MetaEditor.
I believe this set of functions to be made soon.
 
During my 2,5 years of MT programming, I learnt that all of my problems have been caused by false logic/false programming and broker issues.
As my experience grew, things got clearer and I always realized, what my problem really was. Sometimes it took weeks, but sooner or later I understood how that particular thing really works, and I could work out a solution quickly after.

tradermaji: What interesting is, that you had a problem, which I had a solution for, I could have helped you with that, because as many things else, it wasn't platform error, but non-understanding. But it is easier to blame someone else again. ..

Sorry that I got into discussing this on a support forum, but it annoys me somehow.
 

Zap,

I am not sorry that this discussion in annoying you. It is upto you let things annoy or not annoy you. If you want to help, then go ahead and post the workaround, don't put preconditions.

Stringo,

Thank you for your reply. If you have a tradecontext busy error for a long time, you cannot place your order as intended and have to modify the order. I have to modify the orders to place it or risk it being rejected. I don't like this idea. I want to place the trades and not have to modify them because another EA is placing trades at that time. That should not be a bottleneck. Do you have a workaround to my problem? I do not want to modify my orders and want them to go through.

 
tradermaji wrote:

... tradecontext busy error


Is the limitation here that a single platform can only perform one transaction at a time? That's my assumption since you effectively have a "trade context busy" situation when you manually enter an order, and it hasn't come back with the "done" dialog box. So, is it possible to allow a single trading platform to have more simultaneous transactions? Perhaps as few as 6 would be enough to "widen the pipe" enough that conflicts would be rare. This would allow manual trading while EAs traded in the background, single EAs to place orders faster, and multiple EAs on multiple charts to place those orders without interferring with each other.

Does the architecture upon which MT4 runs (server side and platform side) allow such a change to the transactions allowed? Can it possibly support multiple transactions in parallel? if so, can the interface be adjusted to allow programmers to take advantage of that? Perhaps a special condition would have to be activated, but it would seem a possible solution that would help mitigate one of the more frustrating errors faced by programmers, and would be an improvement over the workarounds that have already been programmed (trapping, re-submitting, etc.).

I suppose the question is, what's the essential limitation on parallel order processing? And is that limitation surmountable (hardware, server side software, platform side software) in the near future?

Спасибо
-Matt
 
Thank you Matt for rephrasing my question the right way. :)
 
Interesting. I can't say I've done much trading, but I would have thought it obvious that the market situation after an order is processed is different from the situation before it is processed, regardless of how fast it is processed. Buyers and sellers all observe and reason in parallel from a common 'start situation', and arrive at their intentions of particular trades in parallel, but only one (or the other) of those parallel intended trades can be effectuated at any one time, as it creates a new situation. It would be quite a peculiar market to allow all those intentions be effectuated in parallel, and create parallel market situations.

So, obvioulsy, orders have to be processed one at a time. Equally obvious, order processing takes some amount of time. Equally obvious, there is therefore always a risk that 'my' order action gets held up a certain amount of time.

You might then ask: Should my EA need to know that an order processing might be delayed?
You might also ask: Should I be in control of which kind of market change and delay timing are significant for my order action?

To me, those are really the same question, and to me, there's a simple answer. Which does not involve MetaQuotes changing their product. Then, of course, one can always kindly propose product extensions to support my own particular habits in EA programming.
 
Ok, guys. I see.

Some info for introducing
Trade context is just a separate thread in computer terms. Client terminal can work with 3 (three) trade contexts (separate threads) simultaneously:
- thread for manual trading
- thread for automatical trailing stops
- thread for experts' trading
These are special threads, ie "manual" thread cannot be used for experts' trading.

Thread for experts' trading is one for all experts. This is deliberate limitation.
There is no problem to permit 2,3,6,100 additional threads for experts' trading. But let's think about whole system, about broker in the first place. No broker agrees to process masses of requests. Broker capacity should be coordinated with traders' capacities.

We make the whole trade system and the client terminal is just one part of system.
Only one thread for experts' trading is our deliberate limitation.
 

Thank you Stringo for your clarification. For better (for the brokers) or for worse (for the traders) you have crippled your system. It is a painful and irritating disability and is a disgrace to your otherwise great program. Perhaps you will reconsider and maybe allow the EA to use the manual thread, if no manual trade is being used. Atleast, two will be better than one.

Zap, now do you see why I am irritated? Hope this helps you to get less annoying. It is a platform limitation and not a misunderstanding on my part. You were too fast to jump to conclusions. Anyway, if you have workarounds, please post it.

Thanks guys for the refreshing debate and info.

 

What I said was, that it was brokerside error, and Slawa told the same: "No broker agrees to process masses of requests"
I also experienced this with IBFX, and needed to rewrite my EA to handle this type of situation. Later - because of IBFX's everchanging policy - I needed to look for another broker. My EA basically does the same what it always has done, but with far less error messages (for example I haven't seen trade context is busy any more). Of course, I cannot give specific solutions, since I haven't seen your EA. Mine always checks before and after opening/closing positions

 
Thanks Zap.
Reason: