Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backtrader_next/brokers/bbroker.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ def _try_exec_stop(self, order, popen, phigh, plow, pcreated, pclose):

# not (completely) executed and trailing stop
if order.alive() and order.exectype == Order.StopTrail:
order.trailadjust(pclose)
order.trailadjust(phigh)

def _try_exec_stoplimit(self, order,
popen, phigh, plow, pclose,
Expand Down Expand Up @@ -1035,7 +1035,7 @@ def _try_exec_stoplimit(self, order,

# not (completely) executed and trailing stop
if order.alive() and order.exectype == Order.StopTrailLimit:
order.trailadjust(pclose)
order.trailadjust(phigh)

def _slip_up(self, pmax, price, doslip=True, lim=False):
if not doslip:
Expand Down