Merge pull request #25 from freqtrade/update_strategies
Update strategies
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Freqtrade strategies
|
||||
|
||||
This Git repo contains free buy/sell strategies for [Freqtrade](https://github.com/freqtrade/freqtrade) >= `0.16.0`.
|
||||
This Git repo contains free buy/sell strategies for [Freqtrade](https://github.com/freqtrade/freqtrade).
|
||||
|
||||
## Disclaimer
|
||||
|
||||
@@ -31,6 +31,7 @@ bot.
|
||||
- [How to create/optimize a strategy?](https://github.com/freqtrade/freqtrade/blob/develop/docs/bot-optimization.md)
|
||||
|
||||
## Free trading strategies
|
||||
|
||||
Value below are result from backtesting from 2018-01-10 to 2018-01-30 and
|
||||
`experimental.sell_profit_only` enabled. More detail on each strategy
|
||||
page.
|
||||
@@ -47,13 +48,18 @@ page.
|
||||
Strategies from this repo are free to use. Feel free to update them.
|
||||
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.
|
||||
|
||||
## Share your own strategies and contribute to this repo
|
||||
|
||||
Feel free to send your strategies, comments, optimizations and pull requests via an
|
||||
[Issue ticket](https://github.com/freqtrade/freqtrade-strategies/issues/new).
|
||||
|
||||
## FAQ
|
||||
|
||||
### What is Freqtrade?
|
||||
|
||||
[Freqtrade](https://github.com/freqtrade) is a Simple High
|
||||
frequency trading bot for crypto currencies designed to support
|
||||
|
||||
@@ -80,8 +86,7 @@ enabled and disabled.
|
||||
|
||||
### How to install a strategy?
|
||||
|
||||
First you need a [working Freqtrade](https://github.com/freqtrade/freqtrade/blob/develop/docs/index.md)
|
||||
in version >= 0.16.0.
|
||||
First you need a [working Freqtrade](https://freqtrade.io).
|
||||
|
||||
Once you have the bot on the right version, follow this steps:
|
||||
|
||||
@@ -91,6 +96,8 @@ Once you have the bot on the right version, follow this steps:
|
||||
3. Paste it into your `user_data/strategies` folder
|
||||
4. Run the bot with the parameter `-s <STRATEGY CLASS NAME>` (ex: `python3 ./freqtrade/main.py -s Strategy001`)
|
||||
|
||||
[More information](https://www.freqtrade.io/en/latest/bot-optimization/)
|
||||
|
||||
### How to test a strategy?
|
||||
|
||||
Let assume you have selected the strategy `strategy001.py`:
|
||||
@@ -107,12 +114,10 @@ python3 ./freqtrade/main.py -s Strategy001 backtesting
|
||||
python3 ./freqtrade/main.py -s Strategy001 backtesting --refresh-pairs-cached
|
||||
```
|
||||
|
||||
*Note:* Generally, it's recommendet to use static backtest data (from a defined period of time) for compareable results.
|
||||
|
||||
#### Test with live data
|
||||
|
||||
```bash
|
||||
python3 ./freqtrade/main.py -s Strategy001 backtesting --live
|
||||
```
|
||||
|
||||
## Can I have your configuration file?
|
||||
|
||||
You will find them into [user_data/](https://github.com/freqtrade/freqtrade-strategies/tree/master/user_data) folder.
|
||||
|
||||
@@ -13,7 +13,7 @@ import freqtrade.vendor.qtpylib.indicators as qtpylib
|
||||
# Update this variable if you change the class name
|
||||
|
||||
|
||||
class strategy001(IStrategy):
|
||||
class Strategy001(IStrategy):
|
||||
"""
|
||||
Strategy 001
|
||||
author@: Gerald Lonlas
|
||||
@@ -34,12 +34,36 @@ class strategy001(IStrategy):
|
||||
|
||||
# Optimal stoploss designed for the strategy
|
||||
# This attribute will be overridden if the config file contains "stoploss"
|
||||
stoploss = -0.3
|
||||
stoploss = -0.10
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
||||
# trailing stoploss
|
||||
trailing_stop = False
|
||||
trailing_stop_positive = 0.01
|
||||
trailing_stop_positive_offset = 0.02
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
# run "populate_indicators" only for new candle
|
||||
ta_on_candle = 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 populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Adds several different TA indicators to the given DataFrame
|
||||
|
||||
@@ -58,7 +82,7 @@ class strategy001(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_buy_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -74,7 +98,7 @@ class strategy001(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_sell_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -10,7 +10,7 @@ import talib.abstract as ta
|
||||
import freqtrade.vendor.qtpylib.indicators as qtpylib
|
||||
import numpy # noqa
|
||||
|
||||
class strategy002(IStrategy):
|
||||
class Strategy002(IStrategy):
|
||||
"""
|
||||
Strategy 002
|
||||
author@: Gerald Lonlas
|
||||
@@ -31,12 +31,36 @@ class strategy002(IStrategy):
|
||||
|
||||
# Optimal stoploss designed for the strategy
|
||||
# This attribute will be overridden if the config file contains "stoploss"
|
||||
stoploss = -0.3
|
||||
stoploss = -0.10
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
||||
# trailing stoploss
|
||||
trailing_stop = False
|
||||
trailing_stop_positive = 0.01
|
||||
trailing_stop_positive_offset = 0.02
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
# run "populate_indicators" only for new candle
|
||||
ta_on_candle = 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 populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Adds several different TA indicators to the given DataFrame
|
||||
|
||||
@@ -68,7 +92,7 @@ class strategy002(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_buy_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -85,7 +109,7 @@ class strategy002(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_sell_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -10,7 +10,7 @@ import talib.abstract as ta
|
||||
import freqtrade.vendor.qtpylib.indicators as qtpylib
|
||||
import numpy # noqa
|
||||
|
||||
class strategy003(IStrategy):
|
||||
class Strategy003(IStrategy):
|
||||
"""
|
||||
Strategy 003
|
||||
author@: Gerald Lonlas
|
||||
@@ -31,12 +31,36 @@ class strategy003(IStrategy):
|
||||
|
||||
# Optimal stoploss designed for the strategy
|
||||
# This attribute will be overridden if the config file contains "stoploss"
|
||||
stoploss = -0.3
|
||||
stoploss = -0.10
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
||||
# trailing stoploss
|
||||
trailing_stop = False
|
||||
trailing_stop_positive = 0.01
|
||||
trailing_stop_positive_offset = 0.02
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
# run "populate_indicators" only for new candle
|
||||
ta_on_candle = 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 populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Adds several different TA indicators to the given DataFrame
|
||||
|
||||
@@ -78,7 +102,7 @@ class strategy003(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_buy_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -102,7 +126,7 @@ class strategy003(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_sell_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -8,7 +8,7 @@ from pandas import DataFrame
|
||||
|
||||
import talib.abstract as ta
|
||||
|
||||
class strategy004(IStrategy):
|
||||
class Strategy004(IStrategy):
|
||||
|
||||
"""
|
||||
Strategy 004
|
||||
@@ -30,12 +30,36 @@ class strategy004(IStrategy):
|
||||
|
||||
# Optimal stoploss designed for the strategy
|
||||
# This attribute will be overridden if the config file contains "stoploss"
|
||||
stoploss = -0.3
|
||||
stoploss = -0.10
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
||||
# trailing stoploss
|
||||
trailing_stop = False
|
||||
trailing_stop_positive = 0.01
|
||||
trailing_stop_positive_offset = 0.02
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
# run "populate_indicators" only for new candle
|
||||
ta_on_candle = 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 populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Adds several different TA indicators to the given DataFrame
|
||||
|
||||
@@ -72,7 +96,7 @@ class strategy004(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_buy_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -102,7 +126,7 @@ class strategy004(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_sell_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -33,12 +33,36 @@ class Strategy005(IStrategy):
|
||||
|
||||
# Optimal stoploss designed for the strategy
|
||||
# This attribute will be overridden if the config file contains "stoploss"
|
||||
stoploss = -0.5
|
||||
stoploss = -0.10
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
||||
# trailing stoploss
|
||||
trailing_stop = False
|
||||
trailing_stop_positive = 0.01
|
||||
trailing_stop_positive_offset = 0.02
|
||||
|
||||
# Optimal ticker interval for the strategy
|
||||
ticker_interval = '5m'
|
||||
|
||||
# run "populate_indicators" only for new candle
|
||||
ta_on_candle = 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 populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Adds several different TA indicators to the given DataFrame
|
||||
|
||||
@@ -80,7 +104,7 @@ class Strategy005(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_buy_trend(self, dataframe: DataFrame) -> 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
|
||||
@@ -102,7 +126,7 @@ class Strategy005(IStrategy):
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_sell_trend(self, dataframe: DataFrame) -> 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
|
||||
Reference in New Issue
Block a user