MT5 Stop Loss on Strategy Test not working as expected

 

After I write my code and put it to test I observed a strange behavior.  The Stop Loss works when running on demo account but when running Strategy Test it does not.

The picture below shows the problem.


[EDIT]

  1. The order was executed. 
  2. Trailing Stop working and placing the Stop Loss up and up as long as the trade (BUY) is moving in my favor. 
  3. After a positive stop loss I get a reversal, not all of a sudden, that was expected to hit Stop Loss and finish the trade.  This didn't happen.

Any clues?

Version 5 build 2690 13th Nov. 2020.


Stop Loss ignored

Basic Principles - Trading Operations - MetaTrader 5 Help
Basic Principles - Trading Operations - MetaTrader 5 Help
  • www.metatrader5.com
is an instruction given to a broker to buy or sell a financial instrument. There are two main types of orders: Market and Pending. In addition, there are special Take Profit and Stop Loss levels. is the commercial exchange (buying or selling) of a financial security. Buying is executed at the demand price (Ask), and Sell is performed at the...
 
Daniel Castro:

After I write my code and put it to test I observed a strange behavior.  The Stop Loss works when running on demo account but when running Strategy Test it does not.

The picture below shows the problem.


[EDIT]

  1. The order was executed. 
  2. Trailing Stop working and placing the Stop Loss up and up as long as the trade (BUY) is moving in my favor. 
  3. After a positive stop loss I get a reversal, not all of a sudden, that was expected to hit Stop Loss and finish the trade.  This didn't happen.

Any clues?

Version 5 build 2690 13th Nov. 2020.





I uploaded this video to show the problem happening during Tests.


Please, help me.

 
I'm having the same problem... strategy tester is jumping my stop losses and take profits. This started to happen a few days ago.
 
I'm having the same problem. Did anyone find a solution?
Reason: