MT5 Strategy Tester - Hedging/Netting Issue
I have just switched to an MT5 hedging account and it seems that the Strategy Tester either does not work correctly with it or I am doing something stupid....
A very simple EA that literally places a single pending order with a SL & TP it does nothing else at all, no other code, no indicators etc.
Netting Account: (see picture)
Trade is placed with SL & TP
TP hit
Profit/Loss is calculated as the trade progresses.
So all is fine
Hedging Account: (see picture)
Trade is placed with SL & TP
TP & SL are ignored
Profit/Loss is not calculated at all
I've tried some other pieces of code as well, same result.
I cannot seem to find anything here that talks about the strategy tester and the hedging account and if it should or shouldn't be treated differently etc.
Any ideas?
thanks
That's obviously a bug, what MT5 build ? How to reproduce it ?
That's obviously a bug, what MT5 build ? How to reproduce it ?
Build 2361 & 2418
Run Strategy Tester with visual with code that opens trades.
I used attached completely simplified snippet of code in the end because I thought I was going crazy.
Thank you for your interest.
regards

- www.mql5.com
Build 2361 & 2418
Run Strategy Tester with visual with code that opens trades.
I used attached completely simplified snippet of code in the end because I thought I was going crazy.
Thank you for your interest.
regards
Can't be reproduced.
Probably related to the broker and/or symbol with "-sb" suffix ?
Can't be reproduced.
Probably related to the broker and/or symbol with "-sb" suffix ?
Ok thanks for checking.
The account you used had hedging set?
Brokers use lots of different suffix so it should be able to handle it, does that not still make it a bug given that brokers are allowed to use suffix?
regards
Paul
Ok thanks for checking.
The account you used had hedging set?
Brokers use lots of different suffix so it should be able to handle it, does that not still make it a bug given that brokers are allowed to use suffix?
regards
Paul
I didn't say it's not a bug. But if you want it to be fixed (or even only listened by Metaquotes), you have to show them how to reproduce it.
Give me all details needed to reproduce it please : broker, ST settings (ini file).
Of course.
I didn't say it's not a bug. But if you want it to be fixed (or even only listened by Metaquotes), you have to show them how to reproduce it.
Give me all details needed to reproduce it please : broker, ST settings (ini file).

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have just switched to an MT5 hedging account and it seems that the Strategy Tester either does not work correctly with it or I am doing something stupid....
A very simple EA that literally places a single pending order with a SL & TP it does nothing else at all, no other code, no indicators etc.
Netting Account: (see picture)
Trade is placed with SL & TP
TP hit
Profit/Loss is calculated as the trade progresses.
So all is fine
Hedging Account: (see picture)
Trade is placed with SL & TP
TP & SL are ignored
Profit/Loss is not calculated at all
I've tried some other pieces of code as well, same result.
I cannot seem to find anything here that talks about the strategy tester and the hedging account and if it should or shouldn't be treated differently etc.
Any ideas?
thanks