MCPcopy Create free account
hub / github.com/kernc/backtesting.py / sl

Method sl

backtesting/backtesting.py:701–709  ·  view source on GitHub ↗

Stop-loss price at which to close the trade. This variable is writable. By assigning it a new price value, you create or modify the existing SL order. By assigning it `None`, you cancel it.

(self)

Source from the content-addressed store, hash-verified

699
700 @property
701 def sl(self):
702 """
703 Stop-loss price at which to close the trade.
704
705 This variable is writable. By assigning it a new price value,
706 you create or modify the existing SL order.
707 By assigning it `None`, you cancel it.
708 """
709 return self.__sl_order and self.__sl_order.stop
710
711 @sl.setter
712 def sl(self, price: float):

Callers

nothing calls this directly

Calls 1

__set_contingentMethod · 0.95

Tested by

no test coverage detected