mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-13 03:33:55 +00:00
modified get_buy/sell_rate refresh to true on notify_sell_cancel and notify_buy_cancel
This commit is contained in:
parent
2e3b8cdba7
commit
f09af888b1
|
@ -566,7 +566,7 @@ class FreqtradeBot:
|
||||||
"""
|
"""
|
||||||
Sends rpc notification when a buy cancel occured.
|
Sends rpc notification when a buy cancel occured.
|
||||||
"""
|
"""
|
||||||
current_rate = self.get_buy_rate(trade.pair, False)
|
current_rate = self.get_buy_rate(trade.pair, True)
|
||||||
|
|
||||||
msg = {
|
msg = {
|
||||||
'type': RPCMessageType.BUY_CANCEL_NOTIFICATION,
|
'type': RPCMessageType.BUY_CANCEL_NOTIFICATION,
|
||||||
|
@ -1062,8 +1062,7 @@ class FreqtradeBot:
|
||||||
"""
|
"""
|
||||||
profit_rate = trade.close_rate if trade.close_rate else trade.close_rate_requested
|
profit_rate = trade.close_rate if trade.close_rate else trade.close_rate_requested
|
||||||
profit_trade = trade.calc_profit(rate=profit_rate)
|
profit_trade = trade.calc_profit(rate=profit_rate)
|
||||||
# Use cached ticker here - it was updated seconds ago.
|
current_rate = self.get_sell_rate(trade.pair, True)
|
||||||
current_rate = self.get_sell_rate(trade.pair, False)
|
|
||||||
profit_percent = trade.calc_profit_ratio(profit_rate)
|
profit_percent = trade.calc_profit_ratio(profit_rate)
|
||||||
gain = "profit" if profit_percent > 0 else "loss"
|
gain = "profit" if profit_percent > 0 else "loss"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user