NostalgiaForInfinityNext Strategy Analysis
Strategy ID: #285 (285th of 465 strategies)
Strategy Type: NFI Series - Multi-Condition Trend Following + Protection Mechanisms
Timeframe: 5 Minutes (5m) + 1 Hour (1h)
I. Strategy Overview
NostalgiaForInfinityNext (abbreviated NFI Next) is the next-generation evolution of NostalgiaForInfinity (NFI). As an important member of the NFI family, the Next version comprehensively expands and optimizes the original's core multi-condition architecture while inheriting its foundational principles.
The "Next" naming signifies "next generation," reflecting the strategy author's continuous evolution of the original strategy and adaptive improvements to market changes. Compared to standard NFI, the Next version has more entry conditions (38), more complete protection mechanisms (38 sets), making it a more mature and comprehensive quantitative trading system.
Core Features
| Feature | Description |
|---|---|
| Entry Conditions | 38 independent buy signals, each condition can be independently enabled/disabled |
| Exit Conditions | 8 base sell signals + multi-layer dynamic take-profit logic |
| Protection Mechanisms | 38 sets of buy protection parameters (EMA/SMA/safe dip/safe pump/BTC trend) |
| Timeframe | 5-minute primary timeframe + 1-hour informational timeframe |
| Dependencies | pandas, numpy, TA-Lib, technical, qtpylib, pandas_ta |
II. Strategy Configuration Analysis
2.1 Basic Risk Parameters
# ROI Exit Table (time: minimum profit rate)
minimal_roi = {
"0": 0.10, # Immediate exit: 10% profit
"30": 0.05, # After 30 minutes: 5% profit
"60": 0.02, # After 60 minutes: 2% profit
}
# Stop-Loss Settings
stoploss = -0.10 # -10% hard stop-loss
# Trailing Stop
trailing_stop = True
trailing_only_offset_is_reached = True
trailing_stop_positive = 0.01 # 1% trailing activation point
trailing_stop_positive_offset = 0.03 # 3% offset trigger
Design Philosophy:
- Uses a time-decaying ROI strategy: the longer the holding period, the lower the exit threshold
- Initial ROI at 10%, pursuing relatively high profit targets
- Pairs with trailing stop to lock in profits, suitable for trending markets
- Hard stop-loss at -10% controls maximum loss per trade
2.2 Order Type Configuration
order_types = {
"entry": "limit", # Limit order entry
"exit": "limit", # Limit order exit
"stoploss": "limit", # Limit stop-loss order
"stoploss_on_exchange": False,
}
III. Entry Conditions Details
3.1 Protection Mechanisms (38 Sets)
Each entry condition has an independent protection parameter set:
| Protection Type | Parameter Description | Options |
|---|---|---|
| Fast EMA | Whether fast EMA is enabled and its length | 26/50/100/200 |
| Slow EMA | Whether slow EMA is enabled and its length | 26/50/100/200 |
| Close Price Protection | Whether close price is above EMA | 12/20/26/50/100/200 |
| SMA200 Rising | Whether SMA200 is in an uptrend | 20/30/36/44/50 period verification |
| SMA200 1h Rising | 1h period SMA200 trend confirmation | 20/30/36/44/50 |
| Safe Dip | Dip magnitude threshold protection | 10/50/80/100/130 etc. |
| Safe Pump | Pump magnitude threshold protection (anti-chase) | 10/20/30/50/70/100/120 etc. |
| Safe Pump Period | Detection period | 24h/36h/48h |
| BTC Trend | Whether BTC 1h is not in a downtrend | True/False |
3.2 Typical Entry Condition Examples
Condition #1: EMA Trend Confirmation + Protection
# Default protection configuration
- Slow EMA enabled: EMA100
- SMA200 rising verification: 28 periods
- Safe dip: level 80
- Safe pump: level 70, 24h period
Condition #3: Dual EMA Confirmation
# Protection configuration
- Fast EMA enabled: EMA100
- Slow EMA enabled: EMA100
- Safe dip: level 80
- Safe pump: level 100, 36h period
Condition #7: EMA Golden Cross Detection
# Protection configuration
- Fast EMA enabled: EMA100
- Slow EMA enabled: EMA12
- No dip/pump protection (more aggressive entry)
3.3 38 Entry Conditions Classification
| Condition Group | Condition Numbers | Core Logic |
|---|---|---|
| Strict Protection Group | 1-4 | Multi-protection + trend confirmation |
| Trend Following Group | 5-9 | EMA trend + momentum confirmation |
| Relaxed Entry Group | 10-17 | Fewer protection conditions |
| 1h Confirmation Group | 12-14 | High-period trend verification |
| Aggressive Entry Group | 18-24 | Fast signal response |
| BTC Correlation Group | 27-28 | BTC trend filtering |
| Special Conditions Group | 25-26, 29-38 | Specific market environment signals |
IV. Exit Logic Details
4.1 Multi-Layer Take-Profit System
The strategy uses a tiered take-profit mechanism:
Profit Range Threshold Exit Strategy
───────────────────────────────────────────────────────
> 10% Immediate ROI initial exit
5%-10% 30 minutes ROI secondary exit
2%-5% 60 minutes ROI tertiary exit
< 2% Hold Wait for signal or stop-loss
4.2 Special Exit Scenarios
| Scenario | Trigger Condition | Signal Name |
|---|---|---|
| BB Upper Band Breakout | Continuous upper band breakout | Overbought exit |
| RSI Extreme | RSI overbought threshold | Momentum exit |
| Below EMA | Price breaks below EMA200 | Trend exit |
| Trailing Stop | Profit drawdown triggers | Protection exit |
4.3 Base Sell Signals (8 Total)
# Sell Signal 1: Continuous BB upper band breakout
- RSI > 79.5
- Close price > BB20 upper band (5 consecutive candles)
# Sell Signal 2: Short-term overbought
- RSI > 81
- Close price > BB20 upper band (2 consecutive candles)
# Sell Signals 3-8: Other technical signals
- Dual RSI overbought
- EMA death cross
- High-period trend reversal
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicators | Purpose |
|---|---|---|
| Trend Indicators | EMA(12,15,20,25,26,35,50,100,200) | Trend judgment, protection mechanisms |
| Momentum Indicators | RSI(4,14,20), MFI, EWO | Overbought/oversold, momentum strength |
| Volatility Indicators | Bollinger Bands(20,2) | Price boundaries, breakout signals |
| Money Flow | CMF, OBV | Capital inflow/outflow |
| Special Indicators | Zema, VIDYA, Hull | Smoothed trends, lag reduction |
5.2 Informational Timeframe Indicators (1h)
The strategy uses 1-hour timeframe as an information layer:
- EMA/SMA trend confirmation
- RSI overbought/oversold (1h level)
- SMA200 rising trend verification
- BTC trend correlation analysis
VI. Risk Management Features
6.1 Multi-Level Dip Protection (Safe Dips)
Dip threshold protection from levels 10 to 130, adapting to different market environments:
Level Protection Strength Applicable Scenario
─────────────────────────────────────────────────────
10 Relaxed Strong trending market
50 Medium General market
80 Relatively Strict Volatile market
100 Strict High-risk environment
130 Extremely Strict Extreme market
6.2 Multi-Level Pump Protection (Safe Pump)
Multi-layer protection mechanism preventing chasing:
- Detection periods: 24h / 36h / 48h
- Level range: 10 - 130
- Used in conjunction with dip protection
6.3 BTC Trend Filtering
Some entry conditions require BTC 1h not in a downtrend:
- Prevents buying altcoins when BTC is crashing
- Reduces systemic risk
- Conditions 27-28 have this protection enabled by default
VII. Strategy Pros & Cons
Advantages
- Rich Conditions: 38 entry conditions covering various market environments
- Complete Protection: 38 sets of protection parameters, refined risk management
- Multi-Period Verification: 5m execution + 1h trend confirmation
- Flexible Configuration: Each condition can be independently enabled/disabled
- BTC Correlation: Some conditions include BTC trend filtering
Limitations
- High Complexity: Many parameters, difficult optimization and debugging
- Computationally Intensive: Each cycle calculates many indicators, demanding on performance
- Depends on Historical Data: Requires sufficient 1h and 5m historical data
- Steep Learning Curve: Understanding all conditions requires significant time
VIII. Applicable Scenarios
| Market Environment | Recommended Configuration | Description |
|---|---|---|
| Trending Upward | Enable all conditions | Trend filtering opens more entry opportunities |
| Ranging Market | Enable protection groups 1-8 | Strict protection filters false signals |
| High Volatility | Enable BTC filtering conditions | Prevent systemic risk |
| Low Volatility | Relax protection thresholds | Increase trading opportunities |
IX. Applicable Market Environment Details
NostalgiaForInfinityNext is a comprehensive evolution of the NFI series. Based on its code architecture and community long-term live-trading experience, it is best suited for ranging markets with clear trends and has limited performance during one-sided selloffs or extreme sideways consolidation.
9.1 Strategy Core Logic
- Multi-Dimensional Entry Conditions: 38 different entry conditions, strategy automatically triggers corresponding entry logic based on current market environment
- Strict Risk Filtering: Real-time detection of "24h/36h/48h rises" prevents chasing; via "BTC 1h trend detection" reduces systemic risk
- Dynamic Position Management: Supports "Hold Support" feature, allowing "won't exit until profitable" rules for specific losing trades
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Analysis |
|---|---|---|
| Slow Bull/Ranging Upward | StarsStarsStarsStarsStars | EMA/SMA trend filtering opens more entry conditions, accumulates via pullback buying |
| Wide Ranging | StarsStarsStarsStars | Numerous take-profit conditions catch band profits, protection filters false breakouts |
| One-Sided Selloff | StarsStarsStars | BTC trend filtering helps stop opening new positions early in selloffs |
| Extreme Sideways | StarsStars | Most entry conditions can't trigger, low capital utilization |
X. Summary
NostalgiaForInfinityNext is a comprehensive evolution of the NFI series. Its core value lies in:
- Rich Conditions: 38 entry conditions covering various market environments
- Complete Protection: 38 sets of protection parameters, refined risk management
- Multi-Period Verification: 5m execution + 1h trend confirmation
- Continuous Evolution: Inherits NFI mature architecture with continuous optimization
Recommendations:
- Backtest-verify with fewer conditions first
- Adjust protection parameters based on target trading pair characteristics
- Follow 1h timeframe trend confirmation signals
- Regularly evaluate each entry condition's contribution