u have to select each order to do that
for (int i = OrdersTotal() - 1; i >= 0; i--) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if (TrailingstopUse.........) { .. .. } }
it's not possible to do this at once
And some more things......
The orders will be modified one by one...... You can't change all at once with one command
All orders does also mean different Symbols() they don't have same Bid and Ask price....
So for trailing use select symbol and magicnumber also
Thanks a lot guys...
My ea has now a little bit longer code, but it works,,
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
AS you can see,,I have tried to emulate that If # of orders are greater than 1, it calculates its avgprice base on lot size and modify orders at once.
But, it just modifies the last order's stoploss figure. this can have any effect on other orders except the last one.
Could anyone help me?
You don't have to code everything,,, just any references or explanation would help too.
Please EDUCATE me.