iterativv / NostalgiaForInfinity

Trading strategy for the Freqtrade crypto bot
GNU General Public License v3.0
2.01k stars 499 forks source link

Error on Startup then doesnt enter any trade #268

Closed Mandark-droid closed 1 year ago

Mandark-droid commented 1 year ago

Hi,

Am getting below error on startup and after that its searching for 30 volume pair list but no trades entered. Can you please provide a sample working config.

Attaching to freqtrade-backtesting1, freqtrade-backtesting freqtrade-backtesting1 | INTERNALERROR> Traceback (most recent call last): freqtrade-backtesting1 | INTERNALERROR> File "/home/ftuser/.local/lib/python3.10/site-packages/_pytest/main.py", line 266, in wrap_session freqtrade-backtesting1 | INTERNALERROR> config._do_configure() freqtrade-backtesting1 | INTERNALERROR> File "/home/ftuser/.local/lib/python3.10/site-packages/_pytest/config/init.py", line 1037, in _do_configure freqtrade-backtesting1 | INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self)) freqtrade-backtesting1 | INTERNALERROR> File "/home/ftuser/.local/lib/python3.10/site-packages/pluggy/_hooks.py", line 277, in call_historic freqtrade-backtesting1 | INTERNALERROR> res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False) freqtrade-backtesting1 | INTERNALERROR> File "/home/ftuser/.local/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec freqtrade-backtesting1 | INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) freqtrade-backtesting1 | INTERNALERROR> File "/home/ftuser/.local/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall freqtrade-backtesting1 | INTERNALERROR> return outcome.get_result() freqtrade-backtesting1 | INTERNALERROR> File "/home/ftuser/.local/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result freqtrade-backtesting1 | INTERNALERROR> raise ex[1].with_traceback(ex[2]) freqtrade-backtesting1 | INTERNALERROR> File "/home/ftuser/.local/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall freqtrade-backtesting1 | INTERNALERROR> res = hook_impl.function(*args) freqtrade-backtesting1 | INTERNALERROR> File "/testing/tests/conftest.py", line 19, in pytest_configure freqtrade-backtesting1 | INTERNALERROR> config.option.artifacts_path.mkdir() freqtrade-backtesting1 | INTERNALERROR> File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir freqtrade-backtesting1 | INTERNALERROR> self._accessor.mkdir(self, mode) freqtrade-backtesting1 | INTERNALERROR> PermissionError: [Errno 13] Permission denied: '/testing/artifacts' freqtrade-backtesting1 exited with code 3

================================ Below is the config that am using. Please suggest if there are any changes required.

{ "max_open_trades": 6, "stake_currency": "USDT", "stake_amount": "unlimited", "tradable_balance_ratio": 0.99, "fiat_display_currency": "USD", "dry_run": true, "dry_run_wallet": 1000, "cancel_open_orders_on_exit": false, "timeframe": "5m", "trading_mode": "spot", "margin_mode": "", "unfilledtimeout": { "entry": 2, "exit": 2, "exit_timeout_count": 0, "unit": "minutes" }, "order_types": { "entry": "limit", "exit": "limit", "emergency_exit": "limit", "force_entry": "limit", "force_exit": "limit", "stoploss": "limit", "stoploss_on_exchange": false, "stoploss_on_exchange_interval": 60 }, "entry_pricing": { "price_side": "other", "use_order_book": false, "order_book_top": 1, "price_last_balance": 0, "check_depth_of_market": { "enabled": false, "bids_to_ask_delta": 1 } }, "exit_pricing": { "price_side": "other", "use_order_book": false, "order_book_top": 1, "price_last_balance": 0 }, "exchange": { "name": "binance", "key": "", "secret": "", "ccxt_config": {}, "ccxt_async_config": {}, "pair_whitelist": [], "pair_blacklist": [ "(BNB)/.", ".(_PREMIUM|BEAR|BULL|HALF|HEDGE|UP|DOWN|[1235][SL])/.", "(AUD|BRZ|CAD|CHF|EUR|GBP|HKD|IDRT|JPY|NGN|RUB|SGD|TRY|UAH|USD|ZAR)/.", "(BUSD|CUSD|CUSDT|DAI|PAXG|SUSD|TUSD|USDC|USDN|USDP|USDT|VAI|UST|USTC|AUSD)/.", "(ACM|AFA|ALA|ALL|ALPINE|APL|ASR|ATM|BAR|CAI|CHZ|CITY|FOR|GAL|GOZ|IBFK|JUV|LEG|LOCK-1|NAVI|NMR|NOV|PFL|PSG|ROUSH|STV|TH|TRA|UCH|UFC|YBO)/.", "(1EARTH|ILA|BOBA|CTXC|CWAR|HBAR|NMR|OMG|ONG|ARDR|DMTR|MLS|TORN|ANC|LUNA|BTS|QKC|COS|ACA|FTT|SRM|YFII|SNM|BNX|WAVES|MIR)/.*" ], "markets_refresh_interval": 60 }, "pairlists": [ { "method": "VolumePairList", "number_assets": 30, "sort_key": "quoteVolume", "refresh_period": 1800 }, { "method": "AgeFilter", "min_days_listed": 30 }, { "method": "PriceFilter", "low_price_ratio": 0.003 }, { "method": "SpreadFilter", "max_spread_ratio": 0.005 }, { "method": "RangeStabilityFilter", "lookback_days": 3, "min_rate_of_change": 0.03, "refresh_period": 1800 }, { "method": "VolatilityFilter", "lookback_days": 3, "min_volatility": 0.01, "max_volatility": 0.75, "refresh_period": 43200 }, { "method": "VolumePairList", "number_assets": 30, "sort_key": "quoteVolume" }, { "method": "ShuffleFilter" } ], "edge": { "enabled": false, "process_throttle_secs": 3600, "calculate_since_number_of_days": 7, "allowed_risk": 0.01, "stoploss_range_min": -0.01, "stoploss_range_max": -0.1, "stoploss_range_step": -0.01, "minimum_winrate": 0.6, "minimum_expectancy": 0.2, "min_trade_number": 10, "max_trade_duration_minute": 1440, "remove_pumps": false }, "telegram": { "enabled": false, "token": "", "chat_id": "" }, "api_server": { "enabled": true, "listen_ip_address": "0.0.0.0", "listen_port": 8080, "verbosity": "error", "enable_openapi": false, "jwt_secret_key": "", "ws_token": "", "CORS_origins": [], "username": "", "password": "", "jwt_secret": "" }, "bot_name": "freqtrade4", "initial_state": "running", "force_entry_enable": true, "internals": { "process_throttle_secs": 5 } }

Mandark-droid commented 1 year ago

Also getting below error while backtesting please suggest.

Traceback (most recent call last): File "/home/ftuser/.local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3803, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'btc_pct_close_max_72_5m'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/freqtrade/freqtrade/main.py", line 42, in main return_code = args'func' File "/freqtrade/freqtrade/commands/optimize_commands.py", line 58, in start_backtesting backtesting.start() File "/freqtrade/freqtrade/optimize/backtesting.py", line 1336, in start min_date, max_date = self.backtest_one_strategy(strat, data, timerange) File "/freqtrade/freqtrade/optimize/backtesting.py", line 1253, in backtest_one_strategy results = self.backtest( File "/freqtrade/freqtrade/optimize/backtesting.py", line 1145, in backtest data: Dict = self._get_ohlcv_as_lists(processed) File "/freqtrade/freqtrade/optimize/backtesting.py", line 360, in _get_ohlcv_as_lists self.strategy.advise_entry(pair_data, {'pair': pair}), File "/freqtrade/freqtrade/strategy/interface.py", line 1235, in advise_entry df = self.populate_entry_trend(dataframe, metadata) File "/freqtrade/user_data/strategies/NostalgiaForInfinityX.py", line 10392, in populate_entry_trend & (dataframe['btc_pct_close_max_72_5m'] < 1.03) File "/home/ftuser/.local/lib/python3.10/site-packages/pandas/core/frame.py", line 3805, in getitem indexer = self.columns.get_loc(key) File "/home/ftuser/.local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc raise KeyError(key) from err KeyError: 'btc_pct_close_max_72_5m'

Kleingeldprinz commented 1 year ago

Are you try to trade, or just backtesting?

Mandark-droid commented 1 year ago

The issue is with the custom test while using the docker file. Have removed the test part of it after that its able to work and backtesting is also working fine thanks