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.
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?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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