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

Method tp

backtesting/backtesting.py:716–724  ·  view source on GitHub ↗

Take-profit price at which to close the trade. This property is writable. By assigning it a new price value, you create or modify the existing TP order. By assigning it `None`, you cancel it.

(self)

Source from the content-addressed store, hash-verified

714
715 @property
716 def tp(self):
717 """
718 Take-profit price at which to close the trade.
719
720 This property is writable. By assigning it a new price value,
721 you create or modify the existing TP order.
722 By assigning it `None`, you cancel it.
723 """
724 return self.__tp_order and self.__tp_order.limit
725
726 @tp.setter
727 def tp(self, price: float):

Callers

nothing calls this directly

Calls 1

__set_contingentMethod · 0.95

Tested by

no test coverage detected