Closed JsonAC closed 5 days ago
possible - would need a closer look. It's however very close to irrelevant if you note the italic section of the relevant docs
Cost of the order - usually average * filled (Exchange dependent on futures, may contain the cost with or without leverage and may be in contracts.)
As such - also the strategy must be very careful in using this (don't use stake_amount
instead).- as dry and live may have different contents (we know how it's filled in dry - but live exchanges may behave differently - and in live trading, this value is assigned directly as it comes from ccxt).
As it's content is not reliable - Cost on the order object has no operational meaning to freqtrade - and is only really kept for reference. As such, i doubt there's tests around this - and i doubt anyone cares if this is correct in backtesting 😆
possible - would need a closer look. It's however very close to irrelevant if you note the italic section of the relevant docs
Cost of the order - usually average * filled (Exchange dependent on futures, may contain the cost with or without leverage and may be in contracts.)
As such - also the strategy must be very careful in using this (don't use
stake_amount
instead).- as dry and live may have different contents (we know how it's filled in dry - but live exchanges may behave differently - and in live trading, this value is assigned directly as it comes from ccxt).As it's content is not reliable - Cost on the order object has no operational meaning to freqtrade - and is only really kept for reference. As such, i doubt there's tests around this - and i doubt anyone cares if this is correct in backtesting 😆
Thank you for your reply. I actually won't be using this feature in practice, and I hope it won't have any real impact. I'm just getting started with this project, so I went through all the backtesting code and only noticed this issue.
Describe your environment
Your question
Ask the question you have not been able to find an answer in the Documentation
In backtesting.py, line 1142, the code is: cost=amount * propose_rate + trade.fee_open
Note that amount propose_rate is the stake_amount, and trade.fee_open=self.fee is percentage, they seem to have different dimensions. Is there an error? Is the correct way as follows? cost=amount propose_rate * (1+ trade.fee_open)