I am running into a issue where my system is scaling out of a position, and overfills kinda, it close out the positions with two separate set of code. and every once and while it happens at the same time. When this happens it does what I want it to do.
But, the position on the system then sets to 0 but is still considered to be short and does not take a trade after that (see attached image).
Is there syntax that if position is 0 close the position to make the market position flat so more trades can occur?
Thanks for any help.
Comment