Fix strategy samples to use runmode.value

closes #5073
This commit is contained in:
Matthias 2021-06-05 09:03:03 +02:00
parent 42b6d28b3c
commit a0893b291a
3 changed files with 3 additions and 3 deletions

View File

@ -329,7 +329,7 @@ class SampleStrategy(IStrategy):
"""
# first check if dataprovider is available
if self.dp:
if self.dp.runmode in ('live', 'dry_run'):
if self.dp.runmode.value 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

@ -199,7 +199,7 @@ dataframe['htleadsine'] = hilbert['leadsine']
"""
# first check if dataprovider is available
if self.dp:
if self.dp.runmode in ('live', 'dry_run'):
if self.dp.runmode.value 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

@ -10,7 +10,7 @@ dataframe['rsi'] = ta.RSI(dataframe)
"""
# first check if dataprovider is available
if self.dp:
if self.dp.runmode in ('live', 'dry_run'):
if self.dp.runmode.value 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]