Learner21:
You should specify the ticket of order you would like to modify.
#include <Trade/Trade.mqh>
CTrade *P = new CTrade;
P.OrderModify(0,tick.bid,tick.ask+TS*_Point,0,ORDER_TIME_GTC,0);
It is designed to move stop loss.But instead gives error [invalid request] that tells nothing special.
What could be the problem?
Please help.
alexvd:
You should specify the ticket of order you would like to modify.
You should specify the ticket of order you would like to modify.
Thank You. I try to find order ticket to specify it.
Looking at
ulong Ticket() const
in Help menu, its syntax new for me.
I try to get ticket by the code but it says
'Ticket' function is not defined.
I know the below code is wrong but how, need again to ask your help.
ulong ticket;
for(uint a=0;a<PositionsTotal();a++) if(!PositionSelect(_Symbol)) ticket = Ticket(); Print("ticket ", ticket);
Np, I solved the problem.
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
P.OrderModify(0,tick.bid,tick.ask+TS*_Point,0,ORDER_TIME_GTC,0);
It is designed to move stop loss.But instead gives error [invalid request] that tells nothing special.
What could be the problem?
Please help.