After I modify the
for loop, the previous broblems were solved out. But now, if I try to close 18 positions altogether, only a few positions could be closed at the first price change. For the other positions, they cannot be closed because of Error 129. Error 129 is
Invalid price. As you know, my setting of close price is just simply by using
Bid or
Ask and also the
slippage as big as 10. Therefore, it should work. Could someone tell me where I got wrong?
