Allow selection of templates for strategy

This commit is contained in:
Matthias
2019-11-21 07:21:19 +01:00
parent b3dbb81838
commit f26c40082d
7 changed files with 37 additions and 8 deletions

View File

@@ -0,0 +1 @@
(qtpylib.crossed_above(dataframe['rsi'], 30)) & # Signal: RSI crosses above 30

View File

@@ -154,8 +154,8 @@ dataframe['htleadsine'] = hilbert['leadsine']
"""
# first check if dataprovider is available
if self.dp:
if self.dp.runmode in ('live', 'dry_run'):
ob = self.dp.orderbook(metadata['pair'], 1)
dataframe['best_bid'] = ob['bids'][0][0]
dataframe['best_ask'] = ob['asks'][0][0]
if self.dp.runmode in ('live', 'dry_run'):
ob = self.dp.orderbook(metadata['pair'], 1)
dataframe['best_bid'] = ob['bids'][0][0]
dataframe['best_ask'] = ob['asks'][0][0]
"""

View File

@@ -0,0 +1,17 @@
# Momentum Indicators
# ------------------------------------
# RSI
dataframe['rsi'] = ta.RSI(dataframe)
# Retrieve best bid and best ask from the orderbook
# ------------------------------------
"""
# first check if dataprovider is available
if self.dp:
if self.dp.runmode in ('live', 'dry_run'):
ob = self.dp.orderbook(metadata['pair'], 1)
dataframe['best_bid'] = ob['bids'][0][0]
dataframe['best_ask'] = ob['asks'][0][0]
"""

View File

@@ -0,0 +1 @@
(qtpylib.crossed_above(dataframe['rsi'], 70)) & # Signal: RSI crosses above 70