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
| Feature | Description |
|---|---|
| Entry Conditions | 17 independent buy signals + 5 MA offset signals, independently enableable/disableable |
| Exit Conditions | 8 basic sell signals + 12-level dynamic take-profit logic + multiple scenario exit mechanisms |
| Protection Mechanisms | Dip Protection (3 sets) + Pump Protection (9 sets) + EWO Protection + MA Offset Protection |
| Timeframe | 5m primary + 1h informational |
| Dependencies | talib, qtpylib, numpy, pandas, functools.reduce |
| Startup Candles | 400 (~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)
| Type | Threshold Parameters | Purpose |
|---|---|---|
| Normal | threshold_1~4 | Standard pullback protection, prevents buying in downtrend |
| Strict | threshold_5~8 | Strict pullback protection, tighter thresholds, stricter filtering |
| Loose | threshold_9~12 | Loose pullback protection, allows larger pullbacks |
Pump Protection (Surge Protection)
| Time Window | Normal | Strict | Loose |
|---|---|---|---|
| 24 hours | threshold_1, pull_1 | threshold_4, pull_4 | threshold_7, pull_7 |
| 36 hours | threshold_2, pull_2 | threshold_5, pull_5 | threshold_8, pull_8 |
| 48 hours | threshold_3, pull_3 | threshold_6, pull_6 | threshold_9, pull_9 |
3.2 22 Entry Conditions Classification
| Condition Group | Condition Numbers | Core Logic |
|---|---|---|
| Trend Pullback | #1, #4, #14 | Trend confirmation + pullback entry |
| Bollinger Band Rebound | #2, #3, #5, #6 | BB lower band rebound |
| EMA Deviation | #5, #6, #7, #14, #15 | EMA deviation + oversold |
| Alligator Breakout | #8 | Alligator alignment + bullish candle |
| MA Offset | #9, #10, #11, #12, #15, #16 | MA offset + RSI/EWO |
| EWO Extreme | #12, #13, #16, #17 | EWO overbought/oversold |
| MA Offset Base | 5 | Close below MA offset value |
IV. Exit Conditions Details
4.1 12-Level Dynamic Take-Profit System
| Profit Range | RSI Threshold | Signal Name |
|---|---|---|
| > 20% | < 34 | signal_profit_11 |
| 12%~20% | < 42 | signal_profit_10 |
| 10%~12% | < 50 | signal_profit_9 |
| 9%~10% | < 54 | signal_profit_8 |
| 8%~9% | < 54 | signal_profit_7 |
| 7%~8% | < 49 | signal_profit_6 |
| 6%~7% | < 44 | signal_profit_5 |
| 5%~6% | < 43 | signal_profit_4 |
| 4%~5% | < 42 | signal_profit_3 |
| 3%~4% | < 38 | signal_profit_2 |
| 2%~3% | < 34 | signal_profit_1 |
| 1%~2% | < 33 | signal_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
- Extremely Rich Conditions: 22 entry conditions covering diverse market scenarios, strong adaptability
- Complete Protection: Dip/Pump/EWO triple protection, effectively avoids chasing and selling
- Refined Take-Profit System: 12-level dynamic take-profit + scenario-based exits, strong profit-locking ability
- Multi-Timeframe Verification: 5m + 1h dual timeframe, high signal quality
- Parameter Optimizable: Large number of DecimalParameter/IntParameter support hyperparameter optimization
⚠️ Cons
- Extremely High Complexity: 200+ parameters, high difficulty to understand and debug
- Overfitting Risk: Rich parameters easily fit historical data, may fail in live trading
- High Hardware Requirements: 400 startup candles + many indicator calculations, high memory consumption
- 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:
- Multi-Condition Redundancy: 22 entry conditions providing multiple entry opportunities, reducing single signal failure risk
- Triple Protection Network: Dip/Pump/EWO protection mechanism, effectively avoids chasing and selling
- Refined Take-Profit: 12-level dynamic take-profit + scenario-based exits, maximizing profit locking
- 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.