Skip to main content

NFI_v4_SMA Strategy: In-Depth Analysis

Strategy ID: #243 (Strategy #243 of 465) Strategy Type: NFI Series - v4 SMA Trend Mode Timeframe: 15 Minutes (15m)


I. Strategy Overview

NFI_v4_SMA is Version 4 (v4) of the NFI (Nostalgia For Infinity) series, using the classic SMA (Simple Moving Average) as its core trend identification tool. SMA is the oldest, most fundamental, and most classic indicator in technical analysis, smoothing price fluctuations by calculating the arithmetic mean of prices over a specific period to identify market trend direction.

The v4 version represents the NFI series' "return to classics" attempt at its mature stage. Compared to earlier versions' complex indicator combinations, v4_SMA returns to the most basic moving average analysis. While maintaining NFI's multi-condition architecture advantages, it significantly reduces strategy comprehension difficulty and computational complexity, making it especially suitable for traders pursuing simplicity and trend-following.

Core Characteristics

FeatureDescription
Entry ConditionsMultiple SMA-based trend signal combinations
Exit ConditionsTiered take-profit system + trend reversal stop-loss
Protection MechanismsSMA multi-period trend filtering + dynamic stop-loss
Timeframe15-minute primary timeframe
Dependenciespandas, numpy, TA-Lib (basic dependencies)

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.04, # After 60 minutes: 4% profit
"120": 0.02 # After 120 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.03 # 3% trailing activation point
trailing_stop_positive_offset = 0.05 # 5% offset trigger

Design Philosophy:

  • Conservative ROI (10%): v4_SMA adopts a relatively conservative initial take-profit target, aligned with SMA signal's moderate sensitivity
  • Standard Stop-Loss (-10%): Allows trend pullbacks while strictly controlling single-trade loss
  • Conservative Trailing (3% activation / 5% offset): More conservative than other NFI variants, suitable for SMA signal's lagging nature

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 (Multiple Groups)

v4_SMA's protection mechanisms are built around SMA trend judgment:

Protection TypeParametersFunction
Multi-Period Trend FilteringSMA5/SMA20/SMA50 combinationMulti-period resonance confirms trend
Price Position ProtectionPrice relative to SMA positionAvoids chasing at highs
MA Slope ProtectionSMA slope angleFilters sideways consolidation
Volume ConfirmationVolume expansion verificationConfirms trend validity

3.2 Core Entry Condition Types

Condition Group 1: Golden Cross Signal

  • Short-term SMA crosses above long-term SMA
  • Price stands above all key MAs
  • Volume expands with confirmation
  • MA slope is upward

Condition Group 2: Pullback to MA Support

  • Price pulls back to near SMA
  • SMA slopes upward, showing uptrend
  • Candlestick shows bounce-back pattern at MA
  • Momentum indicators (RSI/AO) confirm

Condition Group 3: MA Multi-Asset Arrangement

  • SMA5 > SMA20 > SMA50 in sequence
  • Price trades above all MAs
  • MA spacing is reasonable, trend is healthy
  • Volume is stable

Condition Group 4: Breakout Confirmation Signal

  • Price breaks above previous high
  • SMA provides trend support
  • Volume significantly expands
  • Pullback does not break key MA

3.3 Entry Conditions Summary

Condition GroupCore LogicEnabled Feature
Golden CrossShort crosses above longTrend initiation
Pullback SupportPrice retraces to MATrend continuation
Multi-Asset ArrangementMAs in sequence upwardStrong confirmation
Breakout ConfirmationBreakout + MA supportTrend strengthening

IV. Exit Logic Details

4.1 Multi-Layer Take-Profit System

v4_SMA employs a progressive take-profit strategy, gradually lowering targets as holding time increases:

Profit Rate Zone     Threshold       Signal Name
─────────────────────────────────────────────
0-30 minutes 10% Quick Profit
30-60 minutes 6% Medium-term Target
60-120 minutes 4% Conservative Exit
120+ minutes 2% End-of-Session Breakeven

4.2 Special Exit Scenarios

ScenarioTrigger ConditionSignal Name
Death CrossShort-term SMA crosses below long-term SMATrend reversal exit
Price Breaks Below MAPrice breaks below key SMASupport failure exit
MA FlatteningSMA slope approaches zeroTrend weakening exit
High-Altitude DivergencePrice diverges from RSITop signal exit

4.3 Basic Exit Signals (Examples)

  1. Signal #1: SMA death cross forms → Sell

    • Short-term SMA crosses below long-term SMA
    • Trend may reverse
  2. Signal #2: Price breaks below SMA support → Sell

    • Price breaks below key MA
    • Support becomes resistance
  3. Signal #3: MA multi-asset arrangement breaks → Sell

    • MA crossovers become disordered
    • Trend structure damaged

V. Technical Indicator System

5.1 Core Indicator: SMA System

IndicatorParametersPurpose
Short-Term SMA5, 10Sensitive short-term price changes
Medium-Term SMA20, 50Confirm medium-term trend direction
Long-Term SMA100, 200Judge long-term bull/bear boundary

5.2 Auxiliary Indicators

Indicator CategorySpecific IndicatorsPurpose
Momentum IndicatorsRSI, AOConfirm trend strength
VolumeVolume, OBVVerify signal validity
VolatilityATRDynamic stop-loss reference

5.3 SMA Signal Interpretation

Signal TypeConditionMeaning
Golden CrossShort SMA crosses above long SMABuy signal, trend upward
Death CrossShort SMA crosses below long SMASell signal, trend downward
SupportPrice retraces to SMA without breakingBuy opportunity, trend continues
ResistancePrice rebounds to SMA without breakingSell signal, trend blocked
Multi-Asset UpShort > Medium > Long in sequence upwardStrong uptrend, hold firmly
Multi-Asset DownShort < Medium < Long in sequence downwardWeak downtrend, avoid entry

VI. Risk Management Features

6.1 SMA-Specific Risk Control

Risk Control TypeDescriptionImplementation
Trend FilteringOnly trade with the trendMulti-period SMA direction consistent
MA Stop-LossExit when MA is brokenPrice breaks below key SMA
Slope FilteringFilter sideways consolidationSMA slope angle threshold
Multi-Period ConfirmationImproves signal qualityDifferent period SMAs resonate

6.2 Traditional Risk Control Retained

TypeParametersDescription
Fixed Stop-Loss-10%Hard loss limit
Trailing Stop3-5%Lock trend profits
ROI Take-ProfitTiered exitTime value capture

6.3 SMA Indicator's Natural Limitations and Countermeasures

LimitationDescriptionv4_SMA Countermeasure
LagSignal delayMulti-period confirmation improves timeliness
Fails in RangingSideways false signalsSlope filtering + volume verification
False BreakoutsPrice briefly crosses throughWait for close confirmation

VII. Strategy Pros & Cons

✅ Pros

  1. Simple and Intuitive: SMA is the most basic indicator, easy to understand and analyze
  2. Computationally Efficient: No complex algorithms, low resource requirements
  3. Clear Trends: MA direction is clear, signals are objective without ambiguity
  4. Mature and Reliable: Classic method verified by decades of market testing
  5. Beginner-Friendly: Low learning curve, easy to start

⚠️ Cons

  1. Lagging: SMA naturally has lag, entries may be late
  2. Poor Ranging Market Performance: Frequent golden/death crosses in sideways, many false signals
  3. Parameter Sensitive: Different period parameters have significantly different effects
  4. Not Suitable for High Frequency: Signals generate slowly, not suitable for short-term high frequency
  5. Trend Dependent: Only effective in clear trends

VIII. Applicable Scenarios

Market EnvironmentRecommended ConfigDescription
Clear UptrendActively go longMA multi-asset arrangement
Clear DowntrendShort or stand asideMA multi-asset bearish arrangement
Sideways ConsolidationReduce trades or pauseFilter false signals
High-Volatility TrendNormal participationSMA support effective

IX. Applicable Market Environment Details

9.1 NFI_v4_SMA Positioning

NFI_v4_SMA is the "classic return version" of the NFI series, using the most basic but reliable SMA indicator. v4 represents the NFI series' mature stage, returning to the most classic technical analysis method while maintaining the multi-condition architecture.

Its Profit Philosophy: Use the simplest MA to determine trends, use multi-condition filtering to eliminate false signals, use time to gain space.

  • Simple and Intuitive: SMA is easy to understand and execute
  • Trend is King: Only trade in clear trends
  • Multi-Condition Confirmation: Avoid single-indicator misjudgment
  • Resource Friendly: Extremely low computational resource requirements

9.2 Performance in Different Market Environments

Market TypeRatingAnalysis
📈 Clear Uptrend⭐⭐⭐⭐⭐MA multi-asset arrangement, signals accurate and reliable
🔄 Sideways Consolidation⭐⭐☆☆☆Frequent golden/death crosses, many false signals
📉 Clear Downtrend⭐⭐⭐⭐☆MA multi-asset bearish, can short or avoid
⚡️ Extreme Volatility⭐⭐⭐☆☆Trend is clear but volatility is intense

9.3 Key Configuration Recommendations

Config ItemRecommended ValueDescription
Number of Pairs5-20Diversify risk
SMA Period Combination5/20/50Classic combination
Minimum Trend Slope> 0.01Filter sideways consolidation

X. Summary

NFI_v4_SMA is the classic return work in the NFI series. Its core value lies in:

  1. Simple and Reliable: Uses the most basic but proven SMA indicator
  2. Easy to Understand: Low learning curve, suitable for beginners
  3. Resource Efficient: Small computation, extremely low hardware requirements
  4. Clear Trends: MA signals are objective, no subjective ambiguity

For quantitative traders, NFI_v4_SMA provides the most concise implementation of the NFI series, especially suitable for:

  • Users pursuing simple and effective strategies
  • Traders with limited hardware resources
  • Beginners just starting quantitative trading
  • Investors who prefer trend-following

Core Recommendation: Use in clear trends, reduce or pause strategy during sideways consolidation.