Skip to main content

NostalgiaForInfinityV7_SMA — Strategy Analysis

Strategy ID: #306 (out of 465 strategies)
Strategy Type: Multi-Condition Trend Following + SMA Protection + Dynamic Profit-Taking
Timeframe: 5 minutes (5m) + 1 hour (1h) Informative Layer


I. Strategy Overview

NostalgiaForInfinityV7_SMA is an important variant of the NostalgiaForInfinity series. This strategy strengthens the SMA (Simple Moving Average) related trend judgment and protection mechanisms on top of the V7 version. Developed by the iterativ team, it is one of the most popular strategy series in the Freqtrade quantitative trading framework.

The "SMA" in the name emphasizes its special reliance on Simple Moving Averages — unlike other variants that favor EMA, this strategy extensively uses SMA200 as the core trend reference, combined with EMA fast/slow lines to build multi-layered entry filters.

Core Features

FeatureDescription
Buy Conditions26 independent signals (#1–#26, #25 missing)
Sell Conditions8 base sell signals + multi-layer dynamic profit-taking
Protection7–10 groups per condition (EMA, SMA, Safe Dips, Safe Pump)
TimeframeMain: 5m, Informative: 1h
Dependenciesfreqtrade.vendor.qtpylib, numpy, talib, pandas, functools.reduce, technical.indicators.zema
Startup Candles400

II. Strategy Configuration

2.1 Basic Risk Parameters

minimal_roi = {
"0": 0.10, # Immediate: 10% profit
"30": 0.05, # After 30 min: 5% profit
"60": 0.02, # After 60 min: 2% profit
}

stoploss = -0.10 # 10% fixed stop loss

trailing_stop = True
trailing_only_offset_is_reached = True
trailing_stop_positive = 0.005 # 0.5% trailing
trailing_stop_positive_offset = 0.03 # Activates after 3% profit

2.2 Key Switches

use_sell_signal = True
sell_profit_only = True
ignore_roi_if_buy_signal = True
process_only_new_candles = True

III. Buy Conditions Details

3.1 Protection Architecture (26 Groups)

Each buy condition has an independent protection parameter group:

Protection TypeParameterDescriptionDefault
EMA Fastema_fastEMA fast > EMA200True/False
EMA Fast Periodema_fast_lenPeriod selection26/50/100/200
EMA Slowema_slow1h EMA > EMA200True/False
Close Above EMA Fastclose_above_ema_fastClose > fast EMATrue/False
SMA200 Risingsma200_risingSMA200 risingTrue/False
SMA200 Rising Periodsma200_rising_valLookback20/30/36/44/50
SMA200_1h Risingsma200_1h_rising1h SMA200 risingTrue/False
Safe Dipssafe_dipsEnable pullback protectionTrue/False
Safe Dips Levelsafe_dips_typeStrictness10/50/80/100
Safe Pumpsafe_pumpEnable surge protectionTrue/False
Safe Pump Levelsafe_pump_typeStrictness10/50/100/120
Safe Pump Periodsafe_pump_periodTime window24/36/48 hours

3.2 Key Buy Conditions

Condition #1 (Trend Following + Oversold):

# Core Logic
- 36-period min rise > 2.2%
- 1h RSI in 3084 range
- 5m RSI < 36
- MFI < 36

# Protection
- SMA200 rising (28 periods)
- Safe Dips Level 80
- Safe Pump Level 70 (24h)

Condition #3 (BB40 Bandwidth Breakout):

# Core Logic
- BB40 width > close × 5.9%
- Close change > close × 2.3%
- Lower wick < BB width × 41.8%
- Close < previous BB40 lower band
- Close ≤ previous close

# Protection
- EMA100 > EMA200
- EMA100_1h > EMA200_1h
- Safe Pump Level 100, 36h

Condition #8 (Volume Price Reversal):

# Core Logic
- RSI < 29
- Volume > previous × 2 (expansion)
- Close > Open (bullish candle)
- (Close - Low) > (Close - Open) × 3.5

# Protection
- Close > EMA200
- Safe Pump Level 120 (24h)

Condition #24 (CMF Shift + EMA Golden Cross):

# Core Logic
- 12 periods ago: EMA12_1h < EMA35_1h → now: EMA12_1h > EMA35_1h
- 12 periods ago: CMF_1h < 0 → now: CMF_1h > 0
- RSI < 60, RSI_1h > 66.9

# Protection
- SMA200 rising (30 periods)
- SMA200_1h rising (36 periods)
- Safe Dips Level 10

3.3 26 Conditions Classification

CategoryCondition IDsCore Logic
RSI Oversold#1, #11, #20, #21RSI below threshold + trend protection
Bollinger Band#2, #3, #4, #5, #6, #14, #18, #23Price touches BB lower band
EMA Deviation#5, #6, #7, #14, #15EMA26 > EMA12 with sufficient gap
EWO Oscillator#12, #13, #16, #17, #22Elliott Wave Oscillator values
RSI Dual Timeframe#20, #21, #235m + 1h RSI combination
CMF Fund Flow#24Chaikin Money Flow shift
ZEMA#26Zero-lag EMA support
Multi-Factor#8, #9, #10, #19Volume, oscillation, trend combination

IV. Sell Logic Details

4.1 Multi-Level Profit-Taking (custom_sell)

Profit RangeRSI ThresholdSignal
> 20%< 34signal_profit_11
10%–12%< 42signal_profit_10
9%–10%< 55signal_profit_9
8%–9%< 54signal_profit_8
7%–8%< 48signal_profit_7
6%–7%< 45signal_profit_6
5%–6%< 43signal_profit_5
4%–5%< 42signal_profit_4
3%–4%< 37signal_profit_3
2%–3%< 35signal_profit_2
1%–2%< 34signal_profit_1
0.1%–1%< 34signal_profit_0

4.2 Below EMA200 Profit Table

Uses independent parameters (signal_profit_u_*) — more aggressive when below the main MA.

4.3 Pump After Profit-Taking

Detects 24h/36h/48h rises and uses dedicated parameters for "pumped" coins.

4.4 Trailing Stop (3 Sets)

SetProfit RangeRSI RangeDrawdown
Trail 116%–60%20–503%
Trail 210%–40%20–503%
Trail 36%–20%5%

4.5 Recovery Exit

# Recovery 1
sell_custom_recover_profit_1 = 0.04 # Recover to 4% profit
sell_custom_recover_min_loss_1 = 0.12 # Was down > 12%

# Recovery 2
sell_custom_recover_profit_min_2 = 0.01
sell_custom_recover_profit_max_2 = 0.05
sell_custom_recover_min_loss_2 = 0.06
sell_custom_recover_rsi_2 = 46

V. Technical Indicators

5.1 Core Indicators

CategoryIndicatorsPurpose
EMA12, 15, 20, 26, 35, 50, 100, 200Trend, golden/death cross, price position
SMA5, 30, 200Trend direction, MA offset entry
RSI4, 14, 20Overbought/oversold, momentum
BollingerBB20-2STD, BB40-2STDVolatility channel, mean reversion
MFI14Money flow
EWO50–200Elliott Wave Oscillator
CMF20Chaikin Money Flow
ZEMA61Zero-lag EMA
Choppiness14Trending vs choppy

VI. Risk Management

6.1 Multi-Layer Buy Protection

LayerTypeRisk Avoidance
Layer 1EMA TrendAvoid counter-trend
Layer 2SMA200 DirectionAvoid bottom-fishing in downtrends
Layer 3Safe DipsAvoid chasing highs
Layer 4Safe PumpAvoid buying after surges
Layer 5Close PositionEnsure price in reasonable range

6.2 Dynamic Stop Loss

EMA200 Near Stop Loss: Current profit > 0 but < 2.4%, close < EMA200, EMA200 deviation < 2.4%, RSI > RSI_1h + 4.4

Long Holding Stop Loss: Holding > 1200 min (20 hours), profit in -8% to -4%, current > -max_loss + 10%, close < EMA200, RSI > RSI_1h + 4, SMA200 falling


VII. Strategy Pros & Cons

✅ Advantages

  1. Extremely Adaptive: 26 conditions cover trend, oscillation, reversal — always suitable for current market
  2. Solid Defense: Each entry has multi-layer protection, like wearing bulletproof vest + helmet
  3. Fine-Grained Profit-Taking: Layered system makes "locking in profits" systematic
  4. Community Validated: NostalgiaForInfinity series has years of real-trader validation
  5. Customizable: Each condition independently switchable

⚠️ Limitations

  1. Overwhelming Complexity: 26 conditions + hundreds of parameters, high learning cost
  2. Overfitting Risk: Too many parameters, easily "fitted" to historical data
  3. High Computation: 400 candle startup + multi-timeframe indicators, old computers may struggle
  4. Signal Conflicts: Condition 1 says buy, Condition 10 may say wait
  5. Manual Execution Impossible: 5-minute level + complex logic, not for humans

VIII. Summary

NostalgiaForInfinityV7_SMA is a well-designed multi-condition trend-following strategy. Its core value:

  1. Comprehensive: 26 conditions cover various market forms
  2. Defensive: Multi-layer protection filters high-risk signals pre-entry
  3. Flexible: Each condition independently configurable
  4. Mature: NostalgiaForInfinity series has years of community validation

Recommendations:

  • Selectively enable subset of conditions rather than all
  • Maintain protection mechanism integrity
  • Verify with live data against backtest parameters
  • Adjust dynamically based on market environment