mql4expert-advisor

why pending orders doesn't adjusted in mql4? error: the price doesnt declared. here is the mql4 code


/here i saved my last order's open price at op parameter./

double op = OrderOpenPrice();

int ticket = SendOrder(_symbol,OP_SELLSTOP,0.02,op -0.0020,100, 0,0);


Solution

  • If you are trying to change existing orders you should be using OrderSelect() and OrderModify().