mrchuckw:
Can't say without seeing more code, for example, how you set ticket1 and order_stoploss
if (order_type==OP_SELL) { if(Ask < order_stoploss - 0.00150){ OrderModify(ticket1,order_price,
Ask + 0.0005,0,Blue); return ; }}
Why am I getting OrderModify error 1 when this executes?
Check your order_stoploss value think that after it modifies the trade it still keeps same value as it has before modifieing the trade...
Post more of your code looking at it their might be more errors but for one you should have takeprofit value in the ordermodify. If you are not altering it use ordertakeprofit to leave it the same i.e.
OrderModify(ticket1,order_price, Ask + 0.0005,OrderTakeProfit(),0,Blue);
tonny:
Post more of your code looking at it their might be more errors but for one you should have takeprofit value in the ordermodify. If you are not altering it use ordertakeprofit to leave it the same i.e.
tonny: not really
the question is r u using OrderSelect
mrchuckw:
if (order_type==OP_SELL) { if(Ask < order_stoploss - 0.00150){ OrderModify(ticket1,order_price,
Ask + 0.0005,0,Blue); return ; }}
Why am I getting OrderModify error 1 when this executes?
- Based on the above code, how would you know that you're getting any error? What are Function return values ? How do I use them ? - MQL4 forum
- What is order_price? Once the order opens, it can't be changed. Once the order opens, it may not be equal to the original price because of slippage. Use OrderSelect()/OrderOpenPrice()
- What is order_stoploss. Do you update it after modifying the order? Use OrderSelect()/OrderStopLoss()
- EA's must be coded to recover from terminal restarts (BSOD/power/reboot) Do you recreate those variables or are you writing and reading them from a file (persistent storage)
qjol:
Not just that, the way he is hard coding the values i.e. + or - 0.000... makes the EA incompatible with other symbols. I happen to think there might be more errors so it would help to see more including where the variables originate from and the modification system including order cycling.
tonny: not really
the question is r u using OrderSelect

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
Why am I getting OrderModify error 1 when this executes?