Please check the documentation page.
Bruno Chimenti:
for(int i=OrdersTotal(); i>=0; i--)
for(int i=OrdersTotal(); i>=0; i--)
for(int i=OrdersTotal()-1; i>=0; i--)
Documentation on MQL5: Standard Library / Trade Classes / CTrade / OrderModify
- www.mql5.com
Modifies the pending order parameters. Parameters ticket [in] Order ticket. price [in] The new price by which the order must be executed (or...
thanks, i missed that -1.
I´ve read the documentation, but I´m still not sure how do I specify the parameters that i don´t want to be changed - in this case i just want to change the price, and all the rest stays the same.
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
Hi there! I´m coding an EA which uses pending orders - i know that some people find that EAs shouldn´t use pending orders but it makes sense for my logic - and i want to modify its price depending on the last high/low. Im having trouble with the trade.orderModify parameters count. I´m using it the same way i use for PositionModify to change only the parameters I need to be changed, but i get the "wrong parameter count" error. How do I specify the parameters that I do not want to change?
Can anybody tell me what am I doing wrong here, please?
here´s the function: