khramkov / Backtrader-MQL5-API

Python Backtrader - Metaquotes MQL5 - API
GNU General Public License v3.0
247 stars 90 forks source link

STOP LOSS not REGISTERING AS A TRADE #14

Open mik-s opened 10 months ago

mik-s commented 10 months ago

When a stop loss is hit there is no signal being generated back to backtrader. I've worked with direct borker APIs like OANDA and when a SL is triggered, notify_trade would occur. For that signal, logic could be set around SL management. I've placed print statements throughout the mt5store and mt5broker methods and nothing is being triggered when a stop loss is hit. However, when a position is manually closed using the MT5 terminal, a signal is caught be Backtrader - verifying that there is feedback coming from mt5 on orders/trades. Any thoughts on what could be causing this? Does it happen to others as well?