Errors, bugs, questions - page 2406

 
Igor Makanu:

SZY: I can't find the source code, and I didn't like the implementation - I saved market orders into an array and immediately after a partial closing ArrayBsearch() found an order which was absent in the array, i.e. a new ticket.

This is even less reliable variant, at least because several deals may be executed (opened/closed) in one moment.

There is no problem with the comment, and we don't need to wait until midnight for its change - we have traced the new ticket, saved it and work with it further.

 
fxsaber:

How can I see what the function returns in the debug?

I.e. I want to know what the value after return is.

To a separate variable.


fxsaber:

Can someone show us an EA where SELECT_BY_TICKET is used?

Already gave my example 2 times with the shelves, each holding unique information linked to a ticket which changes after triggering.
But this problem has long been solved, and judging by the lack of complaints, it only occurred to me and Ilya.

 
Andrey Khatimlianskii:

This is even less reliable, if only because several trades can be executed (open/close) at one moment.

There is no problem with the comment, and there is no need to wait until midnight to change it - you have tracked a new ticket, saved it, and continue working with it.

of course it can, but there is a specific model: traced tickets --> command for partial closing --> once again traced new tickets and then compare 2 arrays, we do it all on one tick, and the problem was semi-automatic trading, I doubt that many orders were handled

ZZY: I wrote above, but something guaranteed workable in this case, you can do only with individual magicians, it is enough only logic formation of the magician to think over

 
Igor Makanu:

ZS: I wrote above, but something guaranteed workable in this case can only be done with individual magicians, it is enough to think through the logic of magician formation

And what's there to think of, if that's what you decide to do - in parameters int magic_base, magic = magic_base + N, where N is a consecutive number of last open order. Basically, INT_MAX space is enough for many different magicians but this approach will not work for many different tricks such as magic_base trade analysis...

 
Andrey Khatimlianskii:

I've already given my example 2 times with the pending orders, each of which stores unique information linked to a ticket, which changes after it is triggered.

But this problem has long been solved and, judging by the lack of complaints, it only occurred to me and Ilya.

Could you give me the link, I can't remember at all, unfortunately.

 
Igor Makanu:

The only thing that can be guaranteed to work in this case is to do it with individual magicians, just think through the logic of the magician's formation

I don't quite get it, apparently. If there are orders with different mages, then you don't need to invent anything to keep track of them, because the mage does not change when partially executed.

 
fxsaber:

I don't quite get it, apparently. If there are orders with different magiks, then you don't need to invent anything to track them, because the magik does not change when partially executed.

Yes exactly, the order's magik never changes in MT4, neither in history, nor at swap, nor at partial close of the order,...

If i suggested to use order's comments then it would work in tester, but in real life i have to set it for my broker, servers that even when i open order they add additional info to comment, in same place i get swap once in a month when contract is expired and new entry in comments ... Well, the field for comment is not meant for industry, i don't know ... If i'll just use another comment, and it'll mean that i'll have to change it ... But i don't have to explain it ... If i want to keep it for real i.e. comment field is not designed for storing info however you want to convince me, and the fact that most brokers will add a comment to the "balance" of an order when partially closing it is a feature that will not necessarily work anywhere and anytime)))

 
Igor Makanu:

yes exactly, order's magik never changes in MT4, neither in history, nor at swap, nor at partial order closure,...

If i'm a real broker, then i don't want to trade server's comment, but i don't want to trade server's comment, i don't want to trade server's comment once a month when order would get opened, i don't want to swap and put new comment once a month, i just don't want to trade server's comment, and i just don't want to trade server's comment... i.e. if you try to convince me the comment field is not meant for storing such info and in case of partial closing most brokers will add a comment to "balance" of an order this is a good feature which will not necessarily work anywhere and all the time )))).

I don't see how the comment field is even remotely helpful at all. So, the market participant has a position with 100 lots. It is necessary to trail it. What has the comment field got to do with it, if it can't be changed?

 
fxsaber:

I don't see how the comment box is any help at all. So a person has a 100-lot pose. It needs to be trailed. What does the comment field have to do with it if we cannot change it?

If the order is partly closed, the server will write ( change ) its own information in the comments. Just in these screenshots, opened 0.10 lots, then closed 0.01 lot, the server itself has changed the comment field to "from # 223...".

here on this field "comment from # 223..." and MT4 algorithms of search for the rest of an order in the market are built by almost all Expert Advisors

HH: as an example, why search for "order left" - quite a demanded task: close part of an order and bring the rest of the order to breakeven (set stop loss on opening price of an order)

Files:
1.jpg  286 kb
2.jpg  356 kb
 
Igor Makanu:

PS: this topic is quite painful for me, when they advise to work with order comments - everything works in the tester, but I have to adjust it for specific broker, servers even at opening of order add the service information to the comment, once a month at the end of the contract will swap orders and new entry in the comments ... i.e. this is a comment field for storing data however you want to convince me, and the fact that most brokers will add a comment to "balance" of an order when it partly closes is a feature that won't work anywhere and all the time )))).

That's what I was talking about, many brokers on MT4 have different hc algorithms. So in this case you need to build an algorithm without relying on specific tickets... Or for a specific broker

The easiest way is if we need to close the order in parts, we should also open it in parts. Especially, if the opening is done with pending orders
Reason: