EA opens new orderss when time frame changes

 

I have an EA that will close trades and reopen when I switch the chart between timeframes. I DO NOT want this to happen. Any EA prgrammers have a idea how to not do this?

I removed code from init and deinit thtat opened and closed trades and that stopped the problem, but I don't like the fact that it restarts.