Strange issue with EA and strategy tester results

 

Hello All

Since couple of days I have extremely strange issue with my EA its constantly getting error 134 and I have no clue where and why this is happening.

Little background info about it may be useful. Im building this EA for may be 6 months for the last 2 is in forward testing in demo account.I'm using several demo accounts on different machines to run the test in order to have more data but in the last few days the strategy testes are useless since they do not work.

The EA is starting whit 2000 $ and first position that is open is with 0.2 lot and when it treys to open second position with  lot 0.2  is getting error 134.

The accounts I'm using are with different leverage starting from 1:100 and ending with 1:500 and the strategy was original developed for 1:100. This was working fine until last week.

I have no problem to open manually several deals simultaneously with any of the accounts and based on my calculations the money needed for deal with Lot 0.2 and leverage 1:100 is around 200$ so 2000 should be far more than its needed to open 2 deals in the same time.

Not to mention that the accounts with higher leverage should required even less balance to place the deal . The more strange part is that the Tester is actually returning negative free Margin as shown bellow :

2016.06.22 13:43:54.821 2016.06.16 17:57  Tester: PrevBalance: 1805.15, PrevPL: 0.00, PrevEquity 1805.15, PrevMargin: 0.00, NewMargin: 2142, FreeMargin: -336.85

 This EA was working perfectly last week and there were never problems with the balance even with deals as with Lot of 0.5 or even 1. There were no changes in the code and I even installed new server and created new demo account for testing ... same problem.

 Does anyone have any ideas or suggestions  ?