This commit is contained in:
Giulio De Pasquale 2020-11-28 19:44:22 +00:00
parent c3c6667201
commit e13e0eea2e

View File

@ -313,10 +313,11 @@ async def calculate_best_closing_price(status: Status):
if is_long_pos:
closing_price = bid_price * (1 - OFFER_PERC / 100)
else:
closing_price = -ask_price * (1 - OFFER_PERC/100)
closing_price = -ask_price * (1 - OFFER_PERC / 100)
return closing_price
def net_pl_percentage(perc: float, reference_fee_perc: float):
return perc - reference_fee_perc