iI was wondering if any one could add a function to this code below so it could close PENDING orders with the rest of "live" orders, once the net profit is reached.
CloseAll() is supposed to close all orders including pending ones. Doesn't it do so?
That can happen if current price is too close to pending order entry price.
You could've figured that yourself if instead of littering log file with Print("Close on ", ...) there was a proper error handling code after every trade function call that prints error messages in the log.
"Doesn't it do so?" - No it doesnt
"You could've figured that yourself" - I am asking for your help, since I am still learning MT code.
Thanks.
"You could've figured that yourself" - I am asking for your help, since I am still learning MT code.
Thanks.
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 little ea below takes net profit on all of your open positions. Once the profit lever is reached, it closes all open positions.
I was wondering if any one could add a function to this code below so it could close PENDING orders with the rest of "live" orders, once the net profit is reached.
Thanks.