Skip to main content

Combined_NFIv6_SMA Strategy Analysis

Strategy Number: #127 (127th of 465 strategies) Strategy Type: Multi-Condition Trend Following + Bollinger Band Rebound + Dynamic Take-Profit Timeframe: 5 Minutes (5m) + 1 Hour (1h) Dual Timeframe


I. Strategy Overview

Combined_NFIv6_SMA is a variant of the NostalgiaForInfinityV6 series created by Freqtrade community developer iterativ, fusing the core design philosophy of the NFI (Nostalgia For Infinity) series with SMA (Simple Moving Average) trend filtering. The strategy constructs a complex but efficient buy/sell signal system through multi-layer technical indicator protection mechanisms and multi-timeframe analysis.

From the strategy architecture, Combined_NFIv6_SMA adopts a "protection layer + core signal" dual-layer filtering mechanism. Each buy condition group is equipped with EMA protection, SMA200 trend protection, and special protection mechanisms for "dips" and "pumps." This design significantly reduces the probability of triggering false signals under extreme market conditions.

The strategy's timeframe design embodies "combining long and short": 5 minutes captures short-term trading opportunities, while 1 hour confirms long-term trend direction. This cross-timeframe analysis enables the strategy to maintain good adaptability across different market environments.

Core Features

FeatureDescription
Buy Conditions24 independent buy signals, independently enableable/disableable
Sell Conditions8 basic sell signals + multi-layer dynamic take-profit logic + trailing stop
Protection Mechanisms8 groups of buy protection parameters (EMA, SMA200, Dip, Pump, etc.)
Timeframe5-minute primary + 1-hour informational
DependenciesTA-Lib, technical (qtpylib), numpy, pandas

II. Strategy Configuration Analysis

2.1 Basic Risk Parameters

# ROI Exit Table (time: minimum profit rate)
minimal_roi = {
"0": 0.10, # Immediate: 10% profit
"30": 0.05, # After 30 minutes: 5% profit
"60": 0.02, # After 60 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.005
trailing_stop_positive_offset = 0.035

2.2 Order Type Configuration

order_types = {
'entry': 'limit', # Limit order entry
'exit': 'limit', # Limit order exit
'stoploss': 'limit', # Limit order stop-loss
'stoploss_on_exchange': False
}

2.3 Exit Signal Configuration

use_exit_signal = True
exit_profit_only = True
ignore_roi_if_entry_signal = True

III. Entry Conditions Details

The strategy contains 24 independent buy conditions, each with independent enable/disable switches and protection mechanism configurations.

3.1 Protection Mechanisms (8 Groups)

Each buy condition supports independent configuration of the following protection mechanisms:

Protection TypeParameter DescriptionDefault Example
EMA Fast Protectionbuy_xx_protection__ema_fastTrue (fast EMA above 200 EMA)
EMA Slow Protectionbuy_xx_protection__ema_slowTrue (1h EMA above 1h 200 EMA)
Close Above EMA Fastbuy_xx_protection__close_above_ema_fastSpecified EMA period
SMA200 Risingbuy_xx_protection__sma200_risingTrue (200-day MA rising)
SMA200 1h Risingbuy_xx_protection__sma200_1h_risingTrue (1h 200-day MA rising)
Safe Dips Protectionbuy_xx_protection__safe_dipsEnable safe dip detection
Safe Pump Protectionbuy_xx_protection__safe_pumpEnable safe pump detection

3.2 Typical Buy Condition Examples

Condition GroupCondition #Core Logic
RSI/MFI Oversold Rebound1, 2RSI and MFI simultaneously oversold, with EMA protection
Bollinger Band Rebound3, 4BB40/BB20 lower band breakout + volume confirmation
EMA Golden/Death Cross5, 6, 7EMA12 crosses above EMA26 + various filtering conditions
RSI Extreme Oversold8, 18, 19, 20, 21RSI extremely low (<20) + volume expansion
MA Offset9, 10, 11, 14, 15, 16, 22Price below MA by certain percentage + other indicator confirmation
EWO Oscillator12, 13, 16, 17, 22, 23Elliot Wave Oscillator captures momentum reversal

IV. Exit Conditions Details

4.1 Multi-Level Take-Profit System

The strategy implements a refined stepped take-profit mechanism:

Profit Rate Zone    RSI Threshold    Signal Name
─────────────────────────────────────────────
1% < 33 sell_custom_profit_0
2% < 34 sell_custom_profit_1
3% < 38 sell_custom_profit_2
4% < 42 sell_custom_profit_3
5% < 43 sell_custom_profit_4
6% < 44 sell_custom_profit_5
7% < 49 sell_custom_profit_6
8% < 54 sell_custom_profit_7
9% < 54 sell_custom_profit_8
10% < 50 sell_custom_profit_9
12% < 42 sell_custom_profit_10
20% < 34 sell_custom_profit_11

Design Philosophy: The more you earn, the more relaxed the exit conditions. As profit increases, the strategy allows RSI to reach higher levels before triggering sells, giving the trend sufficient room to continue.

4.2 Special Exit Scenarios

ScenarioTrigger ConditionSignal Name
Sell Below EMA200Close below EMA200 with sufficient profitSpecific take-profit trigger
Trailing Stop Mode 1Profit 16-60%, RSI 20-50, 3% drawdown from hightrailing_sell_1
Trailing Stop Mode 2Profit 10-40%, RSI 20-50, 3% drawdowntrailing_sell_2
Trailing Stop Mode 3Profit 6-20%, 1h SMA200 declining, 5% drawdowntrailing_sell_3
Pump Scenario SellAfter 24/36/48h sharp rise, profit threshold reachedpump_sell

V. Technical Indicator System

5.1 Core Indicators

Indicator CategorySpecific IndicatorsPurpose
Moving AveragesEMA (12, 15, 20, 26, 35, 50, 100, 200), SMA (5, 30, 200)Trend judgment, support/resistance
Momentum IndicatorsRSI (4, 14), MFIOverbought/oversold judgment
Volatility IndicatorsBollinger Bands (20, 40 periods)Price channels, breakout signals
Money Flow IndicatorsCMF (Chaikin Money Flow)Fund inflow/outflow
Trend IndicatorsHMA (Hull Moving Average)Smoothed trend judgment
OscillatorEWO (Elliot Wave Oscillator)Momentum reversal signals

VI. Risk Management Features

6.1 Safe Dips (Safe Dips) Protection

Prevents "catching a falling knife":

TypeDetection Logic (Dip Thresholds)
strict1.5%/10%/24%/42%
normal2%/14%/32%/50%
loose2.6%/24%/42%/80%

6.2 Safe Pump (Safe Pump) Protection

Prevents "chasing at the top":

TypePeriodRise ThresholdDrawdown Threshold
strict24h0.422.2
strict36h0.582.0
strict48h0.802.0
normal24h0.601.75
normal36h0.641.75
normal48h0.851.75
loose24h0.661.7
loose36h0.701.7
loose48h1.601.4

VII. Strategy Pros & Cons

Advantages

  1. Multi-Layer Protection: 8 different protection mechanisms significantly reduce false signal probability
  2. Dual-Timeframe Analysis: Combines 5m and 1h timeframes, balancing short-term opportunities and long-term trends
  3. Refined Take-Profit: 12-level dynamic take-profit maximizes profits, dynamically adjusting exit conditions
  4. Highly Configurable: 24 buy conditions and 8 sell conditions can all be independently configured
  5. Strong Trend-Following: Multiple EMA and SMA confirmations effectively capture trending markets

Limitations

  1. High Complexity: Large number of parameters require reasonable configuration; steep learning curve for newcomers
  2. Trading Frequency: May generate many trades during bull markets; attention needed for fees and slippage
  3. Overfitting Risk: Large number of parameters may overfit historical data
  4. Computational Requirements: Dual-timeframe + multi-indicator calculation has hardware requirements

VIII. Applicable Scenarios

Market EnvironmentRecommended ConfigurationNotes
Bull Marketmax_open_trades: 4-6, enable all buy conditionsFully utilize multi-signal opportunities
Wide-Range Volatilitymax_open_trades: 2-3, enable Safe Pump protectionReduce positions, prevent chasing tops
Bear Marketmax_open_trades: 1-2, enable Safe Dips protectionCautious bottom-fishing, control risk exposure
Extreme VolatilityPause trading or reduce positionsPrice limit moves may affect execution

IX. Live Trading Notes

Combined_NFIv6_SMA is the 6th-generation variant of the NostalgiaForInfinity series, inheriting the core design philosophy of the "Hedge Infinity" strategy. Based on its code architecture and community live-trading validated experience, it is best suited for markets with clear medium-to-long-term trends and should be used with caution during high-volatility extreme markets.

9.1 Core Strategy Logic

  • Multi-Condition Resonance: 24 buy conditions provide diverse entry signals; any single condition triggering enables entry
  • Trend Filtering: Confirms trends through SMA200 and EMA, avoiding counter-trend trades
  • Reverse Protection: Safe Dips and Safe Pump prevent bottom-fishing at mid-slope and chasing at peaks
  • Dynamic Take-Profit: Dynamically adjusts exit conditions based on profit levels

9.2 Performance in Different Market Environments

Market TypePerformance RatingAnalysis
Bull Market⭐⭐⭐⭐⭐Clear trends; multi-condition resonance most effective; trailing stop maximizes trends
Volatile Market⭐⭐⭐☆☆Protection triggers frequently; may miss some opportunities; fee consumption increases
Bear Market⭐⭐☆☆☆Safe Dips active; trading frequency reduced; bottom-fishing signals still require caution
Extreme Volatility⭐⭐☆☆☆Price limit moves may affect execution; slippage increases

X. Summary

Combined_NFIv6_SMA is a meticulously designed, fully-featured trading strategy. It inherits the core philosophy of the NostalgiaForInfinity series, achieving effective control of market risks through multi-layer technical indicator protection mechanisms and refined take-profit/stop-loss design.

Its core value lies in:

  1. Multi-Layer Protection: 8 protection mechanisms significantly reduce false signal probability
  2. Refined Take-Profit: 12-level dynamic take-profit maximizes profits
  3. Flexible Configuration: 24 buy conditions independently enableable/disableable
  4. Dual Timeframe: Balances short-term opportunities and long-term trends

For quantitative traders, this strategy provides sufficient customization space. Test thoroughly in paper trading before production use, and fine-tune parameters based on actual market conditions. Remember: no matter how good a strategy is, the market can always teach a lesson. Test with small positions; survival is paramount.