your EA is not really easy to understand !? Can anybody translate it to "standard" - Characterset ??
I don' know... wich charts are you using?... it's the same graphic on the tester (no mather the period) but I tried it on a demo account (5000) with EURUSD and it lost almost 1k in a few minutes of testing (with no profit).
I didn't have time to read the code yet, but I'll give it a try later.
I downloaded your code and noticed it just consumed the account balance, until...
I traced what happened and noted the system generating lots of Sells and almost no Buys.
Placing an "ELSE" before the if statement for entrance of the Sell state:
if(m1!=0.0 && m1!=LastOrder && (MultiPositions==true || !ExistPositions()) )
will prevent this code to be executed as a result of a just realized entrance of the Buy state.
It runs much smoother after this change!