Multiple EA Sessions on same cur pair in one instance of MT4

 

I am not sure if this is the right place to ask this, but I gotta start somewhere.. I am running MT4 and an EA on a VPS. Problem is that sometimes when I re-login to the VPS there are 2 sessions active and I have to choose 1. I have to reboot the VPS to fix it. Yesterday this was a problem because my EA is designed to take 1 trade and 1 trade only per day at the breakout of a range. Yesterday it took 2 trades. As fate would have it they were both losses. Now the EA itself, I know the algorythm intamitely because I contracted it out to someone who knew MQL4 better then me, I am a programmer by trade in VBA and SQL---I'm not familiar with many of the constructs especially at the "C" level that MQL is, but I can follow the code and make some changes. The point is that I know how to read and write code and that the EA works properly and will not take 2 trades in the same day. I think some action of mine, like closing the MT4 session and restarting it is causing multiple sessions to be run simultaneously and making trades independent of each other, as there are multiple instances of the EA running that are unaware of each other even though only 1 session of MT4 appears on screen. Does this make sense and if so could I avoid multiple instances by not closing and restarting MT4 without rebooting the VPS? Otr there somewhere else that could better address this problem? Thanks in advance......

Mike

Reason: