Allow selection of templates for strategy
This commit is contained in:
1
freqtrade/templates/subtemplates/buy_trend_minimal.j2
Normal file
1
freqtrade/templates/subtemplates/buy_trend_minimal.j2
Normal file
@@ -0,0 +1 @@
|
||||
(qtpylib.crossed_above(dataframe['rsi'], 30)) & # Signal: RSI crosses above 30
|
@@ -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]
|
||||
"""
|
||||
|
17
freqtrade/templates/subtemplates/indicators_minimal.j2
Normal file
17
freqtrade/templates/subtemplates/indicators_minimal.j2
Normal 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]
|
||||
"""
|
1
freqtrade/templates/subtemplates/sell_trend_minimal.j2
Normal file
1
freqtrade/templates/subtemplates/sell_trend_minimal.j2
Normal file
@@ -0,0 +1 @@
|
||||
(qtpylib.crossed_above(dataframe['rsi'], 70)) & # Signal: RSI crosses above 70
|
Reference in New Issue
Block a user