The problems are:
1. It works good at the beginning. After a few trades, the returned information from the excecution for a trade does not match the order submitted;
2. Since this happened, the code stopped working as it suppose to because it is totally lost when trade can not be followed;
3. After some time, an automatic profit taking or stop loss mechanism involves with a "Close Position" to close open orders (I did not code this part and I do not know where and how it comes).
Another scenerio that might trigger this problem is that when the open order can not filled at one time, it looks like it will get more chances the execution will confused and lose the control of reporting the right information for the executed order.
Is this a known problem and how I can get rid of it? Thanks!
Comment