Timeframe
15m
Direction
Long & Short
Stoploss
-2.5%
Trailing Stop
Yes
ROI
0m: 10.0%, 960m: 6.0%, 2880m: 3.0%, 5760m: 0.0%
Interface Version
3
Startup Candles
200
Indicators
4
freqtrade/freqtrade-strategies
Strategy 003 author@: Gerald Lonlas github@: https://github.com/freqtrade/freqtrade-strategies
"""
HuntV6_TrendATR - Trend Following + DMI Confirmation
Best performer: 2025 +83.8%, 2023 +25.1%, 2024 -2.1% (flat)
Max DD: ~10% in bear market, ~25% in bull market
"""
from pandas import DataFrame
import talib.abstract as ta
from freqtrade.strategy import IStrategy
class HuntV6_TrendATR(IStrategy):
INTERFACE_VERSION = 3
timeframe = '15m'
can_short = True
stoploss = -0.025
trailing_stop = True
trailing_stop_positive = 0.004
trailing_stop_positive_offset = 0.020
trailing_only_offset_is_reached = True
minimal_roi = {"0": 0.10, "960": 0.06, "2880": 0.03, "5760": 0}
startup_candle_count = 200
process_only_new_candles = True
use_exit_signal = False
def populate_indicators(self, d, m):
d['e20'] = ta.EMA(d, timeperiod=20)
d['e50'] = ta.EMA(d, timeperiod=50)
d['e200'] = ta.EMA(d, timeperiod=200)
macd = ta.MACD(d, fastperiod=12, slowperiod=26, signalperiod=9)
d['md'] = macd['macd']
d['ms'] = macd['macdsignal']
d['adx'] = ta.ADX(d, timeperiod=14)
d['di_plus'] = ta.PLUS_DI(d, timeperiod=14)
d['di_minus'] = ta.MINUS_DI(d, timeperiod=14)
d['vr'] = d['volume'] / ta.SMA(d['volume'], timeperiod=20)
return d
def populate_entry_trend(self, d, m):
# Long: uptrend established, DI aligned, strong momentum
d.loc[
(d['e20'] > d['e50']) & (d['close'] > d['e50']) &
(d['md'] > d['ms']) & (d['adx'] > 20) &
(d['di_plus'] > d['di_minus']) & (d['vr'] > 0.8) & (d['volume'] > 0),
['enter_long', 'enter_tag']
] = (1, 'L_trend')
# Short: downtrend established, DI aligned, strong momentum
d.loc[
(d['e20'] < d['e50']) & (d['close'] < d['e50']) &
(d['md'] < d['ms']) & (d['adx'] > 20) &
(d['di_minus'] > d['di_plus']) & (d['vr'] > 0.8) & (d['volume'] > 0),
['enter_short', 'enter_tag']
] = (1, 'S_trend')
return d
def populate_exit_trend(self, d, m): return d