gangsta1:
You need to make sure that your new TP != OrderTakeProfit() and that your new SL != OrderStopLoss() (bearing in mind the issues with comparing doubles) otherwise you are just setting the same values and you will get error 1
I keep getting the error when closing out part of the lots of a trade and cannot seem to fix it, any ideas?
Thank you. So I need to set a value other than 0 then? I was setting sl/tp 0 to use the initial stop loss/take profit but this may be the error. Thanks again you are always very responsive and helpful.
Why do you always print your errordiscription with same line ??
Print("OrderModify() error - ", ErrorDescription(GetLastError()));
Even when you get a return for Orderclosecommand ???
With using always the same line makes finding part error coming from only more difficult !!
Yes, I think it is because I was using 0 for tp and sl as I wanted to use the sl/tp of previous order.
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
I keep getting the error when closing out part of the lots of a trade and cannot seem to fix it, any ideas? It does not perform order modify on the sell order either which is strange!