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
| Feature | Description |
|---|---|
| Entry Conditions | Multiple SMA-based trend signal combinations |
| Exit Conditions | Tiered take-profit system + trend reversal stop-loss |
| Protection Mechanisms | SMA multi-period trend filtering + dynamic stop-loss |
| Timeframe | 15-minute primary timeframe |
| Dependencies | pandas, 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 Type | Parameters | Function |
|---|---|---|
| Multi-Period Trend Filtering | SMA5/SMA20/SMA50 combination | Multi-period resonance confirms trend |
| Price Position Protection | Price relative to SMA position | Avoids chasing at highs |
| MA Slope Protection | SMA slope angle | Filters sideways consolidation |
| Volume Confirmation | Volume expansion verification | Confirms 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 Group | Core Logic | Enabled Feature |
|---|---|---|
| Golden Cross | Short crosses above long | Trend initiation |
| Pullback Support | Price retraces to MA | Trend continuation |
| Multi-Asset Arrangement | MAs in sequence upward | Strong confirmation |
| Breakout Confirmation | Breakout + MA support | Trend 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
| Scenario | Trigger Condition | Signal Name |
|---|---|---|
| Death Cross | Short-term SMA crosses below long-term SMA | Trend reversal exit |
| Price Breaks Below MA | Price breaks below key SMA | Support failure exit |
| MA Flattening | SMA slope approaches zero | Trend weakening exit |
| High-Altitude Divergence | Price diverges from RSI | Top signal exit |
4.3 Basic Exit Signals (Examples)
-
Signal #1: SMA death cross forms → Sell
- Short-term SMA crosses below long-term SMA
- Trend may reverse
-
Signal #2: Price breaks below SMA support → Sell
- Price breaks below key MA
- Support becomes resistance
-
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
| Indicator | Parameters | Purpose |
|---|---|---|
| Short-Term SMA | 5, 10 | Sensitive short-term price changes |
| Medium-Term SMA | 20, 50 | Confirm medium-term trend direction |
| Long-Term SMA | 100, 200 | Judge long-term bull/bear boundary |
5.2 Auxiliary Indicators
| Indicator Category | Specific Indicators | Purpose |
|---|---|---|
| Momentum Indicators | RSI, AO | Confirm trend strength |
| Volume | Volume, OBV | Verify signal validity |
| Volatility | ATR | Dynamic stop-loss reference |
5.3 SMA Signal Interpretation
| Signal Type | Condition | Meaning |
|---|---|---|
| Golden Cross | Short SMA crosses above long SMA | Buy signal, trend upward |
| Death Cross | Short SMA crosses below long SMA | Sell signal, trend downward |
| Support | Price retraces to SMA without breaking | Buy opportunity, trend continues |
| Resistance | Price rebounds to SMA without breaking | Sell signal, trend blocked |
| Multi-Asset Up | Short > Medium > Long in sequence upward | Strong uptrend, hold firmly |
| Multi-Asset Down | Short < Medium < Long in sequence downward | Weak downtrend, avoid entry |
VI. Risk Management Features
6.1 SMA-Specific Risk Control
| Risk Control Type | Description | Implementation |
|---|---|---|
| Trend Filtering | Only trade with the trend | Multi-period SMA direction consistent |
| MA Stop-Loss | Exit when MA is broken | Price breaks below key SMA |
| Slope Filtering | Filter sideways consolidation | SMA slope angle threshold |
| Multi-Period Confirmation | Improves signal quality | Different period SMAs resonate |
6.2 Traditional Risk Control Retained
| Type | Parameters | Description |
|---|---|---|
| Fixed Stop-Loss | -10% | Hard loss limit |
| Trailing Stop | 3-5% | Lock trend profits |
| ROI Take-Profit | Tiered exit | Time value capture |
6.3 SMA Indicator's Natural Limitations and Countermeasures
| Limitation | Description | v4_SMA Countermeasure |
|---|---|---|
| Lag | Signal delay | Multi-period confirmation improves timeliness |
| Fails in Ranging | Sideways false signals | Slope filtering + volume verification |
| False Breakouts | Price briefly crosses through | Wait for close confirmation |
VII. Strategy Pros & Cons
✅ Pros
- Simple and Intuitive: SMA is the most basic indicator, easy to understand and analyze
- Computationally Efficient: No complex algorithms, low resource requirements
- Clear Trends: MA direction is clear, signals are objective without ambiguity
- Mature and Reliable: Classic method verified by decades of market testing
- Beginner-Friendly: Low learning curve, easy to start
⚠️ Cons
- Lagging: SMA naturally has lag, entries may be late
- Poor Ranging Market Performance: Frequent golden/death crosses in sideways, many false signals
- Parameter Sensitive: Different period parameters have significantly different effects
- Not Suitable for High Frequency: Signals generate slowly, not suitable for short-term high frequency
- Trend Dependent: Only effective in clear trends
VIII. Applicable Scenarios
| Market Environment | Recommended Config | Description |
|---|---|---|
| Clear Uptrend | Actively go long | MA multi-asset arrangement |
| Clear Downtrend | Short or stand aside | MA multi-asset bearish arrangement |
| Sideways Consolidation | Reduce trades or pause | Filter false signals |
| High-Volatility Trend | Normal participation | SMA 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 Type | Rating | Analysis |
|---|---|---|
| 📈 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 Item | Recommended Value | Description |
|---|---|---|
| Number of Pairs | 5-20 | Diversify risk |
| SMA Period Combination | 5/20/50 | Classic combination |
| Minimum Trend Slope | > 0.01 | Filter sideways consolidation |
X. Summary
NFI_v4_SMA is the classic return work in the NFI series. Its core value lies in:
- Simple and Reliable: Uses the most basic but proven SMA indicator
- Easy to Understand: Low learning curve, suitable for beginners
- Resource Efficient: Small computation, extremely low hardware requirements
- 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.