Giter Club home page Giter Club logo

freqtrade-strategies's Introduction

Freqtrade strategies

This Git repo contains free buy/sell strategies for Freqtrade.

All strategies should work with a freqtrade version of 2022.4 or newer.

Disclaimer

These strategies are for educational purposes only. Do not risk money which you are afraid to lose. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS.

Always start by testing strategies with a backtesting then run the trading bot in Dry-run. Do not engage money before you understand how it works and what profit/loss you should expect.

We strongly recommend you to have coding and Python knowledge. Do not hesitate to read the source code and understand the mechanism of this bot.

Table of Content

Free trading strategies

Value below are result from backtesting from 2018-01-10 to 2018-01-30 and
exit_profit_only enabled. More detail on each strategy page.

Strategy Buy count AVG profit % Total profit AVG duration Backtest period
Strategy 001 55 0.05 0.00012102 476.1 2018-01-10 to 2018-01-30
Strategy 002 9 3.21 0.00114807 189.4 2018-01-10 to 2018-01-30
Strategy 003 14 1.47 0.00081740 227.5 2018-01-10 to 2018-01-30
Strategy 004 37 0.69 0.00102128 367.3 2018-01-10 to 2018-01-30
Strategy 005 180 1.16 0.00827589 156.2 2018-01-10 to 2018-01-30

Strategies from this repo are free to use. Feel free to update them to your likings. Most of them were designed from Hyperopt calculations.

Some only work in specific market conditions, while others are more "general purpose" strategies. It's noteworthy that depending on the exchange and Pairs used, further optimization can bring better results.

Please keep in mind, results will heavily depend on the pairs, timeframe and timerange used to backtest - so please run your own backtests that mirror your usecase, to evaluate each strategy for yourself.

The results above should serve as a general outline to demonstrate the number of trades to expect. Actual performance will be different based on various factors.

Share your own strategies and contribute to this repo

Feel free to send your strategies, comments, optimizations and pull requests via an Issue ticket or as a Pull request enhancing this repository.

FAQ

What is Freqtrade?

Freqtrade Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.

What includes these strategies?

Each Strategies includes:

  • Minimal ROI: Minimal ROI optimized for the strategy.
  • Stoploss: Optimimal stoploss.
  • Buy signals: Result from Hyperopt or based on exisiting trading strategies.
  • Sell signals: Result from Hyperopt or based on exisiting trading strategies.
  • Indicators: Includes the indicators required to run the strategy.

Best backtest multiple strategies with the exchange and pairs you're interrested in, and finetune the strategy to the markets you're trading.

How to install a strategy?

First you need a working Freqtrade.

Once you have the bot on the right version, follow this steps:

  1. Select the strategy you want. All strategies of the repo are into user_data/strategies
  2. Copy the strategy file
  3. Paste it into your user_data/strategies folder
  4. Run the bot with the parameter --strategy <STRATEGY CLASS NAME> (ex: freqtrade trade --strategy Strategy001)

More information about backtesting and strategy customization.

How to test a strategy?

Let assume you have selected the strategy strategy001.py:

Simple backtesting

freqtrade backtesting --strategy Strategy001

Refresh your test data

freqtrade download-data --days 100

Note: Generally, it's recommended to use static backtest data (from a defined period of time) for comparable results.

Please check out the official backtesting documentation for more information.

freqtrade-strategies's People

Contributors

berlinguyinca avatar bmoulkaf avatar caglarylmz avatar felipefernandesleandro avatar froggleston avatar gaugau3000 avatar glonlas avatar hroff-1902 avatar il-katta avatar juankysoriano avatar lazydroid avatar lebonez avatar mablue avatar mishaker avatar oonid avatar otenmoten avatar pedropovoleri avatar psionyx2311 avatar redian avatar shusso avatar snussik avatar stash86 avatar swekka avatar thejoeschr avatar threeco avatar thuruv avatar trebornamor avatar wluciano avatar xl-reaper avatar xmatthias avatar

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  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

freqtrade-strategies's Issues

backtesting issue in returning a resample dataframe

The strategy ReinforcedAverageStrategy in the folder Berlinguyinca https://github.com/freqtrade/freqtrade-strategies/tree/master/user_data/strategies/berlinguyinca works perfectly in real-mode and dry-mode but does not work with backtesting. This stradegy manipulates the dataframe before returning it to the populate_buy_trend method, namelly adding the column called resample_sma

I noticed that if you print the dataframe in backtesting mode, the column called resample_sma follows the buy columns in the resulting dataframe, see:

['date', 'open', 'high', 'low', 'close', 'volume', 'maShort', 'maMedium', 'bb_lowerband', 'bb_upperband', 'bb_middleband', 'buy', 'sell', 'resample_sma']
date open high ... buy sell resample_sma
475 2020-01-09 22:45:00+00:00 0.000028 0.000029 ... 0 0 NaN
476 2020-01-09 23:00:00+00:00 0.000029 0.000029 ... 0 0 NaN
477 2020-01-09 23:15:00+00:00 0.000028 0.000028 ... 0 0 NaN
478 2020-01-09 23:30:00+00:00 0.000028 0.000028 ... 0 0 NaN
479 2020-01-09 23:45:00+00:00 0.000028 0.000028 ... 0 0 NaN

[5 rows x 14 columns]
['date', 'open', 'high', 'low', 'close', 'volume', 'maShort', 'maMedium', 'bb_lowerband', 'bb_upperband', 'bb_middleband', 'buy', 'sell', 'resample_sma']
date open high ... buy sell resample_sma
475 2020-01-09 22:45:00+00:00 0.001830 0.001835 ... 0 0 NaN
476 2020-01-09 23:00:00+00:00 0.001834 0.001835 ... 0 0 NaN
477 2020-01-09 23:15:00+00:00 0.001833 0.001836 ... 0 0 NaN
478 2020-01-09 23:30:00+00:00 0.001836 0.001839 ... 0 0 NaN
479 2020-01-09 23:45:00+00:00 0.001838 0.001844 ... 0 0 NaN

while the same strategy ReinforcedAverageStrategy in dry-mode returns a correct dataframe with the columns buy and sell at the end. See below:

[5 rows x 14 columns]
['date', 'open', 'high', 'low', 'close', 'volume', 'maShort', 'maMedium', 'bb_lowerband', 'bb_upperband', 'bb_middleband', 'resample_sma', 'buy', 'sell']
date open high ... resample_sma buy sell
494 2020-01-15 20:30:00+00:00 0.000277 0.000278 ... NaN NaN NaN
495 2020-01-15 20:45:00+00:00 0.000276 0.000276 ... NaN NaN NaN
496 2020-01-15 21:00:00+00:00 0.000276 0.000278 ... NaN NaN NaN
497 2020-01-15 21:15:00+00:00 0.000277 0.000277 ... NaN NaN NaN
498 2020-01-15 21:30:00+00:00 0.000275 0.000276 ... NaN NaN NaN

[5 rows x 14 columns]
['date', 'open', 'high', 'low', 'close', 'volume', 'maShort', 'maMedium', 'bb_lowerband', 'bb_upperband', 'bb_middleband', 'resample_sma', 'buy', 'sell']
date open high ... resample_sma buy sell
494 2020-01-15 20:30:00+00:00 0.000002 0.000002 ... NaN NaN NaN
495 2020-01-15 20:45:00+00:00 0.000002 0.000002 ... NaN NaN NaN
496 2020-01-15 21:00:00+00:00 0.000002 0.000002 ... NaN NaN NaN
497 2020-01-15 21:15:00+00:00 0.000002 0.000002 ... NaN NaN 1.0
498 2020-01-15 21:30:00+00:00 0.000002 0.000002 ... NaN NaN NaN

I tried different variation of returning a resampled dataframe to populate_buy_trend method, but I have the same problem described above in the case of backtesting, any suggestions?

Bot doesn't seem to be buying when Close is inferior to the Linear Regression Line - ATR (Dry Run)

Hi Team - I would really appreciate your help with this. I have reviewed the code several times to try and determine the issue. Thanks

Issue
I have backtested this strategy and had a look at the output dataframe and the buy signals seems to be generated correctly. However, when I run it in dry-run mode the bot seems to buy irrespective of whether the close is inferior to the linear regression line - 1 *ATR. It just seems to sporadically generate buy signals.

I have attached a screenshot from tradeview showing when the bot decided to buy in dry run mode. The black line is the close, blue is the 25 candle linear regression line, red is the upper/lower +/- 1 ATR.

Screenshot from 2020-08-24 07-29-37

What indicators are required?
Linear Regression Angle
Linear Regression Line/Channel
RSI

   **# RSI
    dataframe['rsi'] = ta.RSI(dataframe)

    # Linear Regression Angle
    dataframe['angle'] = ta.LINEARREG_ANGLE(dataframe['close'], timeperiod=5)

    # Linear Regression Line
    dataframe['lr_middle'] = ta.LINEARREG(dataframe['close'], timeperiod=25)
    dataframe['atr'] = ta.ATR(dataframe,timeperiod=25)
    dataframe['lr_lower1.0'] = dataframe['lr_middle'] - dataframe['atr'] * 1**

Please explain in details the indicators you need to run the buy strategy, then
explain in detail what is the trigger to buy.

Buy if last 5 candles show a strong downtrend (linear regression angle) and close is inferior to the 25 candle linear regression line - 1 * ATR (over 25 candles)

**def populate_buy_trend(self, dataframe: DataFrame) -> DataFrame:
    dataframe.loc[
        (
            (dataframe['angle'] < -0.1) &
            (dataframe['close'] < dataframe['lr_lower1.0']) &
            (dataframe['volume'] > 0)
        ),
        'buy'] = 1
    return dataframe**

Step 1: Explain the Sell Strategy

Please explain in details the indicators you need to run the sell strategy, then
explain in detail what is the trigger to sell.

Sell if RSI is greater than 31 and close is superior to the 25 candle linear regression line

**def populate_sell_trend(self, dataframe: DataFrame) -> DataFrame:
    dataframe.loc[
        (
            (dataframe['rsi'] > 31) &
            (dataframe['close'] > dataframe['lr_middle']) &
            (dataframe['volume'] > 0)
        ),
        'sell'] = 1
    return dataframe**

has no attribute 'crossed_under'

Hi!
I have working strategy but if i try to add EMA I get this error with backtesting and with bot itself.
I get this error even when i just write it in def populate_indicators.
dataframe['ema20'] = ta.EMA(dataframe, timeperiod=20)
dataframe['ema50'] = ta.EMA(dataframe, timeperiod=50)
dataframe['ema100'] = ta.EMA(dataframe, timeperiod=100)

and i have tried with Binance EMAs (7/25/99) but nothing works.

My entry point is (and where i try to add EMA):
(dataframe['close'] < dataframe['bb_lowerband'])&
(dataframe['macd'] < 0)

Can anybody please tell me what i'm doing wrong?
Thanks!!

2019-07-12 17:39:07,182 - freqtrade.optimize.backtesting - INFO - Backtesting with data from 2019-06-09T09:45:00+00:00 up to 2019-07-12T13:30:00+00:00 (33 days)..
2019-07-12 17:39:07,197 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
File "/home/remy2/freqtrade-develop/freqtrade/main.py", line 46, in main
args.func(args)
File "/home/remy2/freqtrade-develop/freqtrade/optimize/init.py", line 61, in start_backtesting
backtesting.start()
File "/home/remy2/freqtrade-develop/freqtrade/optimize/backtesting.py", line 452, in start
'end_date': max_date,
File "/home/remy2/freqtrade-develop/freqtrade/optimize/backtesting.py", line 339, in backtest
ticker: Dict = self._get_ticker_list(processed)
File "/home/remy2/freqtrade-develop/freqtrade/optimize/backtesting.py", line 223, in _get_ticker_list
self.advise_buy(pair_data, {'pair': pair}), {'pair': pair})[headers].copy()
File "/home/remy2/freqtrade-develop/freqtrade/strategy/interface.py", line 400, in advise_buy
return self.populate_buy_trend(dataframe, metadata)
File "/home/remy2/freqtrade-develop/freqtrade/strategy/default_strategy.py", line 77, in populate_buy_trend
'buy'] = 1
AttributeError: module 'freqtrade.vendor.qtpylib.indicators' has no attribute 'crossed_under'
remy2@remy2-Vostro-3360:~/freqtrade-develop$

How to use HyperOpt results in strategy

Hello

I did not where to ask this, but is there any documentation about how to use HyperOpt results inside the strategy I'm trying to optimise?

Thanks a lot !

hyperopts for the strategies

All the strategies published in freqtrade-strategies should be supplied with corresponding Hyperopts to adjust the constants used in them basing on actual historical data.

For example:
There should be MACDHyperopt for the MACDStrategy (https://github.com/freqtrade/freqtrade-strategies/blob/master/user_data/strategies/berlinguyinca/MACDStrategy.py) which would allow to adjust upper and lower borders for CCI band, which is now hardcoded to (-50.0, 100.0), as well as to select best roi and stoploss.

Strategy 002 - Details

Summary

File: strategy002.py
Source: Hyperopt result

How to install?

  1. Copy the file strategy002.py into your user_data/strategies folder
  2. Run the bot: python3 ./freqtrade/main.py -s strategy002

Performance

Period 1: From 2017-11-19 to 2017-12-20

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              120            2.22          0.01065243          1846.5       120       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              174            0.66          0.00456240           190.8       123      51

Period 2: From 2017-12-19 to 2017-01-20

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              158            2.67          0.01686667           387.9       158       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              164            1.83          0.01198192           133.8       136      28

Period 3: From 2018-01-10 to 2018-01-30

Tested on: Freqtrade 0.16.1

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL                9            3.21          0.00114807           189.4        9       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL                9            2.61          0.00093394           170.0        6       3

Backtesting Logs


Period 1: From 2017-11-19 to 2017-12-20 - Profit ON

2018-01-20 22:36:41,494 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-on.json ...
2018-01-20 22:36:41,496 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 22:36:41,500 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 22:36:41,501 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 22:36:41,501 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 22:36:41,502 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 22:36:42,616 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 22:36:42,714 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy002.py)
2018-01-20 22:36:44,931 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-11-19T05:05:00+00:00 up to 2017-12-19T23:55:00+00:00 ...
2018-01-20 22:36:50,423 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              4            2.59          0.00041415          3136.2         4       0
BTC_NEO              4            1.20          0.00019163          7333.8         4       0
BTC_NXT              2            4.62          0.00036921            32.5         2       0
BTC_MCO              0          nan             0.00000000           nan           0       0
BTC_ETH              6            1.41          0.00033782          1360.0         6       0
BTC_BCC              7            2.25          0.00062942          2546.4         7       0
BTC_VOX              3            3.62          0.00043405            71.7         3       0
BTC_GUP              4            2.58          0.00041232            95.0         4       0
BTC_SC               1            1.11          0.00004435            70.0         1       0
BTC_VTC              5            3.07          0.00061445           194.0         5       0
BTC_STRAT            5            1.59          0.00031884           821.0         5       0
BTC_OMG              4            2.04          0.00032638          5750.0         4       0
BTC_OK               2            1.10          0.00008891           160.0         2       0
BTC_EDG              6            2.15          0.00051755          1148.3         6       0
BTC_STORJ            2            3.39          0.00027138          7600.0         2       0
BTC_EMC2             6            3.40          0.00081249           240.0         6       0
BTC_XLM              4            1.99          0.00031832            62.5         4       0
BTC_LSK              4            1.71          0.00027317          1337.5         4       0
BTC_SYS              5            1.39          0.00027850           843.0         5       0
BTC_POWR             1            1.66          0.00006638         16155.0         1       0
BTC_PAY              4            2.34          0.00037538            82.5         4       0
BTC_DGB              2            4.02          0.00032237          2907.5         2       0
BTC_ETC              2            2.56          0.00020539          9067.5         2       0
BTC_XRP              2            2.11          0.00016914         12682.5         2       0
BTC_LTC              2            0.74          0.00005925           967.5         2       0
BTC_IOP              2            1.24          0.00009872           260.0         2       0
BTC_RCN              3            2.80          0.00033645            68.3         3       0
BTC_BTG              1            2.88          0.00011487           150.0         1       0
BTC_MONA             2            3.93          0.00031361            77.5         2       0
BTC_SALT             2            1.43          0.00011448           117.5         2       0
BTC_DASH             6            1.51          0.00036205           532.5         6       0
BTC_QTUM             3            2.16          0.00026009          4338.3         3       0
BTC_CVC              1            1.53          0.00006147           290.0         1       0
BTC_KMD              3            2.64          0.00031706            66.7         3       0
BTC_XEM              2            1.05          0.00008389            72.5         2       0
BTC_XMR              2            2.35          0.00018787           992.5         2       0
BTC_ZEC              1            1.62          0.00006483          2565.0         1       0
BTC_WAVES            3            2.41          0.00028988           208.3         3       0
BTC_PIVX             0          nan             0.00000000           nan           0       0
BTC_XZC              2            2.45          0.00019631           115.0         2       0
TOTAL              120            2.22          0.01065243          1846.5       120       0

Period 1: From 2017-11-19 to 2017-12-20 - Profit OFF

2018-01-20 22:36:41,494 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-off.json ...
2018-01-20 22:36:41,495 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 22:36:41,500 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 22:36:41,501 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 22:36:41,501 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 22:36:41,501 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 22:36:42,616 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 22:36:42,714 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy002.py)
2018-01-20 22:36:44,931 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-11-19T05:05:00+00:00 up to 2017-12-19T23:55:00+00:00 ...
2018-01-20 22:36:50,493 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              5            1.53          0.00030508           152.0         4       1
BTC_NEO              9            1.38          0.00049734           133.3         7       2
BTC_NXT              2            4.62          0.00036921            32.5         2       0
BTC_MCO              0          nan             0.00000000           nan           0       0
BTC_ETH              8           -0.25         -0.00007980           185.6         5       3
BTC_BCC             10           -0.58         -0.00023095           292.0         7       3
BTC_VOX              3            3.62          0.00043405            71.7         3       0
BTC_GUP              4            2.58          0.00041232            95.0         4       0
BTC_SC               1            1.11          0.00004435            70.0         1       0
BTC_VTC              6            2.63          0.00063238           121.7         5       1
BTC_STRAT            6           -2.70         -0.00065031           310.8         1       5
BTC_OMG              9           -0.96         -0.00034817           267.2         5       4
BTC_OK               2            1.10          0.00008891           160.0         2       0
BTC_EDG              7            0.85          0.00024098           187.1         5       2
BTC_STORJ            4           -2.85         -0.00045632           230.0         1       3
BTC_EMC2             6            2.31          0.00055032           170.0         5       1
BTC_XLM              4            1.99          0.00031832            62.5         4       0
BTC_LSK              4           -2.03         -0.00032461           415.0         2       2
BTC_SYS              6            0.39          0.00009417           179.2         5       1
BTC_POWR             3           -0.89         -0.00010752           251.7         2       1
BTC_PAY              5            0.82          0.00016409           128.0         4       1
BTC_DGB              4           -1.44         -0.00023175           226.2         2       2
BTC_ETC              5           -1.38         -0.00027587           289.0         3       2
BTC_XRP              2           -0.97         -0.00007794           455.0         1       1
BTC_LTC              2           -1.84         -0.00014689           292.5         0       2
BTC_IOP              3            1.52          0.00018047           146.7         2       1
BTC_RCN              5            3.60          0.00072001            83.0         5       0
BTC_BTG              3            0.51          0.00006137           193.3         2       1
BTC_MONA             3            0.77          0.00009063           263.3         2       1
BTC_SALT             3            2.52          0.00030208            98.3         3       0
BTC_DASH             7            0.14          0.00003873           145.0         5       2
BTC_QTUM             6           -2.29         -0.00055066           246.7         2       4
BTC_CVC              4            0.92          0.00014730           227.5         3       1
BTC_KMD              7            5.72          0.00160123            59.3         7       0
BTC_XEM              3            1.17          0.00014075           145.0         3       0
BTC_XMR              3           -0.28         -0.00003327           271.7         1       2
BTC_ZEC              2            0.87          0.00006988           225.0         1       1
BTC_WAVES            5            2.42          0.00048501           145.0         5       0
BTC_PIVX             0          nan             0.00000000           nan           0       0
BTC_XZC              3            0.73          0.00008748           181.7         2       1
TOTAL              174            0.66          0.00456240           190.8       123      51

Period 2: From 2017-12-19 to 2017-01-20 - Profit ON

2018-01-20 22:36:41,478 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-on.json ...
2018-01-20 22:36:41,479 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 22:36:41,483 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 22:36:41,484 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 22:36:41,484 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 22:36:41,484 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 22:36:42,646 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 22:36:42,714 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy002.py)
2018-01-20 22:36:44,968 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-12-19T00:00:00+00:00 up to 2018-01-19T23:55:00+00:00 ...
2018-01-20 22:36:50,476 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              4            4.19          0.00067133            43.8         4       0
BTC_NEO              3            1.41          0.00016948          1395.0         3       0
BTC_NXT              3            1.59          0.00019180            81.7         3       0
BTC_MCO              3            3.17          0.00038168            63.3         3       0
BTC_ETH              5            1.37          0.00027455           215.0         5       0
BTC_BCC              5            1.19          0.00023933           287.0         5       0
BTC_VOX              7            1.99          0.00056045           115.0         7       0
BTC_GUP              4            3.09          0.00049535           436.2         4       0
BTC_SC               0          nan             0.00000000           nan           0       0
BTC_VTC              3            2.26          0.00027136            71.7         3       0
BTC_STRAT            5            1.31          0.00026102          1568.0         5       0
BTC_OMG              0          nan             0.00000000           nan           0       0
BTC_OK               3            2.43          0.00029189            93.3         3       0
BTC_EDG              6            2.63          0.00062995           519.2         6       0
BTC_STORJ            3            4.42          0.00052919           110.0         3       0
BTC_EMC2             3            4.42          0.00052601           138.3         3       0
BTC_XLM              6            5.06          0.00120631           116.7         6       0
BTC_LSK              4            2.49          0.00039845            93.8         4       0
BTC_SYS              4            3.35          0.00053656            85.0         4       0
BTC_POWR             3            1.97          0.00023518            98.3         3       0
BTC_PAY              6            2.19          0.00052661           220.8         6       0
BTC_DGB              6            4.00          0.00095373            42.5         6       0
BTC_ETC              2            2.71          0.00021710          4375.0         2       0
BTC_XRP             10            3.14          0.00125488           178.0        10       0
BTC_LTC              5            1.24          0.00024801           200.0         5       0
BTC_IOP              5            3.69          0.00074024           100.0         5       0
BTC_RCN              5            2.72          0.00054394           129.0         5       0
BTC_BTG              1            1.14          0.00004550            65.0         1       0
BTC_MONA             4            1.24          0.00019847           186.2         4       0
BTC_SALT             6            3.21          0.00077077           370.0         6       0
BTC_DASH             5            1.54          0.00030862          2551.0         5       0
BTC_QTUM             4            2.97          0.00047637           113.8         4       0
BTC_CVC              4            2.36          0.00037783            82.5         4       0
BTC_KMD              2            1.49          0.00011953           157.5         2       0
BTC_XEM              3            1.98          0.00023820          1690.0         3       0
BTC_XMR              0          nan             0.00000000           nan           0       0
BTC_ZEC              5            2.45          0.00049009            85.0         5       0
BTC_WAVES            4            1.45          0.00023159            95.0         4       0
BTC_PIVX             4            6.13          0.00098137            58.8         4       0
BTC_XZC              3            2.30          0.00027393            93.3         3       0
TOTAL              158            2.67          0.01686667           387.9       158       0

Period 2: From 2017-12-19 to 2017-01-20 - Profit OFF

gies/user_data/config-profit-off.json ...
2018-01-20 22:36:41,557 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 22:36:41,562 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 22:36:41,563 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 22:36:41,563 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 22:36:41,563 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 22:36:42,646 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 22:36:42,714 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy002.py)
2018-01-20 22:36:44,992 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-12-19T00:00:00+00:00 up to 2018-01-19T23:55:00+00:00 ...
2018-01-20 22:36:50,732 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              4            4.19          0.00067133            43.8         4       0
BTC_NEO              3           -1.08         -0.00012874           185.0         2       1
BTC_NXT              3            1.59          0.00019180            81.7         3       0
BTC_MCO              3            3.17          0.00038168            63.3         3       0
BTC_ETH              5            1.27          0.00025566           190.0         4       1
BTC_BCC              5            0.31          0.00006151           141.0         3       2
BTC_VOX              7            1.59          0.00045042           110.7         6       1
BTC_GUP              4            2.44          0.00039092           152.5         3       1
BTC_SC               0          nan             0.00000000           nan           0       0
BTC_VTC              3            2.26          0.00027136            71.7         3       0
BTC_STRAT            6           -2.72         -0.00065162           347.5         3       3
BTC_OMG              0          nan             0.00000000           nan           0       0
BTC_OK               3            2.43          0.00029189            93.3         3       0
BTC_EDG              6            1.16          0.00027652           151.7         5       1
BTC_STORJ            3            4.42          0.00052919           110.0         3       0
BTC_EMC2             3            4.42          0.00052601           138.3         3       0
BTC_XLM              6            2.51          0.00059543            98.3         4       2
BTC_LSK              4            2.49          0.00039845            93.8         4       0
BTC_SYS              4            3.35          0.00053656            85.0         4       0
BTC_POWR             3            1.97          0.00023518            98.3         3       0
BTC_PAY              6            1.46          0.00035111           155.8         4       2
BTC_DGB              6            4.00          0.00095373            42.5         6       0
BTC_ETC              3           -1.67         -0.00020159           305.0         2       1
BTC_XRP             10            2.84          0.00113529           170.0         8       2
BTC_LTC              6            0.84          0.00020234           130.0         5       1
BTC_IOP              5            3.69          0.00074024           100.0         5       0
BTC_RCN              5            2.72          0.00054394           129.0         5       0
BTC_BTG              1            1.14          0.00004550            65.0         1       0
BTC_MONA             4            0.43          0.00006899           176.2         3       1
BTC_SALT             7            2.46          0.00068860            92.1         5       2
BTC_DASH             6            0.31          0.00007462           170.0         4       2
BTC_QTUM             4            1.44          0.00023065           111.2         3       1
BTC_CVC              5            1.41          0.00028212           111.0         4       1
BTC_KMD              2            0.25          0.00002027           150.0         1       1
BTC_XEM              3           -2.71         -0.00032580           381.7         2       1
BTC_XMR              0          nan             0.00000000           nan           0       0
BTC_ZEC              5            2.45          0.00049009            85.0         5       0
BTC_WAVES            4            0.89          0.00014297            90.0         3       1
BTC_PIVX             4            6.13          0.00098137            58.8         4       0
BTC_XZC              3            2.30          0.00027393            93.3         3       0
TOTAL              164            1.83          0.01198192           133.8       136      28

Im trying to create a strategy using the Stochastic Oscillator

Hi am trying to create a strategy using the Stochastic Oscillator,
I have tried to code the strategy myself but
when I run the code below, I get an error of "This class does not exist or contains Python code errors."

I am guessing I'm coding the strategy wrong. can you help and also is there any learning documents

Thank you
Jack

class StochasticOscillator (IStrategy):

    INTERFACE_VERSION = 2

    # Minimal ROI designed for the strategy
    minimal_roi = {
        "40": 0.0,
        "30": 0.01,
        "20": 0.02,
        "0": 0.04
    }

    # Optimal stoploss designed for the strategy
    stoploss = -0.10

    # Optimal ticker interval for the strategy
    ticker_interval = '1h'

    # Optional order type mapping
    order_types = {
        'buy': 'limit',
        'sell': 'limit',
        'stoploss': 'limit',
        'stoploss_on_exchange': False
    }

    # Number of candles the strategy requires before producing valid signals
    startup_candle_count: int = 20

    # Optional time in force for orders
    order_time_in_force = {
        'buy': 'gtc',
        'sell': 'gtc',
    }

    def informative_pairs(self):
        """
        Define additional, informative pair/interval combinations to be cached from the exchange.
        These pair/interval combinations are non-tradeable, unless they are part
        of the whitelist as well.
        For more information, please consult the documentation
        :return: List of tuples in the format (pair, interval)
            Sample: return [("ETH/USDT", "5m"),
                            ("BTC/USDT", "15m"),
                            ]
        """
        return []

    def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        """
        Adds several different TA indicators to the given DataFrame

        Performance Note: For the best performance be frugal on the number of indicators
        you are using. Let uncomment only the indicator you are using in your strategies
        or your hyperopt configuration, otherwise you will waste your memory and CPU usage.
        :param dataframe: Raw data from the exchange and parsed by parse_ticker_dataframe()
        :param metadata: Additional information, like the currently traded pair
        :return: a Dataframe with all mandatory indicators for the strategies
        """

        # Momentum Indicator
        # ------------------------------------


        # RSI
        dataframe['L14'] = dataframe['Low'].rolling(window=14)
        dataframe['H14'] = dataframe["high"].rolling(window=14)
        dataframe['%K'] = 100 * ((dataframe['Close'] - dataframe['L14']) / dataframe['H14'] -dataframe['L14'] ) )
        dataframe['%D'] = dataframe['%K'].rolling(window=3).mean()










        # Bollinger bands
        bollinger = qtpylib.bollinger_bands(qtpylib.typical_price(dataframe), window=20, stds=2)
        dataframe['bb_lowerband'] = bollinger['lower']
        dataframe['bb_middleband'] = bollinger['mid']
        dataframe['bb_upperband'] = bollinger['upper']

        # EMA - Exponential Moving Average
        return dataframe

    def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        """
        Based on TA indicators, populates the buy signal for the given dataframe
        :param dataframe: DataFrame
        :param metadata: Additional information, like the currently traded pair
        :return: DataFrame with buy column
        """
        dataframe.loc[
            (
            dataframe['%K'] == dataframe['%D'] &
            dataframe['%D'] > 30

            ),
            'buy'] = 1

        return dataframe

    def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        """
        Based on TA indicators, populates the sell signal for the given dataframe
        :param dataframe: DataFrame
        :param metadata: Additional information, like the currently traded pair
        :return: DataFrame with buy column
        """
        dataframe.loc[
            (
            dataframe['%K'] == dataframe['%D'] &
            dataframe['%D'] < 50

            ),
            'sell'] = 1
        return dataframe

bigger than but smaller than ROCP value(range)?

Step 1: What indicators are required?

ROCP(RATE OF CHANGE PERCENTAGE)

##question?
How can I range this ROCP and use it in my buy indicators?
I mean:
" dataframe['rocp']=ta.ROCP(dataframe,timeperiod=5) "
&
"( -0.03<dataframe['rocp']<0.03),but it gives me an error and then i can't do it this way
"(dataframe['rocp']<0.03) & (dataframe['rocp']>-0.03)"
Cause the meaning will change completely.

. How can I define "Bigger than but smaller than" on my buy or Sell indicator?

Strategy 004 - Details

Summary

File: strategy004.py
Source: Hyperopt results

How to install?

  1. Copy the file strategy004.py into your user_data/strategies folder
  2. Run the bot with the parameter python3 ./freqtrade/main.py -s Strategy004

Performance

Period 1: From 2017-11-19 to 2017-12-20

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              158            2.26          0.01431210          1909.1       158       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              287            0.66          0.00755907           180.8       199      88

Period 2: From 2017-12-19 to 2017-01-20

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              232            2.11          0.01977185           455.3       232       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              251            1.39          0.01404854           132.8       192      59

Period 3: From 2018-01-10 to 2018-01-30

Tested on: Freqtrade 0.16.1

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              37            0.69          0.00102128           367.3       37       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              43            0.16          0.00028173           224.9       19      24

Backtesting Logs

Period 1: From 2017-11-19 to 2017-12-20 - Profit ON

2018-01-20 23:50:15,758 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-on.json ...
2018-01-20 23:50:15,758 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 23:50:15,763 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 23:50:17,059 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 23:50:17,103 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy004.py)
2018-01-20 23:50:19,551 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-11-19T05:05:00+00:00 up to 2017-12-19T23:55:00+00:00 ...
2018-01-20 23:50:28,185 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              5            3.73          0.00076199            57.0         5       0
BTC_NEO              4            2.27          0.00036479          7313.8         4       0
BTC_NXT              3            2.46          0.00029698            60.0         3       0
BTC_MCO              3            4.05          0.00047857            83.3         3       0
BTC_ETH              6            0.64          0.00015338          1965.0         6       0
BTC_BCC              3            2.31          0.00027814          9636.7         3       0
BTC_VOX              4            5.59          0.00090904            27.5         4       0
BTC_GUP              3            2.56          0.00030943           123.3         3       0
BTC_SC               0          nan             0.00000000           nan           0       0
BTC_VTC              2            1.14          0.00009070           200.0         2       0
BTC_STRAT            0          nan             0.00000000           nan           0       0
BTC_OMG              6            1.41          0.00033844          4776.7         6       0
BTC_OK               3            0.96          0.00011571           281.7         3       0
BTC_EDG              7            2.68          0.00074785           402.9         7       0
BTC_STORJ            6            2.96          0.00070545           296.7         6       0
BTC_EMC2             4            6.55          0.00105730            45.0         4       0
BTC_XLM              5            3.14          0.00063159           219.0         5       0
BTC_LSK              5            3.63          0.00071719          6679.0         5       0
BTC_SYS              3            1.97          0.00023589            71.7         3       0
BTC_POWR             3            1.75          0.00020952          6043.3         3       0
BTC_PAY              8            1.73          0.00055061           112.5         8       0
BTC_DGB              5            1.27          0.00025375           299.0         5       0
BTC_ETC              9            1.73          0.00062409          2170.0         9       0
BTC_XRP              4            2.04          0.00032751          2946.2         4       0
BTC_LTC              6            1.37          0.00032917           597.5         6       0
BTC_IOP              4            3.97          0.00064560            93.8         4       0
BTC_RCN              5            2.65          0.00053135            87.0         5       0
BTC_BTG              3            1.88          0.00022696           696.7         3       0
BTC_MONA             2            3.57          0.00028539            70.0         2       0
BTC_SALT             3            0.60          0.00007171          6203.3         3       0
BTC_DASH             9            0.83          0.00030134           275.6         9       0
BTC_QTUM             1            1.21          0.00004871         35695.0         1       0
BTC_CVC              4            2.84          0.00045754           520.0         4       0
BTC_KMD              2            1.47          0.00011766            80.0         2       0
BTC_XEM              6            1.41          0.00033904           212.5         6       0
BTC_XMR              4            1.33          0.00021309           793.8         4       0
BTC_ZEC              3            0.86          0.00010363           861.7         3       0
BTC_WAVES            1            1.88          0.00007569         32355.0         1       0
BTC_PIVX             3            2.71          0.00032505           116.7         3       0
BTC_XZC              1            2.05          0.00008225          3860.0         1       0
TOTAL              158            2.26          0.01431210          1909.1       158       0

Period 1: From 2017-11-19 to 2017-12-20 - Profit OFF

2018-01-20 23:50:15,757 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-off.json ...
2018-01-20 23:50:15,759 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 23:50:15,765 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 23:50:15,765 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 23:50:17,055 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 23:50:17,103 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy004.py)
2018-01-20 23:50:19,540 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-11-19T05:05:00+00:00 up to 2017-12-19T23:55:00+00:00 ...
2018-01-20 23:50:28,243 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              5            3.73          0.00076199            57.0         5       0
BTC_NEO             10            0.02          0.00000389           129.0         6       4
BTC_NXT              3            2.46          0.00029698            60.0         3       0
BTC_MCO              3            4.05          0.00047857            83.3         3       0
BTC_ETH              8           -3.34         -0.00107061           359.4         5       3
BTC_BCC              9           -0.47         -0.00016122           177.2         6       3
BTC_VOX              4            5.59          0.00090904            27.5         4       0
BTC_GUP              3            2.56          0.00030943           123.3         3       0
BTC_SC               0          nan             0.00000000           nan           0       0
BTC_VTC              2            0.27          0.00002213           192.5         1       1
BTC_STRAT            0          nan             0.00000000           nan           0       0
BTC_OMG             16           -0.22         -0.00014688           175.3        11       5
BTC_OK               3            0.63          0.00007581           273.3         2       1
BTC_EDG              8            1.68          0.00053491            81.2         5       3
BTC_STORJ            6            1.66          0.00039429           170.0         4       2
BTC_EMC2             4            6.55          0.00105730            45.0         4       0
BTC_XLM              5            2.70          0.00054310           177.0         4       1
BTC_LSK             14            2.52          0.00139134           173.2        12       2
BTC_SYS              3            1.97          0.00023589            71.7         3       0
BTC_POWR             6           -0.60         -0.00014033           215.0         3       3
BTC_PAY              9            1.86          0.00066688            91.1         8       1
BTC_DGB              5           -0.32         -0.00006884           127.0         3       2
BTC_ETC             14            0.17          0.00009832           186.4         9       5
BTC_XRP              7           -0.66         -0.00018774           253.6         4       3
BTC_LTC              7            0.78          0.00021654           157.1         4       3
BTC_IOP              4            2.08          0.00033421            92.5         3       1
BTC_RCN              7            3.13          0.00087156           134.3         7       0
BTC_BTG              9           -1.36         -0.00048490           341.1         5       4
BTC_MONA             5            1.98          0.00039538            91.0         5       0
BTC_SALT            12            0.35          0.00016882           139.2         8       4
BTC_DASH            15           -0.26         -0.00015373           246.7         9       6
BTC_QTUM            12           -2.86         -0.00137601           413.8         1      11
BTC_CVC              9           -0.79         -0.00026867           228.3         6       3
BTC_KMD              9            1.47          0.00052395            95.6         7       2
BTC_XEM             11            1.39          0.00061127           151.8         9       2
BTC_XMR              9            0.71          0.00025565           250.0         8       1
BTC_ZEC             10           -0.87         -0.00034529           278.5         4       6
BTC_WAVES           12            0.82          0.00039779           144.6        10       2
BTC_PIVX             4            1.35          0.00021717            77.5         2       2
BTC_XZC              5            0.95          0.00019108            96.0         3       2
TOTAL              287            0.66          0.00755907           180.8       199      88

Period 2: From 2017-12-19 to 2017-01-20 - Profit ON

2018-01-20 23:50:15,758 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-on.json ...
2018-01-20 23:50:15,758 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 23:50:15,763 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 23:50:17,140 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 23:50:17,156 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy004.py)
2018-01-20 23:50:19,565 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-12-19T00:00:00+00:00 up to 2018-01-19T23:55:00+00:00 ...
2018-01-20 23:50:26,937 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              8            1.17          0.00037486           786.2         8       0
BTC_NEO              4            1.02          0.00016427           366.2         4       0
BTC_NXT              2            2.91          0.00024627            52.5         2       0
BTC_MCO              6            2.70          0.00065832            97.5         6       0
BTC_ETH              5            1.44          0.00028847           104.0         5       0
BTC_BCC              3            1.21          0.00014563          7766.7         3       0
BTC_VOX              2            1.58          0.00012529           180.0         2       0
BTC_GUP              3            5.34          0.00065351            68.3         3       0
BTC_SC               3            1.31          0.00015830           100.0         3       0
BTC_VTC              6            1.80          0.00042900            87.5         6       0
BTC_STRAT            5            3.47          0.00068733            47.0         5       0
BTC_OMG              7            2.24          0.00062539           147.1         7       0
BTC_OK               4            1.84          0.00029480            71.2         4       0
BTC_EDG              2            2.38          0.00019237            65.0         2       0
BTC_STORJ           10            2.69          0.00108031           654.0        10       0
BTC_EMC2             4            1.80          0.00028049           111.2         4       0
BTC_XLM              4            2.78          0.00045790            97.5         4       0
BTC_LSK              8            1.33          0.00042598           192.5         8       0
BTC_SYS              2            5.74          0.00045583            17.5         2       0
BTC_POWR             5            1.65          0.00033222           211.0         5       0
BTC_PAY              5            2.73          0.00057544           238.0         5       0
BTC_DGB              8            3.96          0.00128015            50.0         8       0
BTC_ETC              6            2.39          0.00057319           103.3         6       0
BTC_XRP              6            3.06          0.00073600            67.5         6       0
BTC_LTC              3            0.97          0.00011629           326.7         3       0
BTC_IOP              5            5.55          0.00117394            39.0         5       0
BTC_RCN              5            2.73          0.00054663            70.0         5       0
BTC_BTG             10            1.70          0.00067817           464.5        10       0
BTC_MONA             6            1.90          0.00045538           245.8         6       0
BTC_SALT             8            1.21          0.00038861           159.4         8       0
BTC_DASH             8            1.57          0.00050389           850.0         8       0
BTC_QTUM             7            1.11          0.00031340           182.9         7       0
BTC_CVC              5            3.39          0.00067630          2558.0         5       0
BTC_KMD              8            1.88          0.00060281           793.8         8       0
BTC_XEM              8            1.97          0.00062636          1345.6         8       0
BTC_XMR              8            1.45          0.00046601           389.4         8       0
BTC_ZEC              4            1.30          0.00020809           528.8         4       0
BTC_WAVES            9            1.93          0.00069535           196.1         9       0
BTC_PIVX             9            1.48          0.00053210           181.1         9       0
BTC_XZC             11            1.24          0.00054720           195.5        11       0
TOTAL              232            2.11          0.01977185           455.3       232       0

Period 2: From 2017-12-19 to 2017-01-20 - Profit OFF

2018-01-20 23:50:15,758 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-off.json ...
2018-01-20 23:50:15,759 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 23:50:15,763 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 23:50:15,764 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 23:50:17,140 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 23:50:17,155 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy004.py)
2018-01-20 23:50:19,637 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-12-19T00:00:00+00:00 up to 2018-01-19T23:55:00+00:00 ...
2018-01-20 23:50:27,567 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              9            0.23          0.00008419           132.8         7       2
BTC_NEO              4           -0.41         -0.00006550           246.2         2       2
BTC_NXT              2            2.91          0.00024627            52.5         2       0
BTC_MCO              6            2.70          0.00065832            97.5         6       0
BTC_ETH              5            1.44          0.00028847           104.0         5       0
BTC_BCC             12           -0.02         -0.00000696           180.0         5       7
BTC_VOX              2           -0.19         -0.00001968           165.0         1       1
BTC_GUP              3            5.00          0.00061213            61.7         2       1
BTC_SC               3            1.31          0.00015830           100.0         3       0
BTC_VTC              6            1.80          0.00042900            87.5         6       0
BTC_STRAT            5            3.47          0.00068733            47.0         5       0
BTC_OMG              7            1.49          0.00041822           109.3         4       3
BTC_OK               4            1.84          0.00029480            71.2         4       0
BTC_EDG              2            2.38          0.00019237            65.0         2       0
BTC_STORJ           11            1.21          0.00053356           188.2         9       2
BTC_EMC2             4            1.80          0.00028049           111.2         4       0
BTC_XLM              4            2.58          0.00042566            68.8         3       1
BTC_LSK              8            0.88          0.00028273           120.0         5       3
BTC_SYS              2            5.74          0.00045583            17.5         2       0
BTC_POWR             5           -0.55         -0.00011048            88.0         2       3
BTC_PAY              5            2.15          0.00046007            97.0         4       1
BTC_DGB              8            3.96          0.00128015            50.0         8       0
BTC_ETC              6            2.34          0.00056037           102.5         5       1
BTC_XRP              6            2.82          0.00067814            64.2         5       1
BTC_LTC              3            0.83          0.00009986           116.7         2       1
BTC_IOP              5            5.55          0.00117394            39.0         5       0
BTC_RCN              5            2.73          0.00054663            70.0         5       0
BTC_BTG             10            0.65          0.00026129           171.0         6       4
BTC_MONA             6            1.72          0.00041269           237.5         5       1
BTC_SALT             8            1.11          0.00035828           119.4         7       1
BTC_DASH            10            0.45          0.00018302           189.0         5       5
BTC_QTUM             7            0.09          0.00002802           142.9         5       2
BTC_CVC              7            0.98          0.00025695           130.7         5       2
BTC_KMD              9           -0.23         -0.00008508           168.9         4       5
BTC_XEM              9            0.06          0.00001662           283.3         6       3
BTC_XMR              8            0.52          0.00016899           166.2         6       2
BTC_ZEC              4           -0.30         -0.00005234           281.2         3       1
BTC_WAVES            9            1.52          0.00054760           133.3         8       1
BTC_PIVX            11            2.16          0.00093820            90.9        10       1
BTC_XZC             11            0.84          0.00037009           127.7         9       2
TOTAL              251            1.39          0.01404854           132.8       192      59

InformativeSample Strat

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Tried to backtest the Informative Sample Strat "out of the box" to get familiar with the concept of informative pairs. Anything I need to adjust or consider?

Following error message:

2020-02-09 13:13:22,569 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
  File "/home/andreas/freqtrade/freqtrade/main.py", line 36, in main
    return_code = args['func'](args)
  File "/home/andreas/freqtrade/freqtrade/commands/optimize_commands.py", line 44, in start_backtesting
    backtesting.start()
  File "/home/andreas/freqtrade/freqtrade/optimize/backtesting.py", line 396, in start
    preprocessed = self.strategy.tickerdata_to_dataframe(data)
  File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 448, in tickerdata_to_dataframe
    for pair, pair_data in tickerdata.items()}
  File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 448, in <dictcomp>
    for pair, pair_data in tickerdata.items()}
  File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 464, in advise_indicators
    return self.populate_indicators(dataframe, metadata)
  File "/home/andreas/freqtrade/user_data/strategies/InformativeSample.py", line 102, in populate_indicators
    ticker_interval=self.ticker_interval)
TypeError: historic_ohlcv() got an unexpected keyword argument 'ticker_interval'

Strategy file with candlestick pattern recognition does not perform anywhere close to the hyperopt results. Anyone have a solution or have come across this please?

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Step 1: What indicators are required?

Please list all the indicators required for the buy and sell strategy.

Step 2: Explain the Buy Strategy

Please explain in details the indicators you need to run the buy strategy, then
explain in detail what is the trigger to buy.

Step 1: Explain the Sell Strategy

Please explain in details the indicators you need to run the sell strategy, then
explain in detail what is the trigger to sell.

Source

What come from this strategy? Cite your source:

  • http://

Strategy 003 - Details

Summary

File: strategy003.py
Source: Hyperopt results

How to install?

  1. Copy the file strategy003.py into your user_data/strategies folder
  2. Run the bot:python3 ./freqtrade/main.py -s strategy003

Performance

Period 1: From 2017-11-19 to 2017-12-20

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              153            2.30          0.01385930           566.7       153       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              161            0.96          0.00603366           154.5       132      29

Period 2: From 2017-12-19 to 2017-01-20

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              147            2.21          0.01277113           694.9       147       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              154            0.86          0.00515658           162.5       121      33

Period 3: From 2018-01-10 to 2018-01-30

Tested on: Freqtrade 0.16.1

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              14            1.47          0.00081740           227.5       14       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              16            0.89          0.00056283           196.2       11       5

Backtesting Logs

Period 1: From 2017-11-19 to 2017-12-20 - Profit ON

2018-01-20 23:05:30,184 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-on.json ...
2018-01-20 23:05:30,185 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 23:05:30,191 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 23:05:30,192 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 23:05:30,192 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 23:05:30,192 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 23:05:31,125 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 23:05:31,152 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy003.py)
2018-01-20 23:05:33,686 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-11-19T05:05:00+00:00 up to 2017-12-19T23:55:00+00:00 ...
2018-01-20 23:05:38,234 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              7            2.08          0.00056925          1216.4         7       0
BTC_NEO              7            1.54          0.00042748           607.9         7       0
BTC_NXT              7            3.36          0.00092709           548.6         7       0
BTC_MCO              4            1.77          0.00027723          1548.8         4       0
BTC_ETH              2            1.65          0.00013187           155.0         2       0
BTC_BCC              2            2.66          0.00020853            57.5         2       0
BTC_VOX              2            7.85          0.00061311            32.5         2       0
BTC_GUP              3            1.41          0.00016712           108.3         3       0
BTC_SC               0          nan             0.00000000           nan           0       0
BTC_VTC              2            1.56          0.00012373           750.0         2       0
BTC_STRAT            6            2.70          0.00063960           589.2         6       0
BTC_OMG              2            1.59          0.00012680           117.5         2       0
BTC_OK               8            1.32          0.00041707           184.4         8       0
BTC_EDG              4            1.90          0.00030129           115.0         4       0
BTC_STORJ            2            2.41          0.00019150            67.5         2       0
BTC_EMC2             3            3.79          0.00045309            53.3         3       0
BTC_XLM              7            1.83          0.00051042           100.7         7       0
BTC_LSK              4            3.35          0.00052920            52.5         4       0
BTC_SYS              3            1.98          0.00023621           636.7         3       0
BTC_POWR             3            4.01          0.00046572           763.3         3       0
BTC_PAY              6            2.17          0.00051270           296.7         6       0
BTC_DGB              3            4.08          0.00046879           243.3         3       0
BTC_ETC              2            0.67          0.00005332           137.5         2       0
BTC_XRP              4            1.67          0.00026486          1000.0         4       0
BTC_LTC              1            1.39          0.00005561           215.0         1       0
BTC_IOP              3            1.89          0.00021911            70.0         3       0
BTC_RCN              9            2.79          0.00098735           373.3         9       0
BTC_BTG              5            1.42          0.00028174            85.0         5       0
BTC_MONA             1            4.49          0.00017703            40.0         1       0
BTC_SALT             3            1.96          0.00023282            65.0         3       0
BTC_DASH             5            1.42          0.00028181           653.0         5       0
BTC_QTUM             1            3.22          0.00012687            65.0         1       0
BTC_CVC              3            4.68          0.00055359          3611.7         3       0
BTC_KMD              5            1.52          0.00030038            83.0         5       0
BTC_XEM              2            1.08          0.00008560          2335.0         2       0
BTC_XMR              5            1.90          0.00037628          1196.0         5       0
BTC_ZEC              8            2.33          0.00072725          1382.5         8       0
BTC_WAVES            4            2.59          0.00040855           671.2         4       0
BTC_PIVX             2            1.48          0.00011737            65.0         2       0
BTC_XZC              3            2.61          0.00031196            45.0         3       0
TOTAL              153            2.30          0.01385930           566.7       153       0

Period 1: From 2017-11-19 to 2017-12-20 - Profit OFF

2018-01-20 23:05:30,201 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-off.json ...
2018-01-20 23:05:30,202 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 23:05:30,207 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 23:05:30,208 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 23:05:30,208 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 23:05:30,208 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 23:05:31,126 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 23:05:31,152 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy003.py)
2018-01-20 23:05:33,700 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-11-19T05:05:00+00:00 up to 2017-12-19T23:55:00+00:00 ...
2018-01-20 23:05:38,431 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              7            1.42          0.00038492           113.6         6       1
BTC_NEO              8            0.17          0.00005304           244.4         4       4
BTC_NXT              7            2.79          0.00076907            97.1         6       1
BTC_MCO              4           -0.48         -0.00007957           148.8         3       1
BTC_ETH              2            1.65          0.00013187           155.0         2       0
BTC_BCC              2            2.66          0.00020853            57.5         2       0
BTC_VOX              2            7.85          0.00061311            32.5         2       0
BTC_GUP              3            1.41          0.00016712           108.3         3       0
BTC_SC               0          nan             0.00000000           nan           0       0
BTC_VTC              3           -0.60         -0.00007266           155.0         2       1
BTC_STRAT            6            0.84          0.00020039           187.5         4       2
BTC_OMG              2            1.59          0.00012680           117.5         2       0
BTC_OK               8            1.32          0.00041707           184.4         8       0
BTC_EDG              4            1.90          0.00030129           115.0         4       0
BTC_STORJ            2            2.41          0.00019150            67.5         2       0
BTC_EMC2             3            3.79          0.00045309            53.3         3       0
BTC_XLM              7            1.83          0.00051042           100.7         7       0
BTC_LSK              4            3.35          0.00052920            52.5         4       0
BTC_SYS              3           -0.49         -0.00005877           156.7         2       1
BTC_POWR             3            2.93          0.00033528           171.7         2       1
BTC_PAY              7            0.53          0.00015087            97.9         6       1
BTC_DGB              3            0.54          0.00006596            85.0         2       1
BTC_ETC              2            0.67          0.00005332           137.5         2       0
BTC_XRP              4           -0.55         -0.00008875           307.5         2       2
BTC_LTC              1            1.39          0.00005561           215.0         1       0
BTC_IOP              3            1.89          0.00021911            70.0         3       0
BTC_RCN              9            0.11          0.00003215           250.0         7       2
BTC_BTG              5            1.42          0.00028174            85.0         5       0
BTC_MONA             1            4.49          0.00017703            40.0         1       0
BTC_SALT             3            1.96          0.00023282            65.0         3       0
BTC_DASH             6           -0.73         -0.00017169           250.0         4       2
BTC_QTUM             1            3.22          0.00012687            65.0         1       0
BTC_CVC              5           -3.72         -0.00073641           322.0         3       2
BTC_KMD              5            1.52          0.00030038            83.0         5       0
BTC_XEM              2           -4.29         -0.00034028           310.0         1       1
BTC_XMR              6            0.28          0.00006980           175.0         5       1
BTC_ZEC              8            0.40          0.00011682           201.9         4       4
BTC_WAVES            5           -0.61         -0.00012272           231.0         4       1
BTC_PIVX             2            1.48          0.00011737            65.0         2       0
BTC_XZC              3            2.61          0.00031196            45.0         3       0
TOTAL              161            0.96          0.00603366           154.5       132      29

Period 2: From 2017-12-19 to 2017-01-20 - Profit ON

2018-01-20 23:05:30,201 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-on.json ...
2018-01-20 23:05:30,202 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 23:05:30,207 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 23:05:30,208 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 23:05:30,208 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 23:05:30,208 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 23:05:31,238 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 23:05:31,252 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy003.py)
2018-01-20 23:05:33,901 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-12-19T00:00:00+00:00 up to 2018-01-19T23:55:00+00:00 ...
2018-01-20 23:05:40,009 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              6            1.24          0.00029468           917.5         6       0
BTC_NEO              7            1.96          0.00054221           638.6         7       0
BTC_NXT              4            1.43          0.00022607            96.2         4       0
BTC_MCO              6            2.16          0.00050788           525.0         6       0
BTC_ETH              4            1.28          0.00020411           541.2         4       0
BTC_BCC              2            1.45          0.00011604          2132.5         2       0
BTC_VOX              2            3.87          0.00030506            62.5         2       0
BTC_GUP              3            2.54          0.00029755            55.0         3       0
BTC_SC               4            3.23          0.00050244            52.5         4       0
BTC_VTC              6            1.41          0.00033783           126.7         6       0
BTC_STRAT            8            2.50          0.00078403           238.1         8       0
BTC_OMG              4            2.57          0.00041043          1063.8         4       0
BTC_OK               4            3.14          0.00049854          1852.5         4       0
BTC_EDG              7            2.28          0.00062891            97.9         7       0
BTC_STORJ            3            2.44          0.00028991            56.7         3       0
BTC_EMC2             1            5.33          0.00019551             5.0         1       0
BTC_XLM              4            3.48          0.00055339           333.8         4       0
BTC_LSK              3            2.70          0.00032286            66.7         3       0
BTC_SYS              1            2.80          0.00011025            65.0         1       0
BTC_POWR             3            1.88          0.00022375          1771.7         3       0
BTC_PAY              6            2.44          0.00056386           308.3         6       0
BTC_DGB              6            2.66          0.00062096          1433.3         6       0
BTC_ETC              4            1.54          0.00024477          2253.8         4       0
BTC_XRP              2            1.87          0.00014923          1162.5         2       0
BTC_LTC              2            1.66          0.00013221           565.0         2       0
BTC_IOP              5            2.56          0.00050242          3453.0         5       0
BTC_RCN              2            4.29          0.00034261           177.5         2       0
BTC_BTG              2            1.66          0.00013278          4462.5         2       0
BTC_MONA             1            1.90          0.00007488            65.0         1       0
BTC_SALT             4            1.35          0.00021496           202.5         4       0
BTC_DASH             1            1.30          0.00005181           170.0         1       0
BTC_QTUM             1            1.20          0.00004753           100.0         1       0
BTC_CVC              5            2.71          0.00053765            87.0         5       0
BTC_KMD              1            0.30          0.00001199           315.0         1       0
BTC_XEM              6            1.55          0.00036510            90.0         6       0
BTC_XMR              1            1.31          0.00005178            65.0         1       0
BTC_ZEC              5            1.96          0.00038830           119.0         5       0
BTC_WAVES            0          nan             0.00000000           nan           0       0
BTC_PIVX             4            1.79          0.00028268          1608.8         4       0
BTC_XZC              7            2.56          0.00070416            87.1         7       0
TOTAL              147            2.21          0.01277113           694.9       147       0

Period 2: From 2017-12-19 to 2017-01-20 - Profit OFF

2018-01-20 23:05:30,207 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-off.json ...
2018-01-20 23:05:30,208 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 23:05:30,213 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 23:05:30,214 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 23:05:30,214 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 23:05:30,214 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 23:05:31,237 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 23:05:31,253 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy003.py)
2018-01-20 23:05:33,880 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-12-19T00:00:00+00:00 up to 2018-01-19T23:55:00+00:00 ...
2018-01-20 23:05:39,590 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA              7           -0.91         -0.00025455           333.6         5       2
BTC_NEO              7            1.08          0.00029887           126.4         6       1
BTC_NXT              4            1.43          0.00022607            96.2         4       0
BTC_MCO              6            0.28          0.00006321           208.3         5       1
BTC_ETH              5           -0.73         -0.00014408           273.0         2       3
BTC_BCC              2           -3.82         -0.00030560           502.5         0       2
BTC_VOX              2            3.87          0.00030506            62.5         2       0
BTC_GUP              3            2.54          0.00029755            55.0         3       0
BTC_SC               4            3.23          0.00050244            52.5         4       0
BTC_VTC              6            0.91          0.00021668           105.0         5       1
BTC_STRAT            9            0.97          0.00034095           182.2         7       2
BTC_OMG              5            0.96          0.00019270           141.0         3       2
BTC_OK               4           -0.13         -0.00001860           265.0         2       2
BTC_EDG              7            2.07          0.00056930            95.7         6       1
BTC_STORJ            3            2.44          0.00028991            56.7         3       0
BTC_EMC2             1            5.33          0.00019551             5.0         1       0
BTC_XLM              4            1.12          0.00017326           148.8         3       1
BTC_LSK              3            2.70          0.00032286            66.7         3       0
BTC_SYS              1            2.80          0.00011025            65.0         1       0
BTC_POWR             3           -1.35         -0.00015705           193.3         2       1
BTC_PAY              6            1.68          0.00038496           100.0         5       1
BTC_DGB              6            1.74          0.00040358           109.2         5       1
BTC_ETC              5           -0.32         -0.00006230           190.0         3       2
BTC_XRP              2            0.78          0.00006230           167.5         1       1
BTC_LTC              2            0.62          0.00004916           172.5         1       1
BTC_IOP              7           -3.96         -0.00112715           333.6         3       4
BTC_RCN              2           -0.10         -0.00000848           145.0         1       1
BTC_BTG              2           -4.11         -0.00032931           722.5         1       1
BTC_MONA             1            1.90          0.00007488            65.0         1       0
BTC_SALT             4            1.35          0.00021496           202.5         4       0
BTC_DASH             1            1.30          0.00005181           170.0         1       0
BTC_QTUM             1            1.20          0.00004753           100.0         1       0
BTC_CVC              5            2.71          0.00053765            87.0         5       0
BTC_KMD              1            0.30          0.00001199           315.0         1       0
BTC_XEM              6            1.55          0.00036510            90.0         6       0
BTC_XMR              1            1.31          0.00005178            65.0         1       0
BTC_ZEC              5            1.96          0.00038830           119.0         5       0
BTC_WAVES            0          nan             0.00000000           nan           0       0
BTC_PIVX             4            1.32          0.00020714           106.2         3       1
BTC_XZC              7            2.21          0.00060794            72.1         6       1
TOTAL              154            0.86          0.00515658           162.5       121      33

TD Sequential indicator - new strategy

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Step 1: What indicators are required?

no indicators needed, just close prices

Step 2: Explain the Buy Strategy

the trigger to buy ->
When you see 9 consecutive closes โ€œlowerโ€ than the close 4 bars prior.
An ideal buy is when the low of bars 6 and 7 in the count are exceeded by the low of bars 8 or 9.

Step 3: Explain the Sell Strategy

trigger to sell ->
When you see 9 consecutive closes โ€œhigherโ€ than the close 4 candles prior.
An ideal sell is when the the high of bars 6 and 7 in the count are exceeded by the high of bars 8 or 9.

Source

What come from this strategy? Cite your source:
https://hackernoon.com/how-to-buy-sell-cryptocurrency-with-number-indicator-td-sequential-5af46f0ebce1

ReinforcedSmoothScalp

try to use --strategy=ReinforcedSmoothScalp with last freqtrade source get the error
File "/usr/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.6/copy.py", line 169, in deepcopy
rv = reductor(4)
TypeError: can't pickle staticmethod objects

Advice on how to buy according to 24hr %

Hi, I'm hoping someone could give me advice on how to set up a buy sell strategy based on 24hr % change. I.e. buy and sell when price hit's x percent. Is this a relatively easy set up? Thanks!

TA Lib - Stochastic Indicator with FT sample strategies

Step 1: Have you search for this issue before posting it?

If you have discovered a bug in the bot, please search our issue tracker.
If it hasn't been reported, please create a new issue.

Step 2: Describe your environment

Operating system: Ubuntu 18.04
Python Version: 3.7.4
CCXT version: ccxt==1.27.91
Branch: Develop
Last Commit ID: b50d072

Step 3: Describe the problem:

TA lib indicator ta.STOCHF with FT sample strategies (e.g. Scalp, CofiBitStrategy ReinforcedSmoothScalp ...) not working anymore after update

Steps to reproduce:




Observed Results:

  • What happened?
  • What did you expect to happen?

Relevant code exceptions or logs:

2020-05-23 16:57:46,505 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy ReinforcedQuickie
2020-05-23 16:57:48,393 - freqtrade.optimize.backtesting - INFO - Backtesting with data from 2020-01-01T00:00:00+00:00 up to 2020-05-15T00:00:00+00:00 (135 days)..
2020-05-23 16:57:49,170 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy Scalp
2020-05-23 16:57:49,172 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
File "/home/andreas/freqtrade/freqtrade/main.py", line 36, in main
  return_code = args['func'](args)
File "/home/andreas/freqtrade/freqtrade/commands/optimize_commands.py", line 49, in start_backtesting
  backtesting.start()
File "/home/andreas/freqtrade/freqtrade/optimize/backtesting.py", line 390, in start
  preprocessed = self.strategy.ohlcvdata_to_dataframe(data)
File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 502, in ohlcvdata_to_dataframe
  for pair, pair_data in data.items()}
File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 502, in <dictcomp>
  for pair, pair_data in data.items()}
File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 518, in advise_indicators
  return self.populate_indicators(dataframe, metadata)
File "/home/andreas/freqtrade/user_data/strategies/Scalp.py", line 46, in populate_indicators
  stoch_fast = ta.STOCHF(dataframe, 5.0, 3.0, 0.0, 3.0, 0.0)
File "talib/_abstract.pxi", line 398, in talib._ta_lib.Function.__call__
File "talib/_abstract.pxi", line 277, in talib._ta_lib.Function.set_function_args
File "talib/_abstract.pxi", line 462, in talib._ta_lib.Function.__check_opt_input_value
TypeError: Invalid parameter value for fastk_period (expected int, got float)

Improvements to the docker image

I won't fork the project on github to open a pull request but I am dropping my patch here because it may be useful to some people.

Basically I only worked on the docker image:

  • Rebase the image on current alpine linux (much smaller and uses less ram).
  • Bring latest python packages from alpine repositories (they are pre-compiled and up to date), use pip only when necessary.
  • Use s6 process manager to handle multiple bots in the same container (and restart them should they crash). The s6 layout for starting and controlling jobs is quite simple, but I'm willing to help if needed.

I have one such container handling 3 bots (different markets and strategies) running for about one month on a RPI like board, plus the same container built on arm64 (which I use for backtesting because it's much faster).

Cheers!

Obtained with git diff master MYBRANCH | gzip | base64
Copy-paste in PATCHFILE and then cat PATCHFILE | base64 -d | gunzip | git apply

H4sIAC45F18AA60Ya2/bOPK7fgUvwe0CUUhZlu3YBnxo2nT3ArRpL8keUOwtspREO6olUStSSXy//mZI
SZb8yC4OSQFXmuE8OU/FyXJJKF0lmnCPxTJaizJZ5bIUJOy/O0keixcyHAZhEPo+Y8OQB4NlFBF/MJiM
Rg6ldJeH47ruHp937wj1z/0xceH3grx75xAG8u1vfYZeGYplkgKP7fMZHOrxopHMl8mKfVcyP3Nc+wYP
9hCF82dM/ZEmWgBlJJ9EyVeijOBFrFbKinysQngoNmmSa4PSJX9KFNtkqeOyq7uHO42iyIcvN/e31+9/
ub+++ZllsUM+X95c//Tx7p4luUNuP15eff6IcLosxR/AIxZMifIpicCEPdCZE/c835qO7tr6wfp8ORxM
lpGYMDbivphGXOz4fEtQO3wLQG/PRucBceF3At4mmpcroT2HOORUvESi0InMwRd/O0OytRCF4zru6Wce
dc3vqbu9ERDWuSqrbjgJgmAZQoiIwXgQc3/WV7d7t0bdDsAGx9TERoCxQX+6/fKZFBv9KPN5wKYsoCpN
MhpWSovScQ2ap0WSi7mIV3BPDr395YbwQlMwk1RFzLUg/3Eogb8ffmgRdEOSXGmepiSqypSEVZLGVCgl
cp3wlKRJqFRKY/F0gDhKBc8B7n748vUbQNcPpSgU8YSOPHjz4E2qBByXCOW4Vp814XEMLqw1wocVhgQ8
5ZJGPHoUXU1CrgSRhcgbLdD1IJHUf4n1CbgmoHmVFRtzCN8KnsdcmUctUgFCwF1SGwAkA09BUrYxr7ws
5bN5MvK1lKnqCkEMhG4llLYMQT9wTGCen0twh3nC9FPIlVupPKxStNHgkvw7H+4yXaZcrS3+2fKIZCpB
U8uhKGVW6AfUZ9032x7FRE5T1bBai6kl22jQtPNIudrkUSK7IKDuvmYQfHvaQSimCDcKyhBMbtRalRAi
IS93SVQEF9I8gc4UIqTMuwAJiZYl/7VeKZICOJA6rPCtCcZtXADUJCn5CuHEoTSI/CkpZZ5BhNpEmWCS
uEPIFR8zG+MsiomnswK54v9ezfZBcwpWMPWImDIjtLT4M4uASvnx5t/k09XDp+v3t5e33x6+Xt7/k3iV
Kj3wBE89OGS1ua4VjQUEZyzAvRDj1CQChkpSClRQMf2iewBwfJbJfB/+uClECd4xGK8tlZ5N5K5vTJx3
8oXGSWmzc9eJ5Ssi+vR1Dr+B6j1MkcoDUEjRPSvdXSt3lW+IdvTuXQakPBEvIqq06VRgEHvdlVTAiR2O
9CN0uG9fv1zf3JNfT1rqk98cekquxJJXqSZaEgMlmYyhAX/4fEV+JSf2IPntgDX7gnZvCyqb+6h1oeae
Zxsy9Oqso74W0WOeQBTu1tK2cKoJ3COqcuKFSe6pCVVPKuL5yTk56TCqoP0+QPnlXt2HFYvBvF5za6t5
2D46uXgmpt2h0U03s91uUP8x5vuTaDkKpqbNeXBrXl6lad3jWlaYuIPzAXY40+CM5WB4njLbxmAOqV6Y
LFeeffewrXkZhynjL57FaK3yRG/+KgEWwiRf9f1Qz1DADHqZwHEIzNgHOjH0GC3iY/4ZzeJpwPmYscZT
9RhwgBW6aus4OwsMfeKiv3AWgD+HQu1XMLHMyY/Bjw5t7nGOVaC96Lnt2EkG4958C0a7t2cybkYIc/L0
T86CUtARiubwe2zRBMgLQonM0w3JhYjBCc+PIsfYTHCo4v0iSbCG23MNH9Pq580bITDAavGi54RtYXE7
Hc3JCesMS6xNixN7GloTDHdAXeUpdCmqtCyKRhiyhhiC+M951jXUop9kWmW1G/GPoqw2XeaHcuik0bEp
DRh3WIjgRO2JsspzCCzyuzWC1JcNU9nvjVaGZE7+0Qju6ARa0FSuTGAdTGJAqi2CweuWMA5xWCF2+ocU
8A5yMO/qKWi2hJbcrhKHxXaWji2BglNarDbkjmdFKu7q135OdTp4nVA7kDppphPBB8HYx4mfRzHM0f0R
epfK1phdKCbQeAxTvwu/WGx64Th36ou2AxTV0Msoz3Opeb0RWHQ9J5VwTTKjsowhZ2oU1naHmn89M4/1
zvAYplkuZ6NpOF0GUEvHw8nFMNwx+xi1Nf8Y1taRwCycw6FZOE97HZY8Q9ORVb9XN92JhxB9TwnHBIo5
kmIphow3Ub6UJbnlqghFWcL4lzRUMBFF0YteLHwWDNgIesLdvz5d2snbAJkPMDvC96Z0QA4ZoMxkvlgM
wBPswumM54vFiPnMd9q5fLEYsuGIQVmth3PkPxyzmWMndHwFnkCxHdMXi4ANkeT+kn5KQpQzMho1oztC
pii42EQSMlhEa2n4IpEd6VGuDxDcFtFWx7XMHLdDY6eUJVwv/JRKn5MPRMFkHD2Cp6AglnyjUMgDHnnw
ldWWjZBJC7NMPkkeE52YOoIlQZFg8HeyrIt47UowOInRTjRgBka7uwjL7EbqZLkhagPUuLOrODcQJAvQ
pgZgj1/CzWKnQUlmdbFqDus3XGIo1G3Mrdj4doT+trhIlgph4FDH3T/ewPAYLq+n5K4qCllqE1tmK4Kl
ASwXZZZgS4FALSrttAuTvbzAadoS1tu6elk3JdBTSh7pBFrYxqEmarA7lSYSx2iF3bdovW9ZbceO2zn6
SoI382l4EFyntohHy+nyAiradLC8GIqL4JXUbkgP5HWDwqQOzn2obfBrpoO9ubkZwfcx3bEdfd4ulBjT
AwxxWxPREVNwLT1SIk1+bo9TncQbmmR4e3WeAi7bFCasLqZDp146F4uxubKdLdWwM5m8XVVNlg06MNxX
US9TAw7UZrzTASbQsbLuHlDWcVFLkyz7tR4j64PMwUWafK/wSEmAnQilXCvcBzJermP5nOOoUhkPOzQP
I0uCtk4wEVvIK6HU26fC47imX1xMR2EEFZJdRL644KF4Jah69Aciq4evP1KaMb1pGdd5lFYw3uLK0usU
4AIYdIiGPQQqONuLN8ORYmrfWqjtG41Ax348sMk4cHofEDAkhgFe9c5XBBNRcM3ttwqbtD7EmP1gUfcO
3+l+tRjiqTHW1+N30G6u4WF4k9DRmC+DOGQsHs04n4bxK75vaQ/4vcVZn4/bzegtXI7M0w3m4hTrHES4
ARw3/4DlHaN9MfFjf4IBF0ZxPIhmx40+Yu+uqU10mfZmp5aeJfvVqzPagIXmm4hpRzNTJczHP1sExn0z
twNsyKM1JjpspAoGd+U1X35B179w6s9WPjGZxWI4Czsr3xFFzM9B4T3M2wlscu6IyfvotxNtlpWDUnuY
txPY1ujDUvfRbye6XoZgyzgs+wD+/xD+PzgUQry9GgAA

Calculation from your buy point(price)?

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Step 1: What indicators are required?

ATR-AVERAGE TRUE RANGE

Step 1: Explain the Sell Strategy

I want to sell it when the price dropped 1 ATR from my last buy price.?
I know stop_loss & ROI function calculation is based on our last buy, but how can I define it and use this value for further calculations?
I deeply appreciate your time & effort in sharing your valuable time & knowledge.

How to access previous candle values for strategy?

If i want to create a strategy that would buy whenever an indicator for the current candle is lower than the indicator was 3 days ago, how would I go about that in freqtrade?

For instance, is the RSI now > the RSI at weekly open.

Thank you v much!

Fib Error Strategy

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Step 1: What indicators are required?

I canโ€™t start the bot on this strategy

Step 2: Explain the Buy Strategy

Trying to run a fibonacci strategy file.

`
import numpy as np
from numpy.core.records import ndarray
from pandas import Series, DataFrame
from math import log

class strategy002(IStrategy):
"""
Strategy 001
"""
# Minimal ROI designed for the strategy.
# This attribute will be overridden if the config file contains "minimal_roi"
minimal_roi = {
"60": 0.01,
"30": 0.03,
"20": 0.04,
"0": 0.05
}

# Optimal stoploss designed for the strategy
# This attribute will be overridden if the config file contains "stoploss"
stoploss = -0.10

# Optimal ticker interval for the strategy
ticker_interval = '5m'

# trailing stoploss
trailing_stop = False
trailing_stop_positive = 0.01
trailing_stop_positive_offset = 0.02

# run "populate_indicators" only for new candle
process_only_new_candles = False

# Experimental settings (configuration will overide these if set)
use_sell_signal = True
sell_profit_only = True
ignore_roi_if_buy_signal = False

# Optional order type mapping
order_types = {
    'buy': 'limit',
    'sell': 'limit',
    'stoploss': 'market',
    'stoploss_on_exchange': False
}

def fibonacci_retracements(df, field='close') -> DataFrame:
# ะžะฑั‰ะธะต ะฟะพั€ะพะณะธ:
# 1.0, sqrt(F_n / F_{n+1}), F_n / F_{n+1}, 0.5, F_n / F_{n+2}, F_n / F_{n+3}, 0.0
thresholds = [1.0, 0.786, 0.618, 0.5, 0.382, 0.236, 0.0]

window_min, window_max = df[field].min(), df[field].max()
fib_levels = [window_min + t * (window_max - window_min) for t in thresholds]

# ะ”ะฐะฝะฝั‹ะต ะฒ ัะพะพั‚ะฒะตั‚ัะธะฒะต ั ะฟะพั€ะพะณะพะฒั‹ะผะธ ะดะฐะฝะฝั‹ะผะธ
# ะกะผะพั€ั‚ะธั‚ ะฝะฐ ัƒั€ะพะฒะฝะธ ะธ ะตัะปะธ ะฒัะตะฒ ะฟะพั€ัะดะบะต ะฒะพะทะฒั€ะฐั‰ะฐะตั‚ ะดะฐะฝะฝั‹ะต
data = (df[field] - window_min) / (window_max - window_min)

# ะ’ะพะทะฒั€ะฐั‰ะฐะตะผ ัƒั€ะพะฒะฝะธ ะคะธะฑะพะฝะฐั‡ั‡ะธ
# ัะบัˆะพ ะบะฐะถะดั‹ะน ะธะฝะดะธะบะฐั‚ะพั€ ะฟะตั€ะตะฒั‹ัˆะฐะตั‚ ะทะฝะฐั‡ะตะฝะธั                    
return data.apply(lambda x: max(t for t in thresholds if x >= t))
       `

error
2020-05-26 10:08:29,340 - freqtrade.freqtradebot - INFO - Starting freqtrade develop 2020-05-26 10:08:29,362 - freqtrade - ERROR - Fatal exception! Traceback (most recent call last): File "/home/1/freqtrade/freqtrade/main.py", line 36, in main return_code = args['func'](args) File "/home/1/freqtrade/freqtrade/commands/trade_commands.py", line 19, in start_trading worker = Worker(args) File "/home/1/freqtrade/freqtrade/worker.py", line 34, in init self._init(False) File "/home/1/freqtrade/freqtrade/worker.py", line 53, in _init self.freqtrade = FreqtradeBot(self._config) File "/home/1/freqtrade/freqtrade/freqtradebot.py", line 59, in init self.strategy: IStrategy = StrategyResolver.load_strategy(self.config) File "/home/1/freqtrade/freqtrade/resolvers/strategy_resolver.py", line 47, in load_strategy extra_dir=config.get('strategy_path')) File "/home/1/freqtrade/freqtrade/resolvers/strategy_resolver.py", line 165, in _load_strategy kwargs={'config': config}) File "/home/1/freqtrade/freqtrade/resolvers/iresolver.py", line 108, in _load_object object_name=object_name) File "/home/1/freqtrade/freqtrade/resolvers/iresolver.py", line 92, in _search_object obj = next(cls._get_valid_object(module_path, object_name), None) File "/home/1/freqtrade/freqtrade/resolvers/iresolver.py", line 61, in _get_valid_object spec.loader.exec_module(module) # type: ignore # importlib does not use typehints File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/1/freqtrade/user_data/strategies/strategy002.py", line 10, in <module> class strategy002(IStrategy): NameError: name 'IStrategy' is not defined

Tell me what is missing, please?

Backtesting the strategies in freqtrade-strategies

Comments on the strategies on freqtrade-strategies folder. 30-60days worth of data from binance all timeframes available.

These need optimisation/not good
-AdxSmas:
-ASDTSRockwellTrading:
-AverageStrategy:
-AwesomeMacd
-BinHV27
-CCIStrategy
-ClucMay72018
-CMCWinner
-CofiBitStrategy
-EMASkipPump
-ReinforcedQuickie
-MultiRSI, ReinforcedAverageStrategy: buggy on VM's and needs fixing
-ReinforcedSmoothScalp
-Scalp
-Simple
-SmoothOperator
-SmoothScalp
-TechnicalExampleStrategy

Promising ones that may need further optimisation but results on premilinary optimisation is interesting.

-BbandRsi
-BinHV45
-CombinedBinHAndCluc
-MACDStrategy_crossed
-MACDStrategy
-Quickie

Renko bars/chart [enhancement]

I believe it would be a great enhancement to have Renko chart/bars as a feature in freqtrade. The nature of Renko charts will bring great filter capabilities to the "choppiness" of the crypto market.

Code reference:
https://github.com/ChillarAnand/stocktrends
https://www.backtrader.com/blog/posts/2017-06-26-renko-bricks/renko-bricks.html
https://machinelearningtrading.wordpress.com/2014/02/23/plotting-renko-bars-in-python/

Interesting article about optimization of renko charts:
https://towardsdatascience.com/renko-brick-size-optimization-34d64400f60e

What do you guys think ?

Strategy 001 - Details

Summary

File: strategy001.py
Source: https://goo.gl/LqZZnM

How to install?

  1. Copy the file strategy001.py into your user_data/strategies folder
  2. Run the bot: python3 ./freqtrade/main.py -s strategy001

Performance

Period 1: From 2017-11-19 to 2017-12-20

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              158            2.28          0.01454705          1573.5       158       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              648            0.39          0.01049042           849.9       593      55

Period 2: From 2017-12-19 to 2017-01-20

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              287            2.39          0.02763202          1306.3       287       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              534            0.32          0.00644767          1108.5       483      51

Period 3: From 2018-01-10 to 2018-01-30

Tested on: Freqtrade 0.16.1

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL               55            0.05          0.00012102           476.1       52       3

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL                80            0.14          0.00046387           507.9       72      8

Backtesting Logs

Period 1: From 2017-11-19 to 2017-12-20 - Profit ON

2018-01-20 22:17:16,422 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-on.json ...
2018-01-20 22:17:16,423 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 22:17:16,427 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 22:17:17,493 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 22:17:17,533 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy001.py)
2018-01-20 22:17:19,258 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-11-19T05:05:00+00:00 up to 2017-12-19T23:55:00+00:00 ...
2018-01-20 22:17:28,910 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA             25            2.51          0.00253976          1104.4        25       0
BTC_NEO              8            1.27          0.00040917          4470.6         8       0
BTC_NXT             27            1.93          0.00210377           903.9        27       0
BTC_MCO             34            2.45          0.00336771           592.5        34       0
BTC_ETH              7            1.60          0.00045026          3193.6         7       0
BTC_BCC              4            3.44          0.00055669          1196.2         4       0
BTC_VOX             11            4.07          0.00179471           345.0        11       0
BTC_GUP              6            2.10          0.00051095          2154.2         6       0
BTC_SC               5            1.80          0.00036215           912.0         5       0
BTC_VTC              1            2.44          0.00009861          9225.0         1       0
BTC_STRAT            6            1.98          0.00047682           620.0         6       0
BTC_OMG              1            1.51          0.00006074         42370.0         1       0
BTC_OK               3            2.41          0.00029185          1505.0         3       0
BTC_EDG              0          nan             0.00000000           nan           0       0
BTC_STORJ            0          nan             0.00000000           nan           0       0
BTC_EMC2             3            1.59          0.00019273           508.3         3       0
BTC_XLM              2            2.79          0.00022564          2502.5         2       0
BTC_LSK              2            1.39          0.00011200          2347.5         2       0
BTC_SYS              2            1.40          0.00011250           307.5         2       0
BTC_POWR             1            1.22          0.00005015           380.0         1       0
BTC_PAY              3            1.29          0.00015492          1658.3         3       0
BTC_DGB              0          nan             0.00000000           nan           0       0
BTC_ETC              1            1.98          0.00007939          7485.0         1       0
BTC_XRP              1            1.20          0.00004805           100.0         1       0
BTC_LTC              0          nan             0.00000000           nan           0       0
BTC_IOP              0          nan             0.00000000           nan           0       0
BTC_RCN              1            1.03          0.00004120            65.0         1       0
BTC_BTG              0          nan             0.00000000           nan           0       0
BTC_MONA             0          nan             0.00000000           nan           0       0
BTC_SALT             1            1.01          0.00004057            85.0         1       0
BTC_DASH             0          nan             0.00000000           nan           0       0
BTC_QTUM             1            1.11          0.00004449           285.0         1       0
BTC_CVC              1            9.37          0.00037644          1045.0         1       0
BTC_KMD              0          nan             0.00000000           nan           0       0
BTC_XEM              0          nan             0.00000000           nan           0       0
BTC_XMR              0          nan             0.00000000           nan           0       0
BTC_ZEC              1            1.14          0.00004578          6175.0         1       0
BTC_WAVES            0          nan             0.00000000           nan           0       0
BTC_PIVX             0          nan             0.00000000           nan           0       0
BTC_XZC              0          nan             0.00000000           nan           0       0
TOTAL              158            2.28          0.01454705          1573.5       158       0

Period 1: From 2017-11-19 to 2017-12-20 - Profit OFF

2018-01-20 22:17:16,422 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-off.json ...
2018-01-20 22:17:16,423 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 22:17:16,427 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 22:17:17,493 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 22:17:17,533 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy001.py)
2018-01-20 22:17:19,243 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-11-19T05:05:00+00:00 up to 2017-12-19T23:55:00+00:00 ...
2018-01-20 22:17:44,654 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA             28            1.27          0.00145543           847.3        27       1
BTC_NEO             28           -1.98         -0.00224335           914.6        24       4
BTC_NXT             27            1.93          0.00210377           903.9        27       0
BTC_MCO             35            2.06          0.00292255           546.3        34       1
BTC_ETH             22           -2.55         -0.00225072          1463.6        18       4
BTC_BCC             28           -0.50         -0.00059036           866.2        25       3
BTC_VOX             42            1.26          0.00216516           476.0        38       4
BTC_GUP             36            2.32          0.00347536           642.6        33       3
BTC_SC              40           -0.27         -0.00050152           562.9        34       6
BTC_VTC             23           -0.17         -0.00013169          1314.8        21       2
BTC_STRAT           34            2.42          0.00333788           705.1        34       0
BTC_OMG             21           -1.72         -0.00144301          1331.2        18       3
BTC_OK              26           -0.33         -0.00030668           958.3        23       3
BTC_EDG             26           -0.75         -0.00078125           697.1        23       3
BTC_STORJ           15            0.50          0.00027589          1135.7        14       1
BTC_EMC2            24           -1.22         -0.00114009           715.2        21       3
BTC_XLM             23            1.89          0.00186694           971.1        22       1
BTC_LSK             18           -1.67         -0.00121649           827.2        16       2
BTC_SYS             14            1.60          0.00090012           926.4        14       0
BTC_POWR            14           -7.92         -0.00445519          1127.9         9       5
BTC_PAY             14           -0.45         -0.00027902          1382.5        13       1
BTC_DGB             12            0.99          0.00047844           906.7        11       1
BTC_ETC             14           -0.76         -0.00044827          1205.0        12       2
BTC_XRP              6           -0.99         -0.00023014          1729.2         5       1
BTC_LTC              3            1.87          0.00022467           311.7         3       0
BTC_IOP              8            2.86          0.00092245          1355.6         8       0
BTC_RCN              7            1.93          0.00054512           749.3         7       0
BTC_BTG              5            3.80          0.00077761            58.0         5       0
BTC_MONA             9            0.72          0.00026461           636.1         8       1
BTC_SALT             8            1.58          0.00050485           569.4         8       0
BTC_DASH             2            1.34          0.00010862           190.0         2       0
BTC_QTUM             4            2.69          0.00043613           933.8         4       0
BTC_CVC              3            4.19          0.00050638           396.7         3       0
BTC_KMD              7            2.21          0.00064552           294.3         7       0
BTC_XEM              6            4.20          0.00101703           657.5         6       0
BTC_XMR              2            1.18          0.00009490            75.0         2       0
BTC_ZEC              5            1.47          0.00029437          2488.0         5       0
BTC_WAVES            3            2.35          0.00028505           188.3         3       0
BTC_PIVX             2            1.84          0.00014786           230.0         2       0
BTC_XZC              4            4.65          0.00075149           101.2         4       0
TOTAL              648            0.39          0.01049042           849.9       593      55

Period 2: From 2017-12-19 to 2017-01-20 - Profit ON

2018-01-20 22:17:16,422 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-on.json ...
2018-01-20 22:17:16,423 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 22:17:16,427 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 22:17:16,428 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 22:17:17,555 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 22:17:17,567 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy001.py)
2018-01-20 22:17:19,356 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-12-19T00:00:00+00:00 up to 2018-01-19T23:55:00+00:00 ...
2018-01-20 22:17:35,404 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA             25            2.06          0.00207345           981.6        25       0
BTC_NEO             23            2.06          0.00190994           974.6        23       0
BTC_NXT             25            3.09          0.00312712           429.8        25       0
BTC_MCO             23            2.50          0.00232185           760.2        23       0
BTC_ETH             19            1.35          0.00103307          1043.9        19       0
BTC_BCC              7            3.01          0.00085410          3423.6         7       0
BTC_VOX             27            3.35          0.00360341           389.4        27       0
BTC_GUP             22            3.75          0.00333531           355.0        22       0
BTC_SC               9            1.86          0.00067840          1791.7         9       0
BTC_VTC              6            1.63          0.00039437          2861.7         6       0
BTC_STRAT           11            1.76          0.00077770          1902.3        11       0
BTC_OMG             11            1.40          0.00061771           741.8        11       0
BTC_OK               8            1.61          0.00052108          1655.6         8       0
BTC_EDG              4            2.16          0.00035267          3092.5         4       0
BTC_STORJ            6            5.22          0.00128471           854.2         6       0
BTC_EMC2             3            1.89          0.00022978          6773.3         3       0
BTC_XLM              4            1.35          0.00021688          3136.2         4       0
BTC_LSK              6            2.14          0.00052041           107.5         6       0
BTC_SYS              6            2.36          0.00057413           142.5         6       0
BTC_POWR             5            1.79          0.00036412          2766.0         5       0
BTC_PAY              2            1.08          0.00008689          2770.0         2       0
BTC_DGB              3            1.88          0.00022868           120.0         3       0
BTC_ETC              4            1.60          0.00025739          5377.5         4       0
BTC_XRP              2            4.05          0.00032702            47.5         2       0
BTC_LTC              1            1.51          0.00006095           800.0         1       0
BTC_IOP              3            1.37          0.00016502           130.0         3       0
BTC_RCN              2            1.40          0.00011334          1510.0         2       0
BTC_BTG              1            3.06          0.00012398         32710.0         1       0
BTC_MONA             2            1.32          0.00010553           515.0         2       0
BTC_SALT             3            1.27          0.00015456           115.0         3       0
BTC_DASH             2            1.57          0.00012572           157.5         2       0
BTC_QTUM             1            2.16          0.00008698           470.0         1       0
BTC_CVC              1            1.28          0.00005180            65.0         1       0
BTC_KMD              1            1.47          0.00005929           710.0         1       0
BTC_XEM              2            1.98          0.00015966           230.0         2       0
BTC_XMR              2            1.70          0.00013661         13775.0         2       0
BTC_ZEC              0          nan             0.00000000           nan           0       0
BTC_WAVES            2            1.32          0.00010661           132.5         2       0
BTC_PIVX             1            4.92          0.00019700           500.0         1       0
BTC_XZC              2            3.70          0.00029478            75.0         2       0
TOTAL              287            2.39          0.02763202          1306.3       287       0

Period 2: From 2017-12-19 to 2017-01-20 - Profit OFF

2018-01-20 22:17:29,773 - freqtrade.optimize.backtesting - INFO - Using config: ../freqtrade-strategies/user_data/config-profit-off.json ...
2018-01-20 22:17:29,774 - freqtrade.misc - INFO - Validating configuration ...
2018-01-20 22:17:29,780 - freqtrade.optimize.backtesting - INFO - Using ticker_interval: 5 ...
2018-01-20 22:17:29,781 - freqtrade.optimize.backtesting - INFO - Using local backtesting data (using whitelist in given config) ...
2018-01-20 22:17:29,781 - freqtrade.optimize.backtesting - INFO - Using stake_currency: BTC ...
2018-01-20 22:17:29,781 - freqtrade.optimize.backtesting - INFO - Using stake_amount: 0.004 ...
2018-01-20 22:17:30,771 - freqtrade.optimize.backtesting - INFO - Using max_open_trades: 10 ...
2018-01-20 22:17:30,791 - freqtrade.strategy.strategy - INFO - Load strategy class: CustomStrategy (user_data.strategies.strategy001.py)
2018-01-20 22:17:32,440 - freqtrade.optimize.backtesting - INFO - Measuring data from 2017-12-19T00:00:00+00:00 up to 2018-01-19T23:55:00+00:00 ...
2018-01-20 22:18:00,273 - freqtrade.optimize.backtesting - INFO -
==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
BTC_ADA             24           -1.98         -0.00194306          1186.0        20       4
BTC_NEO             25            1.90          0.00191529           807.4        24       1
BTC_NXT             26            0.26          0.00027102          1023.1        23       3
BTC_MCO             32            2.07          0.00267120           576.2        31       1
BTC_ETH             24            1.29          0.00124228          1094.6        24       0
BTC_BCC             19            1.07          0.00083003          1459.2        17       2
BTC_VOX             42            2.13          0.00357688           400.4        40       2
BTC_GUP             35            1.58          0.00224626           646.4        33       2
BTC_SC              30           -0.62         -0.00119966           805.2        26       4
BTC_VTC             21           -0.41         -0.00034977          1236.7        18       3
BTC_STRAT           19            1.46          0.00111815          1391.6        18       1
BTC_OMG             28            1.14          0.00128004           779.6        25       3
BTC_OK              20            2.07          0.00167078          1252.0        20       0
BTC_EDG             18           -1.90         -0.00134729          1393.3        14       4
BTC_STORJ           26            1.08          0.00114147           465.8        24       2
BTC_EMC2            16           -5.43         -0.00357566          1443.8        12       4
BTC_XLM             15            0.11          0.00007490          1492.0        14       1
BTC_LSK             17            1.72          0.00118579           733.8        16       1
BTC_SYS             16           -0.69         -0.00046590           844.1        14       2
BTC_POWR             9           -2.49         -0.00091729          1570.0         7       2
BTC_PAY             14           -0.29         -0.00016324           737.5        12       2
BTC_DGB              8           -2.52         -0.00081098          1062.5         7       1
BTC_ETC              6            2.53          0.00061036          3604.2         6       0
BTC_XRP              5           -3.40         -0.00068659          1791.0         4       1
BTC_LTC              1          -14.92         -0.00060043         44200.0         0       1
BTC_IOP              5            1.86          0.00037402           105.0         5       0
BTC_RCN              3            1.36          0.00016452          1053.3         3       0
BTC_BTG              3            1.74          0.00021060           128.3         2       1
BTC_MONA             5          -11.64         -0.00233731          4250.0         3       2
BTC_SALT             4            1.32          0.00021392           281.2         4       0
BTC_DASH             3            1.38          0.00016651          1058.3         3       0
BTC_QTUM             2            2.14          0.00017275           347.5         2       0
BTC_CVC              2            1.42          0.00011602            65.0         2       0
BTC_KMD              2          -14.63         -0.00119493          2765.0         1       1
BTC_XEM              2            1.98          0.00015966           230.0         2       0
BTC_XMR              2            1.70          0.00013661         13775.0         2       0
BTC_ZEC              0          nan             0.00000000           nan           0       0
BTC_WAVES            2            1.32          0.00010661           132.5         2       0
BTC_PIVX             1            4.92          0.00019700           500.0         1       0
BTC_XZC              2            2.33          0.00018711           125.0         2       0
TOTAL              534            0.32          0.00644767          1108.5       483      51

Staticmethod objects -> ReinforcedAverageStrategy / ReinforcedQuickie / ReinforcedSmoothScalp

Just tried to backtest following strategies out of teh repo (no mods):
ReinforcedAverageStrategy / ReinforcedQuickie / ReinforcedSmoothScalp

Got the same error for all of them:

Traceback (most recent call last):
  File "./freqtrade/main.py", line 92, in <module>
    main(sys.argv[1:])
  File "./freqtrade/main.py", line 35, in main
    args.func(args)
  File "/root/freqtrade/freqtrade/optimize/backtesting.py", line 500, in start
    backtesting = Backtesting(config)
  File "/root/freqtrade/freqtrade/optimize/backtesting.py", line 88, in __init__
    self.strategylist.append(StrategyResolver(self.config).strategy)
  File "/root/freqtrade/freqtrade/resolvers/strategy_resolver.py", line 40, in __init__
    extra_dir=config.get('strategy_path'))
  File "/root/freqtrade/freqtrade/resolvers/strategy_resolver.py", line 161, in _load_strategy
    return import_strategy(strategy, config=config)
  File "/root/freqtrade/freqtrade/strategy/__init__.py", line 28, in import_strategy
    attr = deepcopy(comb)
  File "/root/miniconda3/lib/python3.7/copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "/root/miniconda3/lib/python3.7/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/root/miniconda3/lib/python3.7/copy.py", line 169, in deepcopy
    rv = reductor(4)
TypeError: can't pickle staticmethod objects

Strategy 005 - Details

Summary

File: strategy005.py
Source: Hyperopt results

How to install?

  1. Copy the file strategy005.py into your user_data/strategies folder
  2. Run the bot with the parameter python3 ./freqtrade/main.py -s Strategy005

Performance

Period 1: From 2018-01-10 to 2018-01-30

Tested on: Freqtrade 0.16.1

Profit ON: experimental.sell_profit_only: true

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              180            1.16          0.00827589          156.2       180       0

Profit OFF: experimental.sell_profit_only: false

==================================== BACKTESTING REPORT ====================================
pair         buy count    avg profit %    total profit BTC    avg duration    profit    loss
---------  -----------  --------------  ------------------  --------------  --------  ------
TOTAL              242            0.34          0.00323446           61.6       161      81

Hyperopt For Strategies Does Not Work

When I run hyperopt command for any strat, like this :
python3 ./freqtrade/main.py -s strategy001 hyperopt

I am having following errors :
KeyError: 'ema50' OR KeyError: 'fisher_rsi'

How can I run hyperopt on your algos?

Btw, thank you for sharing ๐Ÿ‘

Open more than one trade simultaneously in backtest

Currently I'm not able to open more than one trade in backtest. A new trade is opened only after the previous one has closed.
This is my configurations related informations, strategy does not override any of this:

"max_open_trades": 10,
"stake_currency": "BTC",
"stake_amount": 0.005,
"tradable_balance_ratio": 0.1,
"fiat_display_currency": "USD",
"dry_run": true,

In backtest, how much is the initial simulated balance?
In backtest, max_open_trades will not get considered?
I did not find anything about it in the doc that explain me why I'm not able to open more than one trade simultaneously in backtest.
Thank you

Add more strategies for bear markets

I know that you might think that I'm too lazy to code them myself but here's why I think it's necessary to add more strategies for bear markets:

  • None of the strategies in this repo work well in bear markets
  • Bear markets are really dangerous for people (like me and the majority of freqtrade users) who are programmers and don't know much about trading
  • It's really hard to find explanations on what's the best practice when a bear market occurs.
  • Issue #892 makes coding a good bear strategy extremely hard for non-skilled traders/programmers.

I think that freqtrade has the potential to become a really useful tool that can allow anyone to profit from cryptocurrencies, but right now I feel like too much is on the hands of the end user.
I don't want to seem ungrateful for the splendid work you have done but I feel like adding more strategies would benefit everyone.
Thanks for your time!

InformativeSample results in an error (InformativePairs not working anymore?)

The problem

The InformativeSample.py doesn't work anymore, it results in errors for backtesting and plotting, both different errors.

System specs

Backtesting

  • The command I run: freqtrade backtesting -c InformativeSample
  • The error: TypeError: get_pair_dataframe() got an unexpected keyword argument 'ticker_interval'
  • Full error: https://pastebin.com/E82ahrVK

Plotting

  • The command I run: freqtrade plot-dataframe -s InformativeSample -p MTH/BTC --timerange=20191105-20191120
  • The error: AttributeError: 'InformativeSample' object has no attribute 'dp'
  • Full error: https://pastebin.com/r0P1S08J

Price and Volume strategy

Step 1: What indicators are required?

No need TA indicators.

Step 2: Explain the Buy Strategy

This is medium frequency strategy. Strategy need 1 second Volume and Price information, and 10s Volume and Price information. Also spread information. Our trigger is Volume and Price changes for 1s timestamp in % from previous 1s timestamp. In this case bot can trigger in wrong situations than someone sell/buy the whole order book. Our guard is 10s spread decrease. Spread indicator will tell us that currency have real liquidity. We rebuy currency till all that parameters are fine.

Step 1: Explain the Sell Strategy

Sell strategy is 0.005 profit in 0-5 mins.
Force sell -0.001 after 5 mins.

Thanks.

LINEAR REGRESSION SLOPE & LINEAR REGRESSION ANGLE range?

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Step 1: What indicators are required?

LINEAR REGRESSION SLOPE & LINEAR REGRESSION ANGLE?

Step 2: Explain the Buy Strategy

We will buy when LINEAR REGRESSION SLOP('ema20') is positive & also LINEAR REGRESSION ANGLE('ema50) is positive & also rsi slope is positive.

Step 1: Explain the Sell Strategy

We will sell when LINEAR REGRESSION SLOP('ema20') is negative & also LINEAR REGRESSION ANGLE('ema50) is negative & also rsi_slop is negative?

QUESTION?

I know this question might be out of the scope of freqtrade, but because freqtrade is a knowledgeable community I also wanted to ask here.
Does anyone knows what is the range_value for "LINEAR REGRESSION ANGLE" & "LINEAR REGRESSION SLOPE" in ta_lib, does it goes a negative degree & slope when the degree and slop become negative?
Is the "LINEAR REGRESSION SLOPE" degree from -100 to 100?
What about the "LINEAR REGRESSION ANGLE"?(0 TO 360 OR IT goes reversal?)
I want to calculate [RSI_SLOP] and was able to do it but I am lagging conceptually about these 2 statistic functions?

& also does this LINEAR REGRESSION SLOPE the only slop available to use in our strategy?

All ideas and insights are appreciated.
Thanks

The list of ta-lib indicators used in the strategies

This will help select a replacement library to move to from ta-lib.

$ egrep -roh 'ta\..*\(' .|sort -u
gives

ta.ADX(
ta.CCI(
ta.CDLHAMMER(
ta.CMO(
ta.EMA(
ta.MACD(
ta.MAX(
ta.MFI(
ta.MIN(
ta.MINUS_DI(
ta.MOM(
ta.PLUS_DI(
ta.RSI(
ta.SAR(
ta.SMA(
ta.STOCH(
ta.STOCHF(
ta.TEMA(

Total number of appearances to be changed:

$ egrep -r 'ta\..*\(' .|wc -l
163

scanning indicator parameters for Hyperopt optimization

Dear community,

I wrote a optimization code for scanning parameters of indicator (customized one) for Hyperopt optimization. The indicator is based on a nonlinear smoothing filter on momentum. Buy-sell conditions are sign changes of its first derivative. It takes two parameters, ie. length, power. I compare backtest results on both Freqtrade and Tradingview to validate that indicator working properly.

For optimization I used this approach: link , basically scan two parameters for certain ranges. However, I could not get any result from Hyperopt optimization. The code is below. Thanks in advance,
Best,
Hikmet

Code:

from pandas import DataFrame
from typing import Dict, Any, Callable, List
from functools import reduce

from skopt.space import Categorical, Dimension, Integer, Real

import freqtrade.vendor.qtpylib.indicators as qtpylib
from freqtrade.optimize.hyperopt_interface import IHyperOpt

jleni = 24
jlenf = 25
jpowi = 10
jpowf = 11


class jnonlinopt(IHyperOpt):

    @staticmethod
    def populate_indicators(dataframe: DataFrame, metadata: dict) -> DataFrame:
        for lenrange in range(jleni, jlenf):
            for powrange in range(jpowi, jpowf):
                dataframe[f'len({lenrange})pow({powrange})'] = qtpylib.jnonlin(dataframe['close'], lenrange, powrange)
        return dataframe

    @staticmethod
    def buy_strategy_generator(params: Dict[str, Any]) -> Callable:
        """
        Define the buy strategy parameters to be used by hyperopt
        """
        def populate_buy_trend(dataframe: DataFrame, metadata: dict) -> DataFrame:
            """
            Buy strategy Hyperopt will build and use
            """
            conditions = []

            # TRIGGERS
            if 'trigger' in params:
                for lenrange in range(jleni, jlenf):
                    for powrange in range(jpowi, jpowf):
                        if params['trigger'] == f'len({lenrange})pow({powrange})':
                            conditions.append(dataframe[f'len({lenrange})pow({powrange})']>dataframe[f'len({lenrange})pow({powrange})'].shift(1)
                                & dataframe[f'len({lenrange})pow({powrange})'].shift(1)<dataframe[f'len({lenrange})pow({powrange})'].shift(2))

            if conditions:
                dataframe.loc[
                    reduce(lambda x, y: x & y, conditions),
                    'buy'] = 1

            return dataframe

        return populate_buy_trend

    @staticmethod
    def indicator_space() -> List[Dimension]:
        buyTriggerList = []
        for lenrange in range(jleni, jlenf):
            for powrange in range(jpowi, jpowf):
                buyTriggerList.append(
                    f'lenrange_({lenrange})_powrange_({powrange}')
        return [
            Categorical(buyTriggerList, name='trigger')
        ]

    @staticmethod
    def sell_strategy_generator(params: Dict[str, Any]) -> Callable:
        """
        Define the sell strategy parameters to be used by hyperopt
        """
        def populate_sell_trend(dataframe: DataFrame, metadata: dict) -> DataFrame:
            """
            Sell strategy Hyperopt will build and use
            """
            # print(params)
            conditions = []

            # TRIGGERS
            if 'sell-trigger' in params:
                for lenrange in range(jleni, jlenf):
                    for powrange in range(jpowi, jpowf):
                        if params['trigger'] == f'len({lenrange})pow({powrange})':
                            conditions.append(dataframe[f'len({lenrange})pow({powrange})']<dataframe[f'len({lenrange})pow({powrange})'].shift(1)
                                & dataframe[f'len({lenrange})pow({powrange})'].shift(1)>dataframe[f'len({lenrange})pow({powrange})'].shift(2))
            if conditions:
                dataframe.loc[
                    reduce(lambda x, y: x & y, conditions),
                    'sell'] = 1

            return dataframe

        return populate_sell_trend

    @staticmethod
    def sell_indicator_space() -> List[Dimension]:
        """
        Define your Hyperopt space for searching sell strategy parameters
        """
        sellTriggerList = []
        for lenrange in range(jleni, jlenf):
            for powrange in range(jpowi, jpowf):
                sellTriggerList.append(
                    f'lenrange_({lenrange})_powrange_({powrange}')

        return [
            Categorical(sellTriggerList, name='sell-trigger')
        ]

    def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (
                (dataframe['jnonlin'] > dataframe['jnonlin'].shift(1) )
                    & (dataframe['jnonlin'].shift(1) < dataframe['jnonlin'].shift(2) )
            ),
            'buy'] = 1

        return dataframe

    def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        """
        Based on TA indicators. Should be a copy of from strategy
        must align to populate_indicators in this file
        Only used when --spaces does not include sell
        """
        dataframe.loc[
            (
                (dataframe['jnonlin'] < dataframe['jnonlin'].shift(1) )
                    & (dataframe['jnonlin'].shift(1) > dataframe['jnonlin'].shift(2) )
            ),
            'sell'] = 1

        return dataframe


    @staticmethod
    def generate_roi_table(params: Dict) -> Dict[int, float]:
        """
        Generate the ROI table that will be used by Hyperopt
        """
        roi_table = {}
        roi_table[0] = params['roi_p1'] + params['roi_p2'] + params['roi_p3']
        roi_table[params['roi_t3']] = params['roi_p1'] + params['roi_p2']
        roi_table[params['roi_t3'] + params['roi_t2']] = params['roi_p1']
        roi_table[params['roi_t3'] + params['roi_t2'] + params['roi_t1']] = 0

        return roi_table

    @staticmethod
    def stoploss_space() -> List[Dimension]:
        """
        Stoploss Value to search
        """
        return [
            Real(-0.5, -0.02, name='stoploss'),
        ]

    @staticmethod
    def roi_space() -> List[Dimension]:
        """
        Values to search for each ROI steps
        """
        return [
             Integer(10, 120, name='roi_t1'),
             Integer(10, 60, name='roi_t2'),
             Integer(10, 40, name='roi_t3'),
             Real(0.01, 0.04, name='roi_p1'),
             Real(0.01, 0.07, name='roi_p2'),
             Real(0.01, 0.20, name='roi_p3'),
        ]

ADX Momentum Indicator logic appears to be backwards.

After looking at the ADXMomentum indicator, the logic appears to be slightly backwards from the quoted source. Below is what i believe it is supposed to look like but please double check.

    def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (
                    (dataframe['adx'] > 25) &
                    (dataframe['mom'] > 0) &
                    (dataframe['plus_di'] > 25) &
                    (dataframe['plus_di'] > dataframe['minus_di'])

            ),
            'buy'] = 1
        return dataframe

    def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
        dataframe.loc[
            (
                    (dataframe['adx'] > 25) &
                    (dataframe['mom'] < 0) &
                    (dataframe['minus_di'] > 25) &
                    (dataframe['plus_di'] < dataframe['minus_di'])

            ),
            'sell'] = 1
        return dataframe

Thanks for all the strategies. Keep up the good work.

Strategy error

Kazam_screenshot_00000

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Step 1: What indicators are required?

Please list all the indicators required for the buy and sell strategy.

Step 2: Explain the Buy Strategy

Please explain in details the indicators you need to run the buy strategy, then
explain in detail what is the trigger to buy.

Step 1: Explain the Sell Strategy

Please explain in details the indicators you need to run the sell strategy, then
explain in detail what is the trigger to sell.

Source

What come from this strategy? Cite your source:

  • http://

MACD with custom candle stick as a base of calculation?

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Step 1: What indicators are required?

#MACD

Step 2: Explain the Buy Strategy

We will buy when macd crossed_Above macdsignal but we are going to use our tailored macd for this straetgy

Step 1: Explain the Sell Strategy

We will sell when macdsignal crossed_Above macd, but we are going to use our tailored macd for this strategy

Is it possible to use ("high"+"low")/2) instead of "close" for its calculation?
I tried to define hl2 and then feed this to the macd but it gave me an error.

"hl2 = (dataframe["close"] + dataframe["open"])/2"

&

I tried to change the value inside the macd and I encountered the error again.

" macd = ta.MACD(dataframe,fastperiod=8, slowperiod=28, signalperiod=9)
"
When I change the data frame with close or hl2 it won't work, I know it's not defined and that's why not working.

So is it possible to make our custom values based on our dataset
cols = ['date', 'open', 'high', 'low', 'close', 'volume']
and use them as source of calculation ?(like hl2,hlc3,ohlc/4,ema ,.....)
I deeply appreciate your time & knowledge.

No buys

I have been running strategy002 for 4 days and still no buys..

BinHV27 issue

if len(buyframe) == 0: dataframe.loc[[False], 'sell'] = 0 return dataframe

The above is given me this:
2424, in check_bool_indexer "Item wrong length {} instead of {}.".format(len(result), len(index)) IndexError: Item wrong length 1 instead of 499.

Do I have something wrong. I cannot figure out what exactly could be wrong.

SuperTrend

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

I didn't manage to add Supertrend to Freqtrade, and need help if it's possible.

Step 1: What indicators are required?

SuperTrend
F (factor): 2.1
Pd (period): 8

Step 2: Explain the Buy Strategy

When the price is over the trend then BUY

Step 1: Explain the Sell Strategy

When the price is below the trend then SELL

Source

What come from this strategy? Cite your source:
https://www.tradingview.com/script/sufFpGjC-Supertrend-V1-0-Buy-or-Sell-Signal/
https://github.com/arkochhar/Technical-Indicators/blob/master/indicator/indicators.py

Error backtesting

Whenever I backtest the generic strategy file that you create with the installation guide, it works fine.

However, whenever I try to backtest one of the berlinguyinca strategies, or any other strategy, I am getting the traceback and error shown in the snip. I don't even have the Strategy005 in my files anymore, so why is that tripping a permission error?

error snip

ImportError: cannot import name 'parse_ticker_dataframe'

When executing

freqtrade backtesting --strategy-list ADXMomentum ClucMay72018 MACDStrategy_crossed Simple AdxSmas CMCWinner MACDStrategy ASDTSRockwellTrading CofiBitStrategy SmoothScalp AverageStrategy CombinedBinHAndCluc DoesNothingStrategy Quickie BbandRsi EMASkipPump ReinforcedQuickie ReinforcedSmoothScalp CCIStrategy Low_BB Scalp --ticker-interval=1h --timerange=20190101-

I am getting error. Looks like something was changed in the meanwhile.


Traceback (most recent call last):
  File "/home/adin/TradingBot/freqtrade/freqtrade/main.py", line 36, in main
    return_code = args['func'](args)
  File "/home/adin/TradingBot/freqtrade/freqtrade/commands/optimize_commands.py", line 48, in start_backtesting
    backtesting = Backtesting(config)
  File "/home/adin/TradingBot/freqtrade/freqtrade/optimize/backtesting.py", line 79, in __init__
    self.strategylist.append(StrategyResolver.load_strategy(stratconf))
  File "/home/adin/TradingBot/freqtrade/freqtrade/resolvers/strategy_resolver.py", line 47, in load_strategy
    extra_dir=config.get('strategy_path'))
  File "/home/adin/TradingBot/freqtrade/freqtrade/resolvers/strategy_resolver.py", line 165, in _load_strategy
    kwargs={'config': config})
  File "/home/adin/TradingBot/freqtrade/freqtrade/resolvers/iresolver.py", line 108, in _load_object
    object_name=object_name)
  File "/home/adin/TradingBot/freqtrade/freqtrade/resolvers/iresolver.py", line 92, in _search_object
    obj = next(cls._get_valid_object(module_path, object_name), None)
  File "/home/adin/TradingBot/freqtrade/freqtrade/resolvers/iresolver.py", line 61, in _get_valid_object
    spec.loader.exec_module(module)  # type: ignore # importlib does not use typehints
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/adin/TradingBot/freqtrade/user_data/strategies/InformativeSample.py", line 7, in <module>
    from freqtrade.data.converter import parse_ticker_dataframe
ImportError: cannot import name 'parse_ticker_dataframe'

Can you please help?

Strategy creation

Hello everyone.
I try to understand the strategies, I tried to trade on the ready-made ones that you published. But I wonder if I have a chart, then how the strategy code will look on it, in order to try to insert it into the bot.

https://i.ibb.co/12STw4G/photo-2020-05-18-11-04-09.jpg

Maybe someone can share a similar strategy.

Thanks in advance.

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.