[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 343
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
There is a stack of pending orders on both sides. If any of the pending orders are triggered, then on the other side the outermost pending order is deleted. In the screenshot I showed what happens if a buy order is triggered and the outermost short order is deleted.
I have done it if one position has triggered. But what if not one but 3 triggered at once? I.e., I should somehow estimate the number of triggered pending orders and close the pending orders of the opposite signal.
What is the best way to do it? Maybe, someone has already implemented this point? I have not decided to post this question to a separate branch. Perhaps, it will be very simple for those who understand this point better.
If we needed to delete only the lowest one position, we could find a position opened at the lowest price and delete it in the loop, but if there are several positions, what should we do? I would be glad to hear the opinion of those who already have experience with order grids.
Here's a question - has anyone done any speed testing on different processors on the MT-5 tester?
If so, please give me a link. Or at least tell me which of the top AMD and INTEL processors is better in terms of speed?
Of course, we are talking about desktops, not laptops or supercomps. :-)
Here's a question - has anyone done any speed testing on different processors on the MT-5 tester?
If so, please give me a link. Or at least tell me which of the top AMD and INTEL processors is better in terms of speed?
Of course, we are talking about desktops, not laptops or supercomps. :-)
everything on five is here :https://www.mql5.com/ru/forum
Victor, when the low one is deleted, the next one that has become the lowermost one will be deleted by the same condition. The rapidity is for you; the most important thing for the program is not to be on the same tick, but this is ok! Try it!
Boris, that's understandable. I was just thinking about this. I think we should start a loop from 0 to a variable that stores the value of triggered orders and run the function of finding the required order and then close it on each iteration of the loop. I am not sure how to fix that this procedure is executed at the current moment.
By the way, it would be better to search for the most extreme orders using the standard search function and then pass the values of order open time and price to the function of closing the orders, right?
There is a stack of pending orders on both sides. If any of the pending orders are triggered, then on the other side the outermost pending order is deleted. In the screenshot I showed what happens if a buy order is triggered and the outermost short order is deleted.
I have done it if one position has triggered. But what if not one but 3 triggered at once? I.e., I should somehow estimate the number of triggered pending orders and close the pending orders of the opposite signal.
What is the best way to do it? Maybe, someone has already implemented this point? I have not decided to post this question to a separate branch. Perhaps, it will be very simple for those who understand this point better.
If we needed to delete only the lowest one position, we could find a position opened at the lowest price and delete it in the loop, but if there are several positions, what should we do? Well, I would be glad to hear the opinion of those who have experience in dealing with order grids
If i'm not mistaking, i'm trying to make a good move with the help of some pairs of pending orders.
deletion algorithm :
1) dig in the list of open positions and write (remember) their slots.
2) look in the list of set pending orders and check for a matching "slow" from the list of poses, if they match - delete the pending order.
And no more pain.
For example, if you're an old programmer, or you don't know anything about coding, or it's too fashionable to do everything in a different way? ??? а ?
Here's a question - has anyone tested the speed of the MT-5 tester on different processors?
If so, please give me a link. Or at least tell me which of the top AMD and INTEL processors is better in terms of speed?
Of course, we are talking about desktops, not laptops or supercomps. :-)
On a 5 use the clouds for testing and forget about your processor, even if it's multi-core and fast. Really speeds it up many times over. But you will have to pay a penny. In fact, there's been a discussion here at some point
Good day to all!
My question seems to be simple, but I dug through all the articles, but could not find an answer - how does the return(-1) operator work? Where does it pass control to? In this code, for instance:
else return(0);
With zero in brackets and without brackets everything seems clear. But what about (-1)?
Thank you for replying. :)
Boris, that makes sense. I was just thinking about this. I think we should loop from 0 to a variable storing the value of triggered orders and run the function that searches for the required order and then closes it on every iteration of the loop. But I am not quite sure how to fix that this procedure is currently executed.
And, by the way, it is better to search for the most extreme orders using the standard search function, and then the open time value and price are passed to the function to close the orders, right?