thili55:
It looks like it should happen straight away, add some debugging Print() statements and find out what is happening and when . . .
This code will work, but it seems to take awhile to trigger and close the orders after the TakeProfitPCT has been hit for a few minutes. How do I get it to be as close to instant as possible?
Why haven't you used GetLastError() ??
if (!OrderClose(OrderTicket(), OrderLots(), closeprice, slippage)) { Log("error"); return(0); }
What value have you assigned to slippage?
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
This code will work, but it seems to take awhile to trigger and close the orders after the TakeProfitPCT has been hit for a few minutes. How do I get it to be as close to instant as possible?