mql 4 account balance dont work correctly

28 Views Asked by At

i want to buy 1/1000 lot of my balance per trade. for example with balance of 400$, trade lot will be 0.4 lot. for 2000$ balance, trade lots will be 2lots.

my EA working correctly in real time. but in strategy tester it open 1 lot for any amount of balance. for example in strategy tester with initial deposit of 1000$ it open a trade with 1 lot volume and the trade profit is 800 dollar. new balance is 1800$. but it open 1 lot on the next trade.

double LotSize = (double)DoubleToString(AccountBalance() / 1000,2);

my EA working correctly in real time. the problem is only on strategy tester.

0

There are 0 best solutions below