mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 05:11:15 +00:00
refactor: Improve clarity of method name
This commit is contained in:
@@ -966,7 +966,7 @@ class Backtesting:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_valid_price_and_stake(
|
def get_valid_entry_price_and_stake(
|
||||||
self,
|
self,
|
||||||
pair: str,
|
pair: str,
|
||||||
row: tuple,
|
row: tuple,
|
||||||
@@ -1089,18 +1089,20 @@ class Backtesting:
|
|||||||
stake_amount_ = stake_amount or (trade.stake_amount if trade else 0.0)
|
stake_amount_ = stake_amount or (trade.stake_amount if trade else 0.0)
|
||||||
precision_price, precision_mode_price = self.get_pair_precision(pair, current_time)
|
precision_price, precision_mode_price = self.get_pair_precision(pair, current_time)
|
||||||
|
|
||||||
propose_rate, stake_amount, leverage, min_stake_amount = self.get_valid_price_and_stake(
|
propose_rate, stake_amount, leverage, min_stake_amount = (
|
||||||
pair,
|
self.get_valid_entry_price_and_stake(
|
||||||
row,
|
pair,
|
||||||
row[OPEN_IDX],
|
row,
|
||||||
stake_amount_,
|
row[OPEN_IDX],
|
||||||
direction,
|
stake_amount_,
|
||||||
current_time,
|
direction,
|
||||||
entry_tag,
|
current_time,
|
||||||
trade,
|
entry_tag,
|
||||||
order_type,
|
trade,
|
||||||
precision_price,
|
order_type,
|
||||||
precision_mode_price,
|
precision_price,
|
||||||
|
precision_mode_price,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# replace proposed rate if another rate was requested
|
# replace proposed rate if another rate was requested
|
||||||
|
|||||||
Reference in New Issue
Block a user