Skip to main content

NFI_v5 Strategy Analysis

Strategy Number: #251 (251st of 465 strategies) Strategy Type: NFI Series Standard Version — Multi-Condition Trend Following Timeframe: 5 Minutes (5m) + 1 Hour Informational Timeframe


I. Strategy Overview

NFI_v5 is one of the standard versions of the NFI (Nostalgia For Infinity) series, continuously iterated by developer iterativ based on the classic Nostalgia strategy. As the fifth version of the NFI V series, v5 builds on the predecessor's multi-condition architecture with comprehensive parameter optimization and indicator refinement, representing the mature form of the NFI standard series.

The v5 version is positioned at the "balance point between stability and efficiency" — neither as conservative as early versions nor as complex as the ProAI series. Using the classic 5-minute timeframe, it integrates 20+ independent entry conditions with multi-tiered exit logic and comprehensive risk protection mechanisms. It is suitable for advanced traders pursuing stable returns.

Core Features

FeatureDescription
Entry Conditions20+ independent buy signals, each independently enableable/disableable
Exit Conditions8 basic exit signals + multi-layer dynamic take-profit logic
Protection Mechanisms20+ sets of entry protection parameters (EMA/SMA/safe dips/safe pumps)
Timeframe5-minute primary timeframe + 1-hour informational timeframe
DependenciesTA-Lib, technical, qtpylib, pandas, numpy

II. Strategy Configuration Analysis

2.1 Basic Risk Parameters

# ROI exit table (time: minimum profit rate)
minimal_roi = {
"0": 0.08, # Immediate exit: 8% profit
"40": 0.05, # After 40 minutes: 5% profit
"80": 0.03, # After 80 minutes: 3% profit
"120": 0.01 # After 120 minutes: 1% profit
}

# Stop-loss settings
stoploss = -0.12 # -12% hard stop-loss

# Trailing stop
trailing_stop = True
trailing_only_offset_is_reached = True
trailing_stop_positive = 0.02 # 2% trailing activation point
trailing_stop_positive_offset = 0.035 # 3.5% offset trigger

Design Philosophy:

  • Steady ROI ladder: First-tier ROI at 8%, slightly more conservative than the original Nostalgia (10%), suitable for stability-seeking traders
  • Loose stop-loss buffer: -12% hard stop-loss gives the market sufficient volatility room, avoiding frequent stop-outs
  • Gentle trailing stop: 2% activation, 3.5% lock-in, balancing profit protection and trend following

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,
"exit_timeout_count": 0,
}

III. Entry Conditions Details

3.1 Protection Mechanisms (20+ Sets)

Each entry condition has independent protection parameter sets, forming a multi-layered safety net:

Protection TypeParameter DescriptionFunction DescriptionDefault Example
EMA FastWhether fast EMA is above EMA200Trend confirmationema_fast_len=26
EMA SlowWhether 1h slow EMA is above EMA200Macro-cycle trendema_slow_len=100
Close Price ProtectionWhether close price is above EMAPrice position confirmationclose_above_ema_fast_len=200
SMA200 RisingWhether SMA200 is in uptrendLong-term trend confirmationsma200_rising_val=28
Safe DipsDownward magnitude threshold protectionPrevents bottom-fishing at mid-slopesafe_dips_type=80
Safe PumpsUpward magnitude threshold protectionPrevents chasing highssafe_pump_type=70
BTC TrendWhether BTC 1h is non-decliningMarket correlation protectionbtc_1h_not_downtrend

3.2 Typical Entry Condition Examples

Condition #1: RSI Oversold + MFI Low Value

# Logic
- RSI(1h) between 30-84 (macro-cycle not extreme)
- RSI(14) < 36 (oversold zone)
- MFI < 44 (low money flow)
- Price has minimum rise from 36-period low (excludes crash)

Condition #2: Bollinger Lower Band Breakout

# Logic
- RSI < RSI(1h) - 39 (relatively weak)
- MFI < 49 (low money flow)
- Close < Bollinger lower band × 0.983 (deep Bollinger break)

Condition #3: EMA Golden Cross + Bollinger Support

# Logic
- EMA26 > EMA12 (short-term golden cross)
- EMA difference > open price × coefficient (golden cross strength confirmation)
- Close < Bollinger lower band × offset coefficient (price position)

Condition #4: SMA Offset Strategy

# Logic
- Close < SMA × offset coefficient (price relative to moving average position)
- Volume confirmation
- RSI oversold confirmation

3.3 20+ Entry Conditions Classification

Condition GroupCondition NumbersCore LogicApplicable Scenario
Oversold Rebound1, 7, 8, 18, 20RSI/MFI low value + oversold signalsOversold bounce
Bollinger Strategy2, 3, 4, 5, 6, 9, 10Price breaks Bollinger lower bandVolatility breakout
EMA Trend5, 6, 7, 14, 15EMA golden cross + price positionTrend confirmation
SMA Offset9, 10, 11, 12, 13Price below SMA by specific ratioMean reversion
EWO Momentum12, 13, 16, 17Elliott Wave OscillatorMomentum confirmation
Special Conditions19, 21, 22, 23Composite indicator strategiesComprehensive signals

IV. Exit Conditions Details

4.1 Multi-Layer Take-Profit System

The strategy uses a tiered take-profit mechanism, dynamically adjusting exit conditions based on profit rate:

Profit Rate Zone          RSI Threshold    Signal Name
────────────────────────────────────────────────────────
> 18% < 32 signal_profit_10
14%-18% < 40 signal_profit_9
10%-14% < 50 signal_profit_8
8%-10% < 52 signal_profit_7
6%-8% < 48 signal_profit_6
5%-6% < 42 signal_profit_5
4%-5% < 40 signal_profit_4
3%-4% < 38 signal_profit_3
2%-3% < 36 signal_profit_2
1%-2% < 34 signal_profit_1
< 1% < 32 signal_profit_0

Design Principles:

  • Higher profit = lower RSI threshold (stricter exit conditions)
  • Prevents greed, locks in profits promptly
  • Dynamically adjusts based on market momentum

4.2 Special Exit Scenarios

ScenarioTrigger ConditionSignal NameDescription
Below EMA200 take-profitPrice < EMA200 + profit threshold metsignal_profit_u_*Weak take-profit
Pump protection24h/36h/48h rise detection + profitsignal_profit_p_*Prevents high pullback
Declining trendSMA200 declining + profit zonesignal_profit_d_*Trend reversal protection
Trailing take-profitMax profit drawdown + RSI zonesignal_profit_t_*Dynamic profit locking
Holding durationHeld > 900 minutes + profitsignal_profit_l_1Time stop

4.3 Basic Exit Signals

# Exit Signal 1: Bollinger upper band consecutive breakout
- RSI > 78
- Close > BB20 upper band (4 consecutive candles)

# Exit Signal 2: Short-term overbought
- RSI > 80
- Close > BB20 upper band (2 consecutive candles)

# Exit Signal 3: Dual RSI overbought
- RSI > 72
- RSI(1h) > 78

# Exit Signal 4: Below EMA200 overbought
- Close < EMA200
- Close > EMA50
- RSI > 77

# Exit Signal 5: 1h RSI extreme + EMA death cross
- RSI(1h) > 80
- EMA12 crosses below EMA26

V. Technical Indicator System

5.1 Core Indicators

Indicator CategorySpecific IndicatorsPurposeParameter Range
Trend IndicatorsEMA(12,15,20,25,26,35,50,100,200)Trend judgment, protectionMulti-period
Moving AverageSMA(50,100,200)Long-term trend confirmationMedium-long period
MomentumRSI(4,14,20), MFI(14), EWOOverbought/oversold, momentum strengthStandard
VolatilityBollinger Bands(20,2), BB(40,2)Price boundaries, breakout signalsDual-period
VolumeCMF(20), OBVMoney flow in/outStandard
Special IndicatorsWilliams %R(480), StochRSI(96)Extreme market identificationLong-period

5.2 Informational Timeframe Indicators (1h)

The strategy uses 1-hour timeframe as the informational layer for higher-dimensional trend judgment:

  • EMA/SMA trend confirmation: Macro-cycle moving average direction
  • RSI overbought/oversold: 1h-level momentum state
  • Pump/crash protection: 24h/36h/48h price change detection
  • BTC trend correlation: Impact of macro market on altcoins

5.3 Custom Indicators

Indicator NameCalculation MethodPurpose
TSITrue Strength IndexSmooth momentum
Hull(75)Hull Moving AverageReduced lag
Zema(61)Zero-lag EMAFast response
Zlema(68)Zero-lag Linear EMATrend confirmation

VI. Risk Management Features

6.1 Dip Protection (Safe Dips)

11 levels of dip threshold protection, from strict to loose:

Level    Threshold 1    Threshold 2    Threshold 3    Threshold 4
────────────────────────────────────────────────────────────────
10 1.5% 10% 24% 42%
50 2.0% 14% 32% 50%
80 2.4% 22% 38% 66%
100 2.6% 24% 42% 80%
110 2.7% 26% 44% 84%

6.2 Pump Protection (Safe Pump)

12 levels of pump detection to prevent chasing:

  • Detection periods: 24h / 36h / 48h
  • Threshold range: 0.42 - 2.0 (42% - 200% rise)
  • Pullback threshold: 1.4 - 3.0

6.3 BTC Trend Protection

# BTC 1h trend detection
if BTC_1h_downtrend:
# Most buy signals prohibited
# Only extreme oversold signals may trigger

6.4 Hold Trades Support

Supports external config file hold-trades.json for specific pairs to hold to target profit:

{
"profit_ratio": 0.005,
"trade_ids": [123, 456]
}

VII. Strategy Pros & Cons

✅ Pros

  1. Highly configurable: 20+ independently enableable entry conditions, adaptable to different market environments
  2. Multi-layer protection: 20+ protection parameter sets + 11-level dip protection + 12-level pump protection
  3. Dynamic take-profit: RSI-based dynamic exit adjustment based on profit rate, balancing profit and risk
  4. Multi-timeframe: 5m execution + 1h trend confirmation + BTC correlation analysis
  5. Classic indicator combinations: Integrates Bollinger Bands, RSI, EMA, EWO and other time-tested indicators
  6. Mature and stable: v5 is a mature, iteratively optimized version of the NFI series
  7. Community verified: Long-term live trading verification, issues fully exposed and fixed

⚠️ Cons

  1. High complexity: Many parameters, optimization and debugging require experience
  2. Data dependent: Needs sufficient 1h and 5m historical data
  3. External dependencies: Requires TA-Lib and technical library support
  4. Overfitting risk: Multi-condition may lead to overfitting historical data
  5. Computationally intensive: Each cycle calculates many indicators, demanding on performance
  6. Learning curve: Newcomers need time to understand each parameter's meaning

VIII. Summary

NFI_v5 is the mature standard version of the NFI series. Its core value lies in:

  1. Modular design: 20+ entry conditions function as independent strategies, flexibly combinable based on market state
  2. Risk priority: Multi-layer protection ensures capital safety in extreme conditions
  3. Classic heritage: Integrates decades of validated technical analysis indicators
  4. Mature and stable: Through multiple iterations, a reliable version of the NFI series

For quantitative traders, NFI_v5 is a choice balancing stability and efficiency:

  • More mature and complete than early versions
  • Simpler and lower resource consumption than ProAI series
  • Suitable as a main strategy for traders with some quantitative foundation

Recommendation:

  • Backtest verify with default configuration first
  • Adjust protection parameters based on target pair characteristics
  • Pay attention to 1h timeframe trend confirmation signals
  • Regularly evaluate each entry condition's contribution, optimize the combination