Hi, having problem with loop, when part of main order is closed, loop misses to find existing order information and by believing there is no order code shoots to open new order.
Code should find highest Buy order and remove part of the profit.
Overall is there a better/safer way to code loops. I am constantly finding my self in trouble where my loops are actiong like some ghost is pushing the switches when looping for order information.
Hi, having problem with loop, when part of main order is closed, loop misses to find existing order information and by believing there is no order code shoots to open new order.
Code should find highest Buy order and remove part of the profit.
Overall is there a better/safer way to code loops. I am constantly finding my self in trouble where my loops are actiong like some ghost is pushing the switches when looping for order information.