Is it really impossible to increase lot size of open order?
alternative place new trade
thanks guys for replay.. but you see im curious about this OrderClose.
ill try this and not working.
OrderClose(Ticket,OrderLots()*2,Ask,slippage,DimGray);
but if i do this and its closing the order in half lot.
OrderClose(Ticket,OrderLots()/2,Ask,slippage,DimGray);
both have the same error 131. im curious about why mt4 allowed to decrease the lots but not to increase it.
Asked and answered. Open a 0.01 lot order. Wait for the market to move 10 pips. Modify the order to 10000000 lots. Close the order and retire with your millions. It can't be done.
As for why your call fails - no mind readers here. What is Ticket? Have you done a successful OrderSelect (for OrderLots()?) Is it a sell order (Ask?) Is Ask fresh (no sleep/Server calls?) Is OrderLots()/2 a multiple of lotStep AND at least LotMin?
Asked and answered. Open a 0.01 lot order. Wait for the market to move 10 pips. Modify the order to 10000000 lots. Close the order and retire with your millions. It can't be done.
As for why your call fails - no mind readers here. What is Ticket? Have you done a successful OrderSelect (for OrderLots()?) Is it a sell order (Ask?) Is Ask fresh (no sleep/Server calls?)
i know someone will answer like that :-)
thanks guys for replay.. but you see im curious about this OrderClose.
ill try this and not working.
but if i do this and its closing the order in half lot.
both have the same error 131. im curious about why mt4 allowed to decrease the lots but not to increase it.
05121981 2013.03.19 16:06 yes i have ECN Broker (Excel Market & ECN-FX Open) |
You can't open new trades with SL and TP. ECN Metatrader4
What is LotStep are you able to close it with half part ??? check out why it fails...
Still curious ?? What has to happen according to you if you have open
0.1 BUY OrderOpenPrice 1.30000 SL 1.29000 TP 1.31000
and close this trade at 1.30500 with your command
OrderClose(Ticket,OrderLots()*2,OrderClosePrice(),slippage,DimGray);
See also what happens if you try to do it manually.....
05121981 2013.03.19 16:06 yes i have ECN Broker (Excel Market & ECN-FX Open) |
You can't open new trades with SL and TP. ECN Metatrader4
What is LotStep are you able to close it with half part ??? check out why it fails...
Still curious ?? What has to happen according to you if you have open
0.1 BUY OrderOpenPrice 1.30000 SL 1.29000 TP 1.31000
and close this trade at 1.30500 with your command
See also what happens if you try to do it manually.....
yes i try that code and i have error 4051 & 131. so only pending order lot size can be modify.
in manual trade i use this "New Order" button & press "Copy" with different volume , SL=0, TP=0.
This "Copy" button on manual trade, how to use it in EA?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use