Following your advice, I have found a place in void OnTick() function where I can attach the TrailingGroupOrder() function to send a command to modify a trail of group orders, and oh my god the trail of group orders has started working. However, my joy didn't last long. Looking closer, I saw that only the order with a min ticket is trilled.
I can very likely assume that the problem is in the modification of only the first (minimum) order and not all at once.
Makar advise how to make all orders in the grid modify at once????
Show me where you put TrailingGroupOrder() in the void OnTick() function ?
Hello all, I am writing code for a trawl of group orders . The code logic is as follows:
After the second and following orders are opened, we get a command to modify orders ModifyOrders() where we calculate the average and then takeprofit calculation and modify all orders but takeprofit only.
Then we call the TrailingGroupOrder() function from the void OnTick() function where Stop Loss is modified into Trailing Stop.
The question is that only one order with a minimum ticket is modified; this is not correct; all orders in the grid should be modified and close at TP or SL. Please help me to understand this. Thank you in advance.
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.
Good day Makar !!!
Following your advice, I have found a place in void OnTick() function where I can attach the TrailingGroupOrder() function to send a command to modify a trail of group orders, and oh my god the trail of group orders has started working. However, my joy didn't last long. Looking closer, I saw that only the order with a min ticket is trilled.
I can very likely assume that the problem is in the modification of only the first (minimum) order and not all at once.
Makar advise how to make all orders in the grid modify at once????
Show me where you put TrailingGroupOrder() in the void OnTick() function ?
Delete the red highlighted items
Highlighted in yellow bring it up to the top
Delete the red highlighted items
Highlighted in yellow bring it up
Makar is the variant you sent me yesterday - it would be very simple in that variant the orders are also closed incorrectly
Makar this is the variant you sent me yesterday - it would have been very simple in that variant the orders are not closed correctly
My corrections do not affect the closing.
One more thing - what does "tr" in the TrailingGroupOrder() function equal?
Makar this is the variant you sent me yesterday - it would have been very simple in that variant the orders are also closed incorrectly
What do you mean by "not closing correctly"?
Not all orders are closed at once from the trawl, but only the order with the min ticket and so on one by one
Not all orders are closed at once from the trawl, but only the order with the min ticket and so on one by one
Hello all, I am writing code for a trawl of group orders . The code logic is as follows:
After the second and following orders are opened, we get a command to modify orders ModifyOrders() where we calculate the average and then takeprofit calculation and modify all orders but takeprofit only.
Then we call the TrailingGroupOrder() function from the void OnTick() function where Stop Loss is modified into Trailing Stop.
The question is that only one order with a minimum ticket is modified; this is not correct; all orders in the grid should be modified and close at TP or SL. Please help me to understand this. Thank you in advance.
Hello all, I am writing code for a trawl of group orders . The code logic for the trawl is as follows :
Why this duplication
You can do it this way
Also show what parameters