exit strategy after roi check
This commit is contained in:
parent
1db0a7d4ce
commit
0b8afa12e9
@ -183,7 +183,7 @@ def handle_trade(trade: Trade) -> bool:
|
|||||||
|
|
||||||
logger.debug('Handling %s ...', trade)
|
logger.debug('Handling %s ...', trade)
|
||||||
current_rate = exchange.get_ticker(trade.pair)['bid']
|
current_rate = exchange.get_ticker(trade.pair)['bid']
|
||||||
if should_sell(trade, current_rate, datetime.utcnow()):
|
if should_sell(trade, current_rate, datetime.utcnow()) or get_signal(trade.pair, SignalType.SELL):
|
||||||
execute_sell(trade, current_rate)
|
execute_sell(trade, current_rate)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user