I'm creating a EA and testing on Strategy Tester, it works for hundreds of orders as expected but one specific trade is closing in 15 points instead of 40 points and I'm not sure why. Others actually close between 38-42 points, but 25 points seems too much.
It's a lot more complex but I was able to reduce the EA in this simple piece of code:
I run the test with the following parameters:
- Delay: zero latency, ideal execution
- Modelling: every tick based on real ticks
- Profit in pips for faster calculation: disabled
Here's the journal output:
and
Can anyone clarify why this is happening, please?
mrequest.sl = NormalizeDouble(latest_price.ask - 40 * _Point, _Digits); mrequest.tp = NormalizeDouble(latest_price.ask + 40 * _Point, _Digits);
buy execute on bid, sell executes on ask. if you are selling, tp should be bid
Dark Ryd3r, 2021.06.26 18:04
Buy Sell on your price, Choose Market order, Pending Limit order or Pending Stop OrderI'm creating a EA and testing on Strategy Tester, it works for hundreds of orders as expected but one specific trade is closing in 15 points instead of 40 points and I'm not sure why. Others actually close between 38-42 points, but 25 points seems too much.
It's a lot more complex but I was able to reduce the EA in this simple piece of code:
I run the test with the following parameters:
- Delay: zero latency, ideal execution
- Modelling: every tick based on real ticks
- Profit in pips for faster calculation: disabled
Here's the journal output:
and
Can anyone clarify why this is happening, please?
Check SYMBOL_TRADE_STOPS_LEVEL , spread at that tick, and actual TP hit price. Use mresult.retcode and log tick data around 1737044011967 .

- 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'm creating a EA and testing on Strategy Tester, it works for hundreds of orders as expected but one specific trade is closing in 15 points instead of 40 points and I'm not sure why. Others actually close between 38-42 points, but 25 points seems too much.
It's a lot more complex but I was able to reduce the EA in this simple piece of code:
I run the test with the following parameters:
- Delay: zero latency, ideal execution
- Modelling: every tick based on real ticks
- Profit in pips for faster calculation: disabled
Here's the journal output:
and
Can anyone clarify why this is happening, please?