|
31 | 31 | ## ## |
32 | 32 | ## For optimal performance, suggested to use between 6 and 12 open trades, with unlimited stake. ## |
33 | 33 | ## A pairlist with 40 to 80 pairs. Volume pairlist works well. ## |
34 | | -## Prefer stable coin (USDT, BUSDT etc) pairs, instead of BTC or ETH pairs. ## |
| 34 | +## Prefer stable coin (USDT, USDC etc) pairs, instead of BTC or ETH pairs. ## |
35 | 35 | ## Highly recommended to blacklist leveraged tokens (*BULL, *BEAR, *UP, *DOWN etc). ## |
36 | 36 | ## Ensure that you don't override any variables in you config.json. Especially ## |
37 | 37 | ## the timeframe (must be 5m). ## |
@@ -683,55 +683,33 @@ def __init__(self, config: dict) -> None: |
683 | 683 | "sell_profit_only" in self.config and self.config["sell_profit_only"] |
684 | 684 | ): |
685 | 685 | self.exit_profit_only = True |
686 | | - if "num_cores_indicators_calc" in self.config: |
687 | | - self.num_cores_indicators_calc = self.config["num_cores_indicators_calc"] |
688 | | - |
689 | | - if "custom_fee_open_rate" in self.config: |
690 | | - self.custom_fee_open_rate = self.config["custom_fee_open_rate"] |
691 | | - if "custom_fee_close_rate" in self.config: |
692 | | - self.custom_fee_close_rate = self.config["custom_fee_close_rate"] |
693 | | - |
694 | | - if "futures_mode_leverage" in self.config: |
695 | | - self.futures_mode_leverage = self.config["futures_mode_leverage"] |
696 | | - if "futures_mode_leverage_rebuy_mode" in self.config: |
697 | | - self.futures_mode_leverage_rebuy_mode = self.config["futures_mode_leverage_rebuy_mode"] |
698 | | - if "futures_mode_leverage_grind_mode" in self.config: |
699 | | - self.futures_mode_leverage_grind_mode = self.config["futures_mode_leverage_grind_mode"] |
700 | | - |
701 | | - if "futures_max_open_trades_long" in self.config: |
702 | | - self.futures_max_open_trades_long = self.config["futures_max_open_trades_long"] |
703 | | - if "futures_max_open_trades_short" in self.config: |
704 | | - self.futures_max_open_trades_short = self.config["futures_max_open_trades_short"] |
705 | | - |
706 | | - if "stop_threshold_doom_spot" in self.config: |
707 | | - self.stop_threshold_doom_spot = self.config["stop_threshold_doom_spot"] |
708 | | - if "stop_threshold_doom_futures" in self.config: |
709 | | - self.stop_threshold_doom_futures = self.config["stop_threshold_doom_futures"] |
710 | | - if "stop_threshold_rapid_spot" in self.config: |
711 | | - self.stop_threshold_rapid_spot = self.config["stop_threshold_rapid_spot"] |
712 | | - if "stop_threshold_rapid_futures" in self.config: |
713 | | - self.stop_threshold_rapid_futures = self.config["stop_threshold_rapid_futures"] |
714 | | - |
715 | | - if "derisk_enable" in self.config: |
716 | | - self.derisk_enable = self.config["derisk_enable"] |
717 | | - if "stops_enable" in self.config: |
718 | | - self.stops_enable = self.config["stops_enable"] |
719 | | - |
720 | | - if "regular_mode_derisk_1_spot" in self.config: |
721 | | - self.regular_mode_derisk_1_spot = self.config["regular_mode_derisk_1_spot"] |
722 | | - if "regular_mode_derisk_spot" in self.config: |
723 | | - self.regular_mode_derisk_spot = self.config["regular_mode_derisk_spot"] |
724 | | - if "regular_mode_derisk_1_futures" in self.config: |
725 | | - self.regular_mode_derisk_1_futures = self.config["regular_mode_derisk_1_futures"] |
726 | | - if "regular_mode_derisk_futures" in self.config: |
727 | | - self.regular_mode_derisk_futures = self.config["regular_mode_derisk_futures"] |
728 | | - |
729 | | - if "grind_mode_max_slots" in self.config: |
730 | | - self.grind_mode_max_slots = self.config["grind_mode_max_slots"] |
731 | | - if "grind_mode_coins" in self.config: |
732 | | - self.grind_mode_coins = self.config["grind_mode_coins"] |
733 | | - if "max_slippage" in self.config: |
734 | | - self.max_slippage = self.config["max_slippage"] |
| 686 | + |
| 687 | + for config in [ |
| 688 | + "num_cores_indicators_calc", |
| 689 | + "custom_fee_open_rate", |
| 690 | + "custom_fee_close_rate", |
| 691 | + "futures_mode_leverage", |
| 692 | + "futures_mode_leverage_rebuy_mode", |
| 693 | + "futures_mode_leverage_grind_mode", |
| 694 | + "futures_max_open_trades_long", |
| 695 | + "futures_max_open_trades_short", |
| 696 | + "stop_threshold_doom_spot", |
| 697 | + "stop_threshold_doom_futures", |
| 698 | + "stop_threshold_rapid_spot", |
| 699 | + "stop_threshold_rapid_futures", |
| 700 | + "derisk_enable", |
| 701 | + "stops_enable", |
| 702 | + "regular_mode_derisk_1_spot", |
| 703 | + "regular_mode_derisk_spot", |
| 704 | + "regular_mode_derisk_1_futures", |
| 705 | + "regular_mode_derisk_futures", |
| 706 | + "grind_mode_max_slots", |
| 707 | + "grind_mode_coins", |
| 708 | + "max_slippage" |
| 709 | + ]: |
| 710 | + if config in self.config: |
| 711 | + setattr(self, config, self.config[config]) |
| 712 | + |
735 | 713 | if self.target_profit_cache is None: |
736 | 714 | bot_name = "" |
737 | 715 | if "bot_name" in self.config: |
|
0 commit comments