feat: add buy signal name

This commit is contained in:
kevinjulian
2021-07-20 04:58:20 +07:00
parent e9dbd57da4
commit 9e63bdbac9
6 changed files with 25 additions and 10 deletions

View File

@@ -257,6 +257,7 @@ class LocalTrade():
sell_reason: str = ''
sell_order_status: str = ''
strategy: str = ''
buy_signal_name: str = ''
timeframe: Optional[int] = None
def __init__(self, **kwargs):
@@ -288,6 +289,7 @@ class LocalTrade():
'amount_requested': round(self.amount_requested, 8) if self.amount_requested else None,
'stake_amount': round(self.stake_amount, 8),
'strategy': self.strategy,
'buy_signal_name': self.buy_signal_name,
'timeframe': self.timeframe,
'fee_open': self.fee_open,
@@ -703,6 +705,7 @@ class Trade(_DECL_BASE, LocalTrade):
sell_reason = Column(String(100), nullable=True)
sell_order_status = Column(String(100), nullable=True)
strategy = Column(String(100), nullable=True)
buy_signal_name = Column(String(100), nullable=True)
timeframe = Column(Integer, nullable=True)
def __init__(self, **kwargs):