What Error? 130?
Do you know the trade-limits?
Error 1.
I don't see any problems with trade limits, because the first Order is modified, yet the second order isn't.
The criteria for both are the same. I want them to both be modified when criteria is met.
I don't see any problems with trade limits, because the first Order is modified, yet the second order isn't.
The criteria for both are the same. I want them to both be modified when criteria is met.
This is not necessarily true, prices are moving and what is ok for the first order might fail the next time - depends on how fast is your broker/connection and how far away are your stops - can't see that :(
Error 1 is not any more in the reference before b600+ it meant: #define ERR_NO_RESULT 1, exactly where this error appears?
Try to have a little waiting loop:
while( IsTradeContextBusy() ) Sleep(100);
This is not necessarily true, prices are moving and what is ok for the first order might fail the next time - depends on how fast is your broker/connection and how far away are your stops - can't see that :(
Error 1 is not any more in the reference before b600+ it meant: #define ERR_NO_RESULT 1, exactly where this error appears?
Try to have a little waiting loop:
Hi Gooly,
Thank you.
Wait loop didn't help.
Modify Error 1 occurs on the line below on the 2nd time around
if (!OrderModify (OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+(PipsToLockIn*pips),OrderTakeProfit(),0,CLR_NONE))
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I wrote this simple function to move two open orders to breakeven when certain criteria are met.
The problem I'm having is that it moves one trade to breakeven but gives me a modify error 1 for the second.
Any ideas?
Thank You