NostalgiaForInfinityV4 Strategy Analysis
Chapter 1: Strategy Overview
NostalgiaForInfinityV4 (NFI4) is a mature and robust cryptocurrency quantitative trading strategy developed by iterativ for the Freqtrade platform. As the fourth generation of this strategy series, NFI4 builds on its predecessors with comprehensive technical indicator upgrades and risk control optimizations.
The strategy uses a dual-timeframe analysis architecture with 5-minute candles as the primary timeframe and 1-hour candles as the auxiliary timeframe. Its core design philosophy is "trend-following + reversal capture" — confirming the large-cycle upward trend while capturing short-cycle price pullback opportunities, and taking profits when price has risen excessively.
NFI4's distinguishing feature is its highly modular condition design. The strategy provides 17 independently configurable buy conditions and 8 independently configurable sell conditions, allowing traders to flexibly adjust based on market environment and personal risk tolerance.
Chapter 2: Timeframe and Data Architecture
2.1 Dual-Period Coordination Mechanism
- Primary timeframe: 5-minute — evaluates and decides on the market every 5 minutes
- Auxiliary timeframe: 1-hour — provides macro trend background and additional filter conditions
2.2 Indicator Calculation Layers
1-Hour Timeframe Indicators:
- EMA: 15, 50, 100, 200 periods
- SMA: 200-period
- RSI: 14-period
- Bollinger Bands: 20-period, 2x standard deviation
5-Minute Primary Timeframe Indicators:
- EMA: 12, 20, 26, 50, 100, 200 periods
- SMA: 5, 30, 200 periods
- RSI: 14-period
- MFI: Money Flow Index
- Bollinger Bands: 20-period and 40-period two sets
- Alligator: Lips(5), Teeth(8), Jaw(13)
- EWO: Elliott Wave Oscillator, calculated from EMA50 and EMA200
2.3 Warmup Requirements
startup_candle_count = 400
Strategy requires at least 400 candles (~33 hours of 5-minute data) before generating valid signals.
Chapter 3: Technical Indicator System
3.1 Moving Average System
EMA characteristics: Gives higher weight to recent prices, more sensitive to price changes. Used for EMA12/26 (MACD-like signals) and EMA50/EMA200 (medium/long-term trend).
SMA characteristics: Treats all prices equally, smoother. Primarily uses SMA30 and SMA200, with slope monitoring for trend direction.
3.2 RSI (Relative Strength Index)
RSI (0-100) is used in two directions:
- Oversold buy signals: When RSI falls below specific thresholds (e.g., 30-46 range), it may indicate overselling
- Overbought sell signals: When RSI exceeds specific thresholds (e.g., 72-90 range), it may indicate overbuying
3.3 MFI (Money Flow Index)
MFI is a momentum indicator incorporating volume, also known as volume-weighted RSI. Multiple buy conditions require MFI below specific thresholds (e.g., 26-56 range), ensuring not only price oversold but also capital inflow/outflow status.
3.4 Bollinger Bands
20-period BB: Standard configuration for routine price channel judgment. 40-period BB: Longer-period for more stable channel analysis, used in buy condition 3 with BB width, close delta, and lower shadow length.
3.5 Alligator Indicator
Three smoothed MAs: Lips (5-period), Teeth (8-period), Jaw (13-period). Used to identify trend formation:
- Lips > Teeth > Jaw = Alligator "opening mouth" = uptrend
- Three lines tangled = Alligator "resting" = ranging market
- Lips < Teeth < Jaw = Alligator "opening downward" = downtrend
3.6 Elliott Wave Oscillator (EWO)
EWO = (EMA50 - EMA200) / Close × 100
Positive EWO indicates short-term momentum stronger than long-term; negative EWO indicates short-term momentum weaker.
Chapter 4: Protection Mechanism Analysis
4.1 Dip Protection (safe_dips)
Prevents blindly bottom-fishing during sharp drops. Two sets:
Regular protection:
- Single candle drop < 2%
- 2-candle max drop < 14%
- 12-candle max drop < 30%
- 144-candle max drop < 50%
Strict protection (safe_dips_strict):
- Single candle drop < 1.5%
- 2-candle max drop < 6%
- 12-candle max drop < 24%
- 144-candle max drop < 40%
4.2 Pump Protection (safe_pump)
Identifies and avoids risks after abnormal price surges. Three time windows:
Regular protection:
- 24h window: max gain < 46% OR sufficient pullback
- 36h window: max gain < 56% OR sufficient pullback
- 48h window: max gain < 85% OR sufficient pullback
Strict protection: More conservative thresholds.
Chapter 5: Buy Condition Deep Dive
5.1 Condition Design Pattern
Each buy condition follows modular design with:
- Trend confirmation conditions
- Protection mechanism checks
- Technical signal triggers
- Volume verification
5.2 Representative Conditions
Condition 1: Basic Trend Buy:
- 1h EMA50 > EMA200 (confirms uptrend)
- SMA200 slope upward
- safe_dips + safe_pump_48 satisfied
- 36-candle lowest gain > 2.2%
- 1h RSI: 30-80
- RSI < 36
- MFI < 26
Condition 3: Bollinger Rebound Buy:
- Price > 1h EMA200 × 98.8%
- EMA100 > EMA200
- 1h EMA50 > EMA100 > EMA200
- BB width > close × 5.7%
- Close change > close × 2.3%
- Lower shadow < BB width × 41.8%
- Close < prior candle lower band
Condition 8: Alligator Trend Buy:
- Price > 1h EMA200 × 98.8%
- 1h EMA50 > EMA100
- 1h SMA200 trending up
- Alligator lips > teeth > jaw (uptrend alignment)
- All three lines moving upward
- Close > open (green candle)
- RSI < 46
Condition 17: EWO Extreme Oversold Buy:
- safe_dips_strict satisfied
- Close < EMA20 × 95.8%
- EWO < -12 (extreme negative, deeply oversold)
Chapter 6: Sell Condition Deep Dive
6.1 Sell Conditions Overview
8 independent sell conditions covering different profit-taking scenarios:
| # | Trigger | RSI | Other Conditions |
|---|---|---|---|
| 1 | BB upper band 6 consecutive breaks | > 79.5 | - |
| 2 | BB upper band 3 consecutive breaks | > 81 | - |
| 3 | Pure RSI overbought | > 82 | - |
| 4 | Dual-timeframe RSI overbought | 5m > 73.4, 1h > 79.6 | - |
| 5 | Below-EMA rebound | > 1h RSI + 4.4 | Close < EMA200, distance < 2.4% |
| 6 | Below-EMA extreme RSI | > 79 | Close < EMA200, > EMA50 |
| 7 | 1h RSI high + EMA death cross | 1h > 81.7 | EMA12 crosses below EMA26 |
| 8 | 1h BB upper band break | - | Close > 1h BB upper × 1.1 |
6.2 Custom Sell Function
Tiered profit-taking:
profit > 25% and RSI < 50 → sell
profit > 8% and RSI < 48 → sell
profit > 5% and RSI < 43 → sell
profit > 3% and RSI < 36 → sell
profit > 1% and RSI < 30 → sell
Trend reversal profit-taking:
profit > 2% and close < EMA200 → sell
profit > 3.5% and SMA200 falling → sell
profit > 7% and close < EMA100 → sell
Dynamic trailing profit-taking:
profit 15%-46% and max_profit - profit > 18% → sell
profit 1%-12% and max_profit - profit > 14% → sell
Chapter 7: Risk Control System
7.1 Stoploss Settings
stoploss = -0.10 # -10% fixed stoploss
This is relatively loose, allowing sufficient price fluctuation room.
7.2 Trailing Stoploss
trailing_stop = True
trailing_stop_positive = 0.01
trailing_stop_positive_offset = 0.03
Activates after 3% profit with 1% trailing distance.
7.3 ROI Settings
minimal_roi = {
"0": 0.10, # Immediately: 10%
"30": 0.05, # After 30 min: 5%
"60": 0.02 # After 60 min: 2%
}
Chapter 8: Strategy Pros and Limitations
Pros
- 17 buy + 8 sell conditions, highly modular and toggleable
- Multi-layer protection (dip + pump) reduces extreme market risks
- Dual-timeframe (1h + 5m) coordination
- Tiered profit-taking with fine-grained profit management
- All key parameters optimizable via hyperopt
Limitations
- 100+ parameters: high learning curve and optimization difficulty
- -10% stoploss: single-trade losses can be large
- Fixed timeframe: only supports 5m + 1h
- 400-candle warmup: limits new coin trading
- High optimization difficulty: risk of overfitting
Chapter 9: Recommended Configuration
Must-set parameters:
"timeframe": "5m",
"use_sell_signal": true,
"sell_profit_only": false,
"ignore_roi_if_buy_signal": true
Recommended:
- Concurrent trades: 4-6
- Pairs: 40-80 stablecoin pairs
- Exclude: leveraged tokens (*BULL, *BEAR, *UP, *DOWN)
This document provides technical analysis of NostalgiaForInfinityV4. For the plain-English version, please refer to the Strategy Explained version.