mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-26 17:00:23 +00:00
refactor: improve variable naming
This commit is contained in:
@@ -1027,12 +1027,12 @@ class LocalTrade:
|
|||||||
Calculate the open_rate including open_fee.
|
Calculate the open_rate including open_fee.
|
||||||
:return: Price in of the open trade incl. Fees
|
:return: Price in of the open trade incl. Fees
|
||||||
"""
|
"""
|
||||||
open_trade = FtPrecise(amount) * FtPrecise(open_rate)
|
open_value = FtPrecise(amount) * FtPrecise(open_rate)
|
||||||
fees = open_trade * FtPrecise(self.fee_open)
|
fees = open_value * FtPrecise(self.fee_open)
|
||||||
if self.is_short:
|
if self.is_short:
|
||||||
return float(open_trade - fees)
|
return float(open_value - fees)
|
||||||
else:
|
else:
|
||||||
return float(open_trade + fees)
|
return float(open_value + fees)
|
||||||
|
|
||||||
def recalc_open_trade_value(self) -> None:
|
def recalc_open_trade_value(self) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user