edtechre / pybroker

Algorithmic Trading in Python with Machine Learning
https://www.pybroker.com
Other
1.93k stars 240 forks source link

when use stop loss, how to get callback while trigger stop action #136

Closed zhuzw1987 closed 1 month ago

zhuzw1987 commented 1 month ago

Hi, Ed when use stop loss, how to get callback while trigger stop action?

edtechre commented 1 month ago

Hi @zhuzw1987, there is no callback that is triggered when a stop is executed. You can however check whether the last trade that was placed was due to a stop by using Context#trades