Skip to main content

NFI46OffsetHOA1 Strategy Analysis

Strategy ID: #265 (265th of 465 strategies)
Strategy Type: Multi-condition Trend Following + Multi-layer Protection + Dynamic Take-Profit System
Timeframe: 5 Minutes (5m) + 1 Hour (1h) Informational Layer


I. Strategy Overview

NFI46OffsetHOA1 is the fourth-generation variant of the NostalgiaForInfinity (NFI) series strategy, focused on trend following and mean reversion trading in cryptocurrency markets. Developed by the iterativ team, it is one of the most complex and parameter-rich strategies in the Freqtrade community.

Core Features

FeatureDescription
Entry Conditions17 independent buy signals + 5 MA offset signals, independently enableable/disableable
Exit Conditions8 basic sell signals + 12-level dynamic take-profit logic + multiple scenario exit mechanisms
Protection MechanismsDip Protection (3 sets) + Pump Protection (9 sets) + EWO Protection + MA Offset Protection
Timeframe5m primary + 1h informational
Dependenciestalib, qtpylib, numpy, pandas, functools.reduce
Startup Candles400 (~33 hours of 5-minute data)

II. Strategy Configuration Analysis

2.1 Basic Risk Parameters

# ROI Exit Table
minimal_roi = {
"0": 0.013, # 1.3% profit target
}

# Stop Loss
stoploss = -0.10 # 10% fixed stop loss

2.2 Trailing Stop Configuration

trailing_stop = True
trailing_only_offset_is_reached = True
trailing_stop_positive = 0.01 # 1% trailing stop trigger
trailing_stop_positive_offset = 0.03 # Activates after 3% profit

III. Entry Conditions Details

3.1 Protection Mechanisms (Multi-Layer System)

Each entry condition is equipped with independent protection parameter groups:

Dip Protection (Pullback Protection)

TypeThreshold ParametersPurpose
Normalthreshold_1~4Standard pullback protection, prevents buying in downtrend
Strictthreshold_5~8Strict pullback protection, tighter thresholds, stricter filtering
Loosethreshold_9~12Loose pullback protection, allows larger pullbacks

Pump Protection (Surge Protection)

Time WindowNormalStrictLoose
24 hoursthreshold_1, pull_1threshold_4, pull_4threshold_7, pull_7
36 hoursthreshold_2, pull_2threshold_5, pull_5threshold_8, pull_8
48 hoursthreshold_3, pull_3threshold_6, pull_6threshold_9, pull_9

3.2 22 Entry Conditions Classification

Condition GroupCondition NumbersCore Logic
Trend Pullback#1, #4, #14Trend confirmation + pullback entry
Bollinger Band Rebound#2, #3, #5, #6BB lower band rebound
EMA Deviation#5, #6, #7, #14, #15EMA deviation + oversold
Alligator Breakout#8Alligator alignment + bullish candle
MA Offset#9, #10, #11, #12, #15, #16MA offset + RSI/EWO
EWO Extreme#12, #13, #16, #17EWO overbought/oversold
MA Offset Base5Close below MA offset value

IV. Exit Conditions Details

4.1 12-Level Dynamic Take-Profit System

Profit RangeRSI ThresholdSignal Name
> 20%< 34signal_profit_11
12%~20%< 42signal_profit_10
10%~12%< 50signal_profit_9
9%~10%< 54signal_profit_8
8%~9%< 54signal_profit_7
7%~8%< 49signal_profit_6
6%~7%< 44signal_profit_5
5%~6%< 43signal_profit_4
4%~5%< 42signal_profit_3
3%~4%< 38signal_profit_2
2%~3%< 34signal_profit_1
1%~2%< 33signal_profit_0

Design Philosophy: High profit ranges allow higher RSI values (avoid premature take-profit), low profit ranges require lower RSI values (quickly lock in small profits).

4.2 Basic Sell Signals (8)

# Sell Signal 1: RSI + BB continuous upper breakout
rsi > sell_rsi_bb_1 AND close > bb_upperband (5 consecutive)

# Sell Signal 3: Pure RSI overbought
rsi > sell_rsi_main_3

# Sell Signal 4: Dual RSI overbought
rsi > sell_dual_rsi_rsi_4 AND rsi_1h > sell_dual_rsi_rsi_1h_4

# Sell Signal 7: 1h RSI + EMA death cross
rsi_1h > sell_rsi_1h_7 AND ema_12 crosses below ema_26

V. Risk Management Highlights

5.1 Multi-Level Dip Protection

safe_dips_normal:
- Current candle decline < threshold_1 (1.5%)
- 2 candles max decline < threshold_2 (12.4%)
- 12 candles max decline < threshold_3 (27.8%)
- 144 candles max decline < threshold_4 (49.6%)

5.2 Pump Protection System

safe_pump(length, threshold, pull_threshold):
# Calculate max range increase
range_change = (open.rolling(length).max() - close.rolling(length).min()) / close.rolling(length).min()

# Calculate pullback distance
range_height = close - close.rolling(length).min()

# Safe condition: increase not too large OR already sufficient pullback
return (range_change < threshold) OR (range_gap / pull_threshold > range_height)

VI. Strategy Pros & Cons

✅ Pros

  1. Extremely Rich Conditions: 22 entry conditions covering diverse market scenarios, strong adaptability
  2. Complete Protection: Dip/Pump/EWO triple protection, effectively avoids chasing and selling
  3. Refined Take-Profit System: 12-level dynamic take-profit + scenario-based exits, strong profit-locking ability
  4. Multi-Timeframe Verification: 5m + 1h dual timeframe, high signal quality
  5. Parameter Optimizable: Large number of DecimalParameter/IntParameter support hyperparameter optimization

⚠️ Cons

  1. Extremely High Complexity: 200+ parameters, high difficulty to understand and debug
  2. Overfitting Risk: Rich parameters easily fit historical data, may fail in live trading
  3. High Hardware Requirements: 400 startup candles + many indicator calculations, high memory consumption
  4. Signal Conflicts: Multiple conditions may produce conflicting signals, requiring careful tuning

VII. Summary

NFI46OffsetHOA1 is a meticulously designed but extremely complex trend-following strategy. Its core value lies in:

  1. Multi-Condition Redundancy: 22 entry conditions providing multiple entry opportunities, reducing single signal failure risk
  2. Triple Protection Network: Dip/Pump/EWO protection mechanism, effectively avoids chasing and selling
  3. Refined Take-Profit: 12-level dynamic take-profit + scenario-based exits, maximizing profit locking
  4. Community Validated: As the fourth-generation variant of the NFI series, extensively live-trading validated

For quantitative traders, this is an excellent case study for learning complex strategy design. However, do not blindly use default parameters — sufficient backtesting and optimization based on your trading style and market environment are essential.