Update docs, add test

This commit is contained in:
froggleston
2022-05-24 20:27:15 +01:00
parent 8c03ebb78f
commit 3adda84b96
5 changed files with 117 additions and 21 deletions

View File

@@ -143,12 +143,13 @@ class StrategyTestV3(IStrategy):
(dataframe['adx'] > 65) &
(dataframe['plus_di'] > self.buy_plusdi.value)
),
'enter_long'] = 1
['enter_long', 'enter_tag']] = 1, 'enter_tag_long'
dataframe.loc[
(
qtpylib.crossed_below(dataframe['rsi'], self.sell_rsi.value)
),
'enter_short'] = 1
['enter_short', 'enter_tag']] = 1, 'enter_tag_short'
return dataframe
@@ -166,13 +167,13 @@ class StrategyTestV3(IStrategy):
(dataframe['adx'] > 70) &
(dataframe['minus_di'] > self.sell_minusdi.value)
),
'exit_long'] = 1
['exit_long', 'exit_tag']] = 1, 'exit_tag_long'
dataframe.loc[
(
qtpylib.crossed_above(dataframe['rsi'], self.buy_rsi.value)
),
'exit_short'] = 1
['exit_long', 'exit_tag']] = 1, 'exit_tag_short'
return dataframe