I have noticed that the following loop is widely and routinely used for counting, closing or deleting orders, etc:
My question is why do we use the -1 piece of the code? Is this logically correct while we want to include all orders in our search? Isn't this used only when searching for candles and we want to exclude the 0 candle?
Appreciate your clarification.
Inserted Code
for (int i = OrdersTotal() [color=red]-1[/color]; i >= 0; i--)
My question is why do we use the -1 piece of the code? Is this logically correct while we want to include all orders in our search? Isn't this used only when searching for candles and we want to exclude the 0 candle?
Appreciate your clarification.
Free Programmer for Profitable Strategies