From 95b63ea496da622fc055b7d55e358b47bfe56e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Rodr=C3=ADguez?= Date: Tue, 22 Feb 2022 19:33:52 +0100 Subject: [PATCH] Add short signal to base strategy template --- freqtrade/templates/base_strategy.py.j2 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/freqtrade/templates/base_strategy.py.j2 b/freqtrade/templates/base_strategy.py.j2 index 64283c7e7..b98b75118 100644 --- a/freqtrade/templates/base_strategy.py.j2 +++ b/freqtrade/templates/base_strategy.py.j2 @@ -129,6 +129,13 @@ class {{ strategy }}(IStrategy): (dataframe['volume'] > 0) # Make sure Volume is not 0 ), 'enter_long'] = 1 + # Uncomment to use shorts (remember to set margin in trading mode in configuration) + '''dataframe.loc[ + ( + {{ sell_trend | indent(16) }} + (dataframe['volume'] > 0) # Make sure Volume is not 0 + ), + 'enter_short'] = 1''' return dataframe @@ -145,5 +152,12 @@ class {{ strategy }}(IStrategy): (dataframe['volume'] > 0) # Make sure Volume is not 0 ), 'exit_long'] = 1 + # Uncomment to use shorts (remember to set margin in trading mode in configuration) + '''dataframe.loc[ + ( + {{ buy_trend | indent(16) }} + (dataframe['volume'] > 0) # Make sure Volume is not 0 + ), + 'exit_short'] = 1''' return dataframe {{ additional_methods | indent(4) }}