EA back testing: not exiting the Position even if the TP or SL was hit

 

Just trying something new here.

So after coding my EA and back testing it, I noticed some orders are not getting filled. I can't figure it out. 

The TP order on the long position should have been filled but instead it opened another long position.

Files:
MT4.JPG  55 kb
 

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

We can't see your broken code.

Fix your broken code.

With the information you've provided — we can only guess. And you haven't provided any useful information for that.