Timeframe
1h
Direction
Long & Short
Stoploss
-3.0%
Trailing Stop
Yes
ROI
0m: 6.0%, 240m: 2.0%, 720m: 0.0%
Interface Version
3
Startup Candles
50
Indicators
2
freqtrade/freqtrade-strategies
Strategy 003 author@: Gerald Lonlas github@: https://github.com/freqtrade/freqtrade-strategies
"""
UltraSimpleShort — The simplest possible bear market strategy
Just three rules:
1. Check if we're below 200 EMA (bear market)
2. Short on red candles with high volume when RSI is above 55 (overbought bounce)
3. Exit: 4% profit target OR 2% stoploss
That's it. No multi-indicator complexity.
"""
import talib.abstract as ta
import pandas as pd
from pandas import DataFrame
from freqtrade.strategy import IStrategy
class UltraSimpleShort(IStrategy):
INTERFACE_VERSION = 3
timeframe = '1h'
startup_candle_count = 50
can_short = True
process_only_new_candles = True
stoploss = -0.03
trailing_stop = True
trailing_stop_positive = 0.01
trailing_stop_positive_offset = 0.04
trailing_only_offset_is_reached = True
use_custom_stoploss = False
minimal_roi = {
"0": 0.06,
"240": 0.02,
"720": 0,
}
protections = [
{"method": "CooldownPeriod", "stop_duration": 8},
{"method": "StoplossGuard", "lookback_period": 24, "trade_limit": 1, "stop_duration": 12, "only_per_pair": False},
]
def informative_pairs(self):
return []
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['ema_200'] = ta.EMA(dataframe, timeperiod=200)
dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
dataframe['volume_sma'] = dataframe['volume'].rolling(20).mean()
return dataframe
def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
bear = dataframe['close'] < dataframe['ema_200']
short_entry = (
bear &
(dataframe['rsi'] > 55) &
(dataframe['rsi'] < 70) & # Not extremely overbought
(dataframe['close'] < dataframe['open']) &
(dataframe['volume'] > dataframe['volume_sma'] * 1.5) # 50% above avg volume
)
dataframe.loc[short_entry, 'enter_short'] = 1
return dataframe
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
return dataframe