Put the tickets in an array and step through the array in the loop
Hi Phy
Could you possible show me a little example please?
Many Thanks for your time
Madmarkym
Could you possible show me a little example please?
Many Thanks for your time
Madmarkym
Here is what I would do, not really what is described above
string comment = "Euro_Level_3"; for(i = OrdersTotal()-1; i>=0; i--){ OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if(OrderComment() == comment ){ if(OrderType() == OP_BUY ){ OrderModify (OrderTicket(), ...........); } if(OrderType() == OP_SELL ){ OrderModify (OrderTicket(), ...........); } } }
Hi Phy
Thanks for your continued help, it is most appreciated.
I understand how your example works, but is it possible to put the variables tick1, tick2 & tick3 into an array, to allow me to put the tick variable into a loop to increment it.
Many Thanks again
Madmarkym
Thanks for your continued help, it is most appreciated.
I understand how your example works, but is it possible to put the variables tick1, tick2 & tick3 into an array, to allow me to put the tick variable into a loop to increment it.
Many Thanks again
Madmarkym
double myArray[3];
myArray[0] = tick1;
myArray[1] = tick2;
myArray[2] = tick3;
myArray[0] = tick1;
myArray[1] = tick2;
myArray[2] = tick3;
double myArray[3];
myArray[0] = tick1;
myArray[1] = tick2;
myArray[2] = tick3;
myArray[0] = tick1;
myArray[1] = tick2;
myArray[2] = tick3;
Hi,
Would it not be:
int myArray[3];
as the first parameter in OrderModify(...) requires an integer representing the order ticket number?
Regards,
lucidlamp
Many Thanks for all the help, it has been most appreciated.
scouseman
scouseman
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I have got 3 variables tick1,tick2 & tick3
Instead of having the 3 OrderModify lines is it possible to put the 3 lines into a for loop, changing tick1,2&3 with a loop. If this is possible can somebody please show me the syntax.
Many Thanks
Madmarkym