OrderClose Template
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.
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.