fixed flake error, they are really to stringent!
This commit is contained in:
parent
f8da1bf5a6
commit
40630875ab
@ -208,7 +208,8 @@ class Analyze(object):
|
||||
"HIT STOP: current price at {:.6f}, stop loss is {:.6f}, "
|
||||
"initial stop loss was at {:.6f}, trade opened at {:.6f}".format(
|
||||
current_rate, trade.stop_loss, trade.initial_stop_loss, trade.open_rate))
|
||||
logger.debug("trailing stop saved us: {:.6f}".format(trade.stop_loss - trade.initial_stop_loss))
|
||||
logger.debug("trailing stop saved us: {:.6f}"
|
||||
.format(trade.stop_loss - trade.initial_stop_loss))
|
||||
|
||||
logger.debug('Stop loss hit.')
|
||||
return True
|
||||
|
@ -95,9 +95,12 @@ class Trade(_DECL_BASE):
|
||||
open_date = Column(DateTime, nullable=False, default=datetime.utcnow)
|
||||
close_date = Column(DateTime)
|
||||
open_order_id = Column(String)
|
||||
stop_loss = Column(Float, nullable=False, default=0.0) # absolute value of the stop loss
|
||||
initial_stop_loss = Column(Float, nullable=False, default=0.0) # absolute value of the initial stop loss
|
||||
max_rate = Column(Float, nullable=False, default=0.0) # absolute value of the highest reached price
|
||||
# absolute value of the stop loss
|
||||
stop_loss = Column(Float, nullable=False, default=0.0)
|
||||
# absolute value of the initial stop loss
|
||||
initial_stop_loss = Column(Float, nullable=False, default=0.0)
|
||||
# absolute value of the highest reached price
|
||||
max_rate = Column(Float, nullable=False, default=0.0)
|
||||
|
||||
def __repr__(self):
|
||||
return 'Trade(id={}, pair={}, amount={:.8f}, open_rate={:.8f}, open_since={})'.format(
|
||||
|
Loading…
Reference in New Issue
Block a user