Maybe, your script has a bug which makes it trade just randomly? This could explain while it behaves different on different sessions and versions.

I think with printing out and comparing the trade signals between different sessions you can find the problem quick, or could have already found it.