
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 will not fix the problem , the problem is if i have many orders for example 20 orders and the condition is if the profit of all orders >=100 close and delete all , when the EA start close orders the profit be < 100 then the EA stop closing the orders, i want its still in colse and delete all function till close all 20 orders and after close all orders get out the function.
That is precisely what the code above your post does.
yes its precisely if i have opening orders for one symbol but if i have opening orders for more than symbols after it close all orders for one symbols the EA stop working and return for this symbol till close all others symbols orders and Orders Total==0 then it back to working again because the code depending on while(OrdersTotals==0) so it still inside CloseAll function till OrdersTotal become 0.
Hi
How would we change the code to close only/certain orders that add up to the Profit required?
I have been trying to add a close orders function in an EA I am working on. Had a tough time finding one that either worked or that I could fix to make it work. I inserted the close_orders() function you posted and now its all rainbows and unicorns.
I shall study it to see how it works and learn, as my current project is as much a learning endeavor as an actual project.
Thank you for taking the time to post it.