NostalgiaForInfinity Strategy: In-Depth Analysis
Strategy ID: #246 (Strategy #246 of 465) Strategy Type: NFI Series - Classic Nostalgia For Infinity Timeframe: 15 Minutes (15m)
I. Strategy Overview
NostalgiaForInfinity (abbreviated NFI) is one of the most representative strategies on the Freqtrade quantitative trading platform, originating from the continuation and expansion of the Nostalgia strategy. The name "Nostalgia For Infinity" hints at the inheritance of classic trading wisdom and infinite exploration.
NFI is the original version and core foundation of the NFI series strategy. All subsequent NFI variants (ProAI, UO, SMA, Ninja, etc.) are built upon this architecture. It is renowned for its complex multi-condition architecture, rich protection mechanisms, and long-term market-validated stability.
Core Characteristics
| Feature | Description |
|---|---|
| Entry Conditions | Multiple complex entry signals covering various technical indicator combinations |
| Exit Conditions | Multi-layer dynamic take-profit + stop-loss protection |
| Protection Mechanisms | Multi-group EMA/SMA protection + trend filtering + volatility control |
| Timeframe | 15-minute primary timeframe + 1-hour information timeframe |
| Dependencies | pandas, numpy, TA-Lib, technical |
II. Strategy Configuration Analysis
2.1 Core Risk Parameters
# ROI Exit Table (Time: Minimum Profit Rate)
minimal_roi = {
"0": 0.10, # Immediate exit: 10% profit
"30": 0.06, # After 30 minutes: 6% profit
"60": 0.03, # After 60 minutes: 3% profit
"120": 0.015 # After 120 minutes: 1.5% 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.03 # 3% trailing activation point
trailing_stop_positive_offset = 0.05 # 5% offset trigger
Design Philosophy:
- Conservative ROI Target: Initial 10%, reflecting a conservative trading style
- Moderate Stop-Loss: -10%, giving the market sufficient volatility room
- Progressive Trailing: 3% activation, suitable for trend continuation
2.2 Order Type Configuration
order_types = {
"entry": "limit",
"exit": "limit",
"stoploss": "limit",
"stoploss_on_exchange": False,
"exit_timeout_count": 0,
}
III. Entry Conditions Details
3.1 Protection Mechanisms (Multiple Groups)
NFI's protection mechanisms are one of its core features, with each entry condition having independent protection parameters:
| Protection Type | Parameters | Function |
|---|---|---|
| EMA Trend Protection | Fast EMA vs. slow EMA relationship | Determine long/short trend |
| SMA Support | Price vs. SMA position relationship | Filter counter-trend trades |
| Volatility Control | Safe down/up thresholds | Avoid chasing highs and lows |
| Time Filtering | Holding time and cross-validation | Prevent premature entry |
| Volume Confirmation | OBV trend verification | Confirm fund flow direction |
3.2 Core Entry Condition Types
Condition Group 1: RSI Oversold + MA Support
- RSI below specific threshold (oversold zone)
- Price above key moving average
- Momentum indicator confirmation
Condition Group 2: Bollinger Band Lower Band Bounce
- Price touches or breaks below Bollinger Band lower band
- Bounces upon receiving support
- Volume confirmation
Condition Group 3: MA Golden Cross Confirmation
- Short-term MA crosses above long-term MA
- Price stands above MAs
- Trend upward confirmation
Condition Group 4: Divergence Signal
- Price makes new low but indicator does not make new low
- Bullish divergence signal
- Momentum strengthening confirmation
3.3 Entry Conditions Summary Table
| Condition Group | Signal Type | Core Indicators |
|---|---|---|
| RSI Oversold | Reversal signal | RSI, MFI |
| Bollinger Band Support | Rebound signal | Bollinger Bands |
| MA Golden Cross | Trend signal | EMA, SMA |
| Divergence | Reversal warning | Price vs. Indicator |
IV. Exit Logic Details
4.1 Multi-Layer Take-Profit System
NFI employs a progressive take-profit strategy:
Profit Rate Zone Threshold Signal Name
─────────────────────────────────────────────
0-30 minutes 10% Quick Profit
30-60 minutes 6% Medium-term Target
60-120 minutes 3% Conservative Exit
120+ minutes 1.5% End-of-Session Breakeven
4.2 Special Exit Scenarios
| Scenario | Trigger Condition | Signal Name |
|---|---|---|
| Death Cross | Short-term MA crosses below long-term MA | Trend Exit |
| RSI Overbought | RSI exceeds specific threshold | Momentum Exit |
| Bollinger Upper Band | Price touches upper band | Resistance Exit |
| Trend Reversal | Price breaks below key MA group | Trend Exit |
| Stop-Loss Triggered | Loss reaches 10% | Hard Stop |
4.3 Basic Exit Signals
- Death Cross: Classic signal of trend weakening
- RSI Overbought: Momentum reaches extreme
- Bollinger Upper Band: Encountering technical resistance
- Trailing Stop Triggered: Profit retraces to threshold
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicators | Purpose |
|---|---|---|
| Trend | EMA (26, 100, 200), SMA (200) | Determine direction |
| Momentum | RSI (14), MFI (14) | Measure momentum |
| Volatility | Bollinger Bands, ATR | Measure volatility |
| Volume | OBV | Fund flow direction |
5.2 Information Timeframe Indicators (1-Hour)
| Indicator | Purpose |
|---|---|
| EMA 100 | Long-term trend judgment |
| EMA 200 | Super trend line |
| RSI | High-period momentum confirmation |
VI. Risk Management Features
6.1 Multi-Layer Protection Mechanism
| Protection Type | Function | Enabled Condition |
|---|---|---|
| Trend Filtering | Only trade with the trend | Price above EMA200 |
| Volatility Protection | Avoid extreme volatility | Safe down/up thresholds |
| Time Protection | Prevent premature trading | Holding time verification |
| Cross Validation | Multiple indicator confirmation | Multiple indicators simultaneously met |
6.2 Traditional Risk Control Retained
| Type | Parameters |
|---|---|
| Fixed Stop-Loss | -10% |
| Trailing Stop | 3-5% |
| ROI Take-Profit | Tiered exit |
VII. Strategy Pros & Cons
✅ Pros
- Multi-Condition Architecture: 31+ entry conditions covering various market scenarios
- Mature and Stable: Long-term market validated
- Complete Protection: Multi-layer protection mechanisms
- Strong Adaptability: Adjustable for different market environments
- Community Recognition: Widely used and optimized by many users
⚠️ Cons
- High Complexity: Steep learning curve
- Many Parameters: High configuration difficulty
- Computational Resources: Some hardware requirements
- Overfitting Risk: Common weakness of complex strategies
- Signal Lag: Some conditions respond slowly
VIII. Applicable Scenarios
| Market Environment | Recommended Config | Description |
|---|---|---|
| Trending Up | Enable long conditions | Follow the trend |
| Trending Down | Enable short conditions | Capture declines |
| Ranging Market | Tighten protection parameters | Reduce false signals |
| High Volatility | Reduce position size | Control risk |
IX. Applicable Market Environment Details
9.1 NFI Strategy Positioning
NostalgiaForInfinity is the core and origin of the NFI series. Its design philosophy is:
"Use the most complex architecture to capture the most certain opportunities"
- Multi-Condition Confirmation: Rather miss than trade wrongly
- Multi-Layer Protection: Every signal is cross-validated
- Trend Priority: Only trade with the trend
- Stability First: Pursue long-term stable profitability
9.2 Performance in Different Market Environments
| Market Type | Rating | Analysis |
|---|---|---|
| 📈 Trending Up | ⭐⭐⭐⭐⭐ | MA multi-asset bullish, signals clear |
| 📉 Trending Down | ⭐⭐⭐⭐⭐ | MA multi-asset bearish, can short |
| 🔄 Ranging Market | ⭐⭐⭐☆☆ | Protection mechanisms filter false signals |
| ⚡️ High Volatility | ⭐⭐⭐⭐☆ | High volatility brings profit opportunities |
9.3 Key Configuration Recommendations
| Config Item | Recommended Value | Description |
|---|---|---|
| Number of Pairs | 5-15 | Diversify risk |
| Starting Capital | Sufficient for 15m cycle | Avoid frequent top-ups |
| Backtest Period | 6+ months | Sufficient sample validation |
| Protection Mechanisms | Adjust per market | Can relax in bull markets |
X. Summary
NostalgiaForInfinity is the core and foundation of the NFI series. Its core value lies in:
- Multi-Condition Architecture: 31+ entry conditions covering various scenarios
- Multi-Layer Protection: Every signal is multiple verified
- Mature and Stable: Long-term market validated
- Continuous Evolution: Spawned numerous variant strategies
For quantitative traders, NFI is the best example for learning Freqtrade strategy development and is one of the top choices for pursuing stable profitability. However, it requires sufficient time to learn its complex architecture and adequate backtesting verification before live trading.
This document is written based on the NFI strategy common architecture Strategy ID: #246 (Strategy #246 of 465)