Ok, now look in that log for the trade that you did not understand, you see there clearly what happened and why it was closed. It seems you have still not fixed your script as suggested. Its still the same problem. BTW, the error messages at the begin mean that the historical data is also missing.