for (cnt = 0; cnt < MaxCount ; cnt ++)
Don't count up, always count down. See here, which also gives you some sample code for correctly closing orders.
currentordercount = OrderClose(OrderTicket(), lotsize, NormalizeDouble(currenypricing,Digits), 90, colorselect );
if (OrderClose(OrderTicket(),lot,OrderClosePrice(),90,Red)) continue;
Check out OrderLots() and OrderClosePrice()
Thanks for the info. Greatly appreciated.

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
Does anyone have an OrderClose function that you can share with the forum? I am using the following two close functions (CareCloseOrder & CloseTrade)but they are not working very well. Do you have any recommendation to improve them? Do you think that one close function is better than the other.