ServerName?
fxsaber:
ServerName?
ServerName?
CLEAR-Demo
hdemarco:
CLEAR-Demo
I can not open a demo account. Open another demo account and send it to me in private messages.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
EA runs very well on real market. But during backtests, profit is not being updated as you can see:
Orders are being filled, but in the end of simulation account balance remains the same as open balance (in this case 1.000.000 USD).
On code below
PositionGetDouble(POSITION_PROFIT) is always returning 0, so if(PositionGetDouble(POSITION_PROFIT) >= PositionGetDouble(POSITION_PRICE_OPEN)*PositionGetDouble(POSITION_VOLUME)*(ExitMargin/100+custostrade)) never returns true since ExitMargin and custostrade are both > 0.
PositionGetDouble(POSITION_PRICE_OPEN) and PositionGetDouble(POSITION_VOLUME) returns correct value. So, at this point, position is open and selected.
Why PositionGetDouble(POSITION_PROFIT) is returning 0 during Strategy Tester and working fine on real time?