live下 freqai config 细化

This commit is contained in:
Ubuntu 2026-01-06 12:41:41 +00:00
parent 878af56ed5
commit 790228fe61
3 changed files with 7 additions and 6 deletions

View File

@ -132,11 +132,11 @@
"shuffle": false
},
"model_training_parameters": {
"n_estimators": 800,
"learning_rate": 0.02,
"n_estimators": 1000,
"learning_rate": 0.015,
"num_leaves": 60,
"max_depth": 12,
"min_data_in_leaf": 15,
"max_depth": 15,
"min_data_in_leaf": 10,
"feature_fraction": 0.8,
"bagging_fraction": 0.8,
"bagging_freq": 5,

View File

@ -818,12 +818,12 @@ class FreqaiPrimer(IStrategy):
def custom_entry_price(self, pair: str, trade: Trade | None, current_time: datetime, proposed_rate: float,
entry_tag: str | None, side: str, **kwargs) -> float:
adjusted_rate = proposed_rate * (1 - 0.002)
adjusted_rate = proposed_rate * (1 - 0.0015)
self.strategy_log(f"[{pair}] 自定义买入价:{adjusted_rate:.6f}(原价:{proposed_rate:.6f}")
return adjusted_rate
def custom_exit_price(self, pair: str, trade: Trade | None, current_time: datetime, proposed_rate: float,
entry_tag: str | None, side: str, **kwargs) -> float:
adjusted_rate = proposed_rate * (1 + 0.002)
adjusted_rate = proposed_rate * (1 + 0.0015)
self.strategy_log(f"[{pair}] 自定义买入价:{adjusted_rate:.6f}(原价:{proposed_rate:.6f}")
return adjusted_rate

View File

@ -201,6 +201,7 @@ docker-compose run --rm freqtrade backtesting $PAIRS_FLAG \
--logfile /freqtrade/user_data/logs/freqtrade.log \
--freqaimodel LightGBMRegressorMultiTarget \
--config /freqtrade/config_examples/$CONFIG_FILE \
--config /freqtrade/config_examples/live.json \
--config /freqtrade/templates/freqaiprimer.json \
--strategy-path /freqtrade/templates \
--enable-protections \