Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 455

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
Hello!
The robot opens and closes orders based on certain signals, but there is a need for a pending order to be placed in the same direction, but only one, after the order is closed.
I.e., after the pending order is placed, triggered and closed, nothing else has to happen and the robot is waiting for a signal to open a regular order.
Can you tell me how to implement this?
The robot opens and closes orders based on certain signals, so I need the robot to place a pending order in the same direction, but only one.
I.e., after the pending order is placed, triggered and closed, nothing else needs to happen, the robot is waiting for a signal to open a normal order.
Can you tell me how this can be implemented?
It is very simple. In two for loops you analyze 1) the history of orders and 2) the orders in progress. Based on the analysis you figure out the situation and use conditional if statements to perform the desired action. or do you need more detail?
It's as simple as that. In two for loops, you analyze 1) the history of orders and 2) the orders in progress. Based on the analysis, you figure out the situation and use conditional if statements to perform the required action. or do you need more details?
I'd be very grateful if you could elaborate.
Which part do you want me to spell out? Or all of it?
Which part do you want me to write? Or all of them?
the loops themselves, the ifs, I can set up
))) I've been working for 10 years and I've never had such thoughts. You like tough situations.
now they will be
What is the problem with this code? Sometimes it opens 1 trade, sometimes 2?
I'm supposed to have max 1 trade per pair, but I must have messed up somewhere
What is the problem with this code? Sometimes it opens 1 trade, sometimes 2?
I'm supposed to have max 1 trade per pair, but I must have messed up somewhere
And even more interesting is this