Wouldn't it be because the TMF routine is run at every tick? Thus each time it would close the next trade?