Skip to main content

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

FeatureDescription
Entry Conditions38 independent buy signals, each condition can be independently enabled/disabled
Exit Conditions8 base sell signals + multi-layer dynamic take-profit logic
Protection Mechanisms38 sets of buy protection parameters (EMA/SMA/safe dip/safe pump/BTC trend)
Timeframe5-minute primary timeframe + 1-hour informational timeframe
Dependenciespandas, 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 TypeParameter DescriptionOptions
Fast EMAWhether fast EMA is enabled and its length26/50/100/200
Slow EMAWhether slow EMA is enabled and its length26/50/100/200
Close Price ProtectionWhether close price is above EMA12/20/26/50/100/200
SMA200 RisingWhether SMA200 is in an uptrend20/30/36/44/50 period verification
SMA200 1h Rising1h period SMA200 trend confirmation20/30/36/44/50
Safe DipDip magnitude threshold protection10/50/80/100/130 etc.
Safe PumpPump magnitude threshold protection (anti-chase)10/20/30/50/70/100/120 etc.
Safe Pump PeriodDetection period24h/36h/48h
BTC TrendWhether BTC 1h is not in a downtrendTrue/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 GroupCondition NumbersCore Logic
Strict Protection Group1-4Multi-protection + trend confirmation
Trend Following Group5-9EMA trend + momentum confirmation
Relaxed Entry Group10-17Fewer protection conditions
1h Confirmation Group12-14High-period trend verification
Aggressive Entry Group18-24Fast signal response
BTC Correlation Group27-28BTC trend filtering
Special Conditions Group25-26, 29-38Specific 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

ScenarioTrigger ConditionSignal Name
BB Upper Band BreakoutContinuous upper band breakoutOverbought exit
RSI ExtremeRSI overbought thresholdMomentum exit
Below EMAPrice breaks below EMA200Trend exit
Trailing StopProfit drawdown triggersProtection 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 CategorySpecific IndicatorsPurpose
Trend IndicatorsEMA(12,15,20,25,26,35,50,100,200)Trend judgment, protection mechanisms
Momentum IndicatorsRSI(4,14,20), MFI, EWOOverbought/oversold, momentum strength
Volatility IndicatorsBollinger Bands(20,2)Price boundaries, breakout signals
Money FlowCMF, OBVCapital inflow/outflow
Special IndicatorsZema, VIDYA, HullSmoothed 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

  1. Rich Conditions: 38 entry conditions covering various market environments
  2. Complete Protection: 38 sets of protection parameters, refined risk management
  3. Multi-Period Verification: 5m execution + 1h trend confirmation
  4. Flexible Configuration: Each condition can be independently enabled/disabled
  5. BTC Correlation: Some conditions include BTC trend filtering

Limitations

  1. High Complexity: Many parameters, difficult optimization and debugging
  2. Computationally Intensive: Each cycle calculates many indicators, demanding on performance
  3. Depends on Historical Data: Requires sufficient 1h and 5m historical data
  4. Steep Learning Curve: Understanding all conditions requires significant time

VIII. Applicable Scenarios

Market EnvironmentRecommended ConfigurationDescription
Trending UpwardEnable all conditionsTrend filtering opens more entry opportunities
Ranging MarketEnable protection groups 1-8Strict protection filters false signals
High VolatilityEnable BTC filtering conditionsPrevent systemic risk
Low VolatilityRelax protection thresholdsIncrease 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 TypePerformance RatingAnalysis
Slow Bull/Ranging UpwardStarsStarsStarsStarsStarsEMA/SMA trend filtering opens more entry conditions, accumulates via pullback buying
Wide RangingStarsStarsStarsStarsNumerous take-profit conditions catch band profits, protection filters false breakouts
One-Sided SelloffStarsStarsStarsBTC trend filtering helps stop opening new positions early in selloffs
Extreme SidewaysStarsStarsMost entry conditions can't trigger, low capital utilization

X. Summary

NostalgiaForInfinityNext is a comprehensive evolution of the NFI series. Its core value lies in:

  1. Rich Conditions: 38 entry conditions covering various market environments
  2. Complete Protection: 38 sets of protection parameters, refined risk management
  3. Multi-Period Verification: 5m execution + 1h trend confirmation
  4. 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