Code Monkey home page Code Monkey logo

multima_tsl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multima_tsl's Issues

Forcebuy not working

Hi!
Today I tried to test your strategy.
Quite quickly realized, that it was impossible to force the purchase of cryptocurrency (forcebuy, via web interface FreqUI).
This is made impossible by the confirm_trade_entry() function returning False, most likely (I haven't debugged the code) after checking the condition:

        if ((rate > last_candle['close'])) :
            return False

i don't know if it's intentional, rather i guess it's a side effect :-)
I find forcebuy very useful when verifying that a strategy is working fine.

I will follow the progress with interest!

Regards,
Jurek

P.S.
I checked, after commenting these two lines of code,
I can buy the crypto I want.

Dry/live mode detect

There's an incorrect detection of dry/live mode on line 243 which means webserver backtesting will trigger the custom stoploss
sell.
if not self.config['runmode'].value in ('backtest', 'hyperopt'):
should be
if self.config['runmode'].value in ('live', 'dry_run'):

6 positions bought/sold overnight and nothing for next 8 hours

Hi, I am just starting out with this strategy and I'll admit - it's more complex (the code) than I am accustomed to with the Python language, so maybe this answer is obvious to some but not myself yet.

However, backtests performed very well.

I hyperopted, got it to a point I was happy, then launched it in live mode with $288 USDT and "unlimited" position size, max 5 positions.

It bought and sold 6 positions at a nice profit while I was sleeping, but I have noticed it stopped buying after that and hasn't made any purchases for 8 hours. I'm running this with around 150 pairs.

The stark contrast between the first 5 hours and the last 8 hours has me wondering if I've configured something incorrectly, or there is an aspect to this strategy I don't understand, which would cause it to "pause"? There is nothing in the console log to give me a hint.

thanks, appreciate any insight!

ROI: Closed trades
∙ 5.980 USDT (1.39%) (2.07 Σ%)
∙ 6.039 USD
ROI: All trades
∙ 5.980 USDT (1.39%) (2.07 Σ%)
∙ 6.039 USD
Total Trade Count: 6
First Trade opened: 13 hours ago
Latest Trade opened: 8 hours ago
Win / Loss: 6 / 0
Avg. Duration: 0:45:05
Best Performing: MDT/USDT: 2.78%

Unable to hyperopt

I am trying to Hyperopt the strategy using this command:
dcr freqtrade hyperopt -i 5m -s MultiMA_TSL3a -c user_data/config-backtest.json --hyperopt-loss SharpeHyperOptLoss

But I am getting this error.
2022-04-08 11:10:34,798 - freqtrade - ERROR - The 'buy' space is included into the hyperoptimization but no parameter for this space was not found in your Strategy. Please make sure to have parameters for this space enabled for optimization or remove the 'buy' space from hyperoptimization.

Please help.

MultiMA_TSL3b name 'tv_hma' is not defined

If i want to run your strategy from patreon i get this error every time:

Traceback (most recent call last): File "/freqtrade/freqtrade/main.py", line 37, in main return_code = args['func'](args) File "/freqtrade/freqtrade/commands/optimize_commands.py", line 54, in start_backtesting backtesting.start() File "/freqtrade/freqtrade/optimize/backtesting.py", line 931, in start min_date, max_date = self.backtest_one_strategy(strat, data, timerange) File "/freqtrade/freqtrade/optimize/backtesting.py", line 868, in backtest_one_strategy results = self.backtest( File "/freqtrade/freqtrade/optimize/backtesting.py", line 731, in backtest data: Dict = self._get_ohlcv_as_lists(processed) File "/freqtrade/freqtrade/optimize/backtesting.py", line 278, in _get_ohlcv_as_lists self.strategy.advise_buy(pair_data, {'pair': pair}), {'pair': pair}).copy() File "/freqtrade/freqtrade/strategy/interface.py", line 940, in advise_buy return self.populate_buy_trend(dataframe, metadata) File "/freqtrade/user_data/strategies/MultiMA_TSL3b.py", line 300, in populate_buy_trend dataframe['hma_offset_buy'] = tv_hma(dataframe, int(self.base_nb_candles_buy_hma.value)) *self.low_offset_hma.value NameError: name 'tv_hma' is not defined

Exception: inputs are all NaN

I am getting this error while backtesting: Here is the log:

$ dcr freqtrade backtesting -i 15m -s MultiMA_TSL3 -c user_data/config-backtest.json 2022-04-06 16:47:32,259 - freqtrade.configuration.configuration - INFO - Using config: user_data/config-backtest.json ... 2022-04-06 16:47:32,260 - freqtrade.loggers - INFO - Verbosity set to 0 2022-04-06 16:47:32,260 - freqtrade.configuration.configuration - INFO - Parameter -i/--timeframe detected ... Using timeframe: 15m ... 2022-04-06 16:47:32,260 - freqtrade.configuration.configuration - INFO - Using max_open_trades: 15 ... 2022-04-06 16:47:32,276 - freqtrade.configuration.configuration - INFO - Using user-data directory: /freqtrade/user_data ... 2022-04-06 16:47:32,277 - freqtrade.configuration.configuration - INFO - Using data directory: /freqtrade/user_data/data/binance ... 2022-04-06 16:47:32,277 - freqtrade.configuration.configuration - INFO - Overriding timeframe with Command line argument 2022-04-06 16:47:32,277 - freqtrade.configuration.configuration - INFO - Parameter --cache=day detected ... 2022-04-06 16:47:32,277 - freqtrade.configuration.check_exchange - INFO - Checking exchange... 2022-04-06 16:47:32,291 - freqtrade.configuration.check_exchange - INFO - Exchange "binance" is officially supported by the Freqtrade development team. 2022-04-06 16:47:32,291 - freqtrade.configuration.configuration - INFO - Using pairlist from configuration. 2022-04-06 16:47:32,292 - freqtrade.configuration.config_validation - INFO - Validating configuration ... 2022-04-06 16:47:32,295 - freqtrade.commands.optimize_commands - INFO - Starting freqtrade in Backtesting mode 2022-04-06 16:47:32,296 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled 2022-04-06 16:47:32,296 - freqtrade.exchange.exchange - INFO - Using CCXT 1.76.65 2022-04-06 16:47:32,314 - freqtrade.exchange.exchange - INFO - Using Exchange "Binance" 2022-04-06 16:47:32,944 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Binance'... 2022-04-06 16:47:32,997 - freqtrade.resolvers.iresolver - INFO - Using resolved strategy MultiMA_TSL3 from '/freqtrade/user_data/strategies/MultiMA_TSL3.py'... 2022-04-06 16:47:32,997 - freqtrade.strategy.hyper - INFO - Found no parameter file. 2022-04-06 16:47:32,997 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_buy_ema = 9 2022-04-06 16:47:32,997 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_buy_ema2 = 75 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_buy_hma = 70 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_buy_hma2 = 12 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_buy_trima = 15 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_buy_trima2 = 38 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_buy_zema = 25 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_buy_zema2 = 53 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: buy_condition_hma_enable = True 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: buy_condition_trima_enable = True 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: buy_condition_zema_enable = True 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter(default): buy_rsi_fast = 35 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: ewo_high = 2.615 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: ewo_high2 = 2.188 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: ewo_low = -19.632 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: ewo_low2 = -19.955 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter(default): fast_ewo = 50 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_offset_ema = 1.067 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_offset_ema2 = 0.973 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_offset_hma = 0.948 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_offset_hma2 = 0.941 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_offset_trima = 0.959 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_offset_trima2 = 0.949 2022-04-06 16:47:32,998 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_offset_zema = 0.958 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_offset_zema2 = 0.961 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: rsi_buy = 60 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: rsi_buy2 = 45 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter(default): slow_ewo = 200 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: base_nb_candles_ema_sell = 5 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter(default): base_nb_candles_ema_sell2 = 20 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: high_offset_sell_ema = 0.994 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: cooldown_lookback = 2 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_profit_lookback = 48 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_profit_min_req = 0.04 2022-04-06 16:47:32,999 - freqtrade.strategy.hyper - INFO - Strategy Parameter: low_profit_stop_duration = 14 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'timeframe' with value in config file: 15m. 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'order_types' with value in config file: {'buy': 'market', 'sell': 'market', 'emergencysell': 'market', 'trailing_stop_loss': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False, 'stoploss_on_exchange_interval': 60}. 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_currency' with value in config file: USDT. 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_amount' with value in config file: 30. 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'unfilledtimeout' with value in config file: {'buy': 15, 'sell': 15, 'unit': 'minutes', 'exit_timeout_count': 0}. 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using minimal_roi: {'0': 100} 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using timeframe: 15m 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stoploss: -0.25 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop: False 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop_positive: 0.01 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop_positive_offset: 0.018 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_only_offset_is_reached: True 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_custom_stoploss: True 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using process_only_new_candles: True 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_types: {'buy': 'market', 'sell': 'market', 'emergencysell': 'market', 'trailing_stop_loss': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False, 'stoploss_on_exchange_interval': 60} 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_time_in_force: {'buy': 'gtc', 'sell': 'gtc'} 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_currency: USDT 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_amount: 30 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using protections: [{'method': 'CooldownPeriod', 'stop_duration_candles': 2}, {'method': 'LowProfitPairs', 'lookback_period_candles': 48, 'trade_limit': 1, 'stop_duration': 14, 'required_profit': 0.04}] 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using startup_candle_count: 400 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using unfilledtimeout: {'buy': 15, 'sell': 15, 'unit': 'minutes', 'exit_timeout_count': 0} 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_sell_signal: True 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using sell_profit_only: False 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_roi_if_buy_signal: False 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using sell_profit_offset: 0.0 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using disable_dataframe_checks: False 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_buying_expired_candle_after: 0 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using position_adjustment_enable: False 2022-04-06 16:47:33,000 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_entry_position_adjustment: -1 2022-04-06 16:47:33,001 - freqtrade.configuration.config_validation - INFO - Validating configuration ... 2022-04-06 16:47:33,014 - freqtrade.resolvers.iresolver - INFO - Using resolved pairlist StaticPairList from '/freqtrade/freqtrade/plugins/pairlist/StaticPairList.py'... 2022-04-06 16:47:33,211 - freqtrade.data.history.history_utils - INFO - Using indicator startup period: 400 ... 2022-04-06 16:47:36,781 - freqtrade.optimize.backtesting - INFO - Loading data from 2021-12-07 00:00:00 up to 2022-04-06 16:00:00 (120 days). 2022-04-06 16:47:36,781 - freqtrade.configuration.timerange - WARNING - Moving start-date by 400 candles to account for startup time. 2022-04-06 16:47:36,781 - freqtrade.optimize.backtesting - INFO - Dataload complete. Calculating indicators 2022-04-06 16:47:36,782 - freqtrade.optimize.backtesting - WARNING - Backtest result caching disabled due to use of open-ended timerange. 2022-04-06 16:47:36,782 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy MultiMA_TSL3 2022-04-06 16:47:56,649 - freqtrade.data.converter - WARNING - MULTI/USDT has no data left after adjusting for startup candles, skipping. 2022-04-06 16:47:56,675 - freqtrade.optimize.backtesting - INFO - Backtesting with data from 2021-12-11 04:00:00 up to 2022-04-06 16:00:00 (116 days). 2022-04-06 16:47:57,410 - freqtrade - ERROR - Fatal exception! Traceback (most recent call last): File "/freqtrade/freqtrade/main.py", line 37, in main return_code = args['func'](args) File "/freqtrade/freqtrade/commands/optimize_commands.py", line 58, in start_backtesting backtesting.start() File "/freqtrade/freqtrade/optimize/backtesting.py", line 932, in start min_date, max_date = self.backtest_one_strategy(strat, data, timerange) File "/freqtrade/freqtrade/optimize/backtesting.py", line 869, in backtest_one_strategy results = self.backtest( File "/freqtrade/freqtrade/optimize/backtesting.py", line 732, in backtest data: Dict = self._get_ohlcv_as_lists(processed) File "/freqtrade/freqtrade/optimize/backtesting.py", line 279, in _get_ohlcv_as_lists self.strategy.advise_buy(pair_data, {'pair': pair}), {'pair': pair}).copy() File "/freqtrade/freqtrade/strategy/interface.py", line 939, in advise_buy return self.populate_buy_trend(dataframe, metadata) File "/freqtrade/user_data/strategies/MultiMA_TSL3.py", line 409, in populate_buy_trend dataframe['zema_offset_buy2'] = zema(dataframe, int(self.base_nb_candles_buy_zema2.value)) *self.low_offset_zema2.value File "/home/ftuser/.local/lib/python3.9/site-packages/technical/indicators/overlap_studies.py", line 99, in zema dataframe["ema2"] = ema(dataframe, period, "ema1") File "/home/ftuser/.local/lib/python3.9/site-packages/technical/indicators/overlap_studies.py", line 45, in ema return ta.EMA(dataframe, timeperiod=period, price=field) File "talib/_abstract.pxi", line 427, in talib._ta_lib.Function.__call__ File "talib/_abstract.pxi", line 472, in talib._ta_lib.Function.__call_function File "/home/ftuser/.local/lib/python3.9/site-packages/talib/__init__.py", line 64, in wrapper result = func(*_args, **_kwds) File "talib/_func.pxi", line 2931, in talib._ta_lib.EMA File "talib/_func.pxi", line 68, in talib._ta_lib.check_begidx1 Exception: inputs are all NaN

Please help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.