Skip to main content

NotAnotherSMAOffsetStrategyHO Strategy Analysis

1. Strategy Overview

1.1 Strategy Positioning

NotAnotherSMAOffsetStrategyHO is a trend-following quantitative trading strategy based on Moving Average Offset and Elliott Wave Oscillator (EWO), specifically designed for the Freqtrade framework. Its core design philosophy uses dynamic MA offsets to identify overbought/oversold zones, combined with EWO for market trend direction, capturing precise entry opportunities during trend pullbacks.

The "NotAnother" hints at the developer's reflection on overused SMA strategies — this is not a simple MA strategy but a deeply improved combination of multiple indicators. The "HO" suffix likely indicates "High Optimization," a specific version经过充分超参数优化的版本.

1.2 Key Features

  • Multi-dimensional signal verification: Three independent entry signals (ewo1, ewo2, ewolow) with cross-verification
  • Dynamic parameter adjustment: Buy and sell parameters support Hyperopt optimization
  • Complete take-profit/stop-loss: Fixed stop-loss + trailing stop + tiered ROI
  • Slippage protection: Auto-detects price slippage during execution

1.3 Applicable Markets

  • 5-minute primary timeframe, 1-hour auxiliary
  • Crypto markets with high volatility and clear trends
  • Liquid trading pairs

2. Core Theory

2.1 MA Offset Theory

Traditional MA strategies use price crossing MA as signals, suffering from significant lag. The offset approach doesn't wait for crossings — instead sets an offset coefficient, triggering signals when price approaches the MA by a certain percentage. For example, offset 0.966 means buy when price reaches 96.6% of MA.

Benefits: Earlier reversal captures, improved win rate, adapts to ranging markets.

2.2 Elliott Wave Oscillator Theory

EWO = (EMA_5 - EMA_200) / Low × 100
  • EWO positive: Short-term above long-term MA, uptrend
  • EWO negative: Downtrend
  • Large absolute value: Stronger trend

The strategy uses EWO to identify pullback entry timing within trends.

2.3 RSI Multi-Period Theory

Three RSI periods (4, 14, 20) analyze from different time dimensions. Multi-period RSI maintains stability while improving short-term sensitivity.

2.4 HMA Theory

Hull Moving Average (HMA-50) identifies trend changes with low lag, used in exit logic.


3. Indicator System

3.1 MA System

  • EMA Buy Group: Parameter base_nb_candles_buy default 16, optimizable 5-80
  • EMA Sell Group: Parameter base_nb_candles_sell default 10, optimizable 5-80
  • EMA_100: 100-period EMA for trend confirmation
  • HMA_50: 50-period Hull MA for trend reversal
  • SMA_9: 9-period SMA for short-term trend

3.2 Oscillator Group

  • EWO: fast=50, slow=200
  • RSI: 4, 14, 20 periods
  • CCI: 20-period
  • CTI: Trend strength

3.3 Parameter Optimization

ParameterTypeDefaultRange
base_nb_candles_buyInt165-80
base_nb_candles_sellInt105-80
low_offsetDecimal0.9660.9-0.99
low_offset_2Decimal0.9510.9-0.99
ewo_highDecimal3.4222.0-12.0
ewo_high_2Decimal-4.58-6.0 to 12.0
ewo_lowDecimal-8.562-20.0 to -8.0
rsi_buyInt5230-70

4. Entry Signal Analysis

4.1 Signal 1: ewo1 (Trend Pullback)

RSI_fast < 35
AND Close < EMA_buy × 0.966
AND EWO > 3.422
AND RSI < 52
AND Volume > 0
AND Close < EMA_sell × 1.014

Interpretation: Primary entry signal, captures pullback opportunities in uptrends. RSI_fast < 35 shows short-term panic selling; EWO > 3.422 confirms overall upward trend.

4.2 Signal 2: ewo2 (Deep Pullback)

RSI_fast < 35
AND Close < EMA_buy × 0.951
AND EWO > -4.58
AND RSI < 52
AND Volume > 0
AND Close < EMA_sell × 1.014
AND RSI < 25

Interpretation: Deeper pullback, price must fall ~4.9% below MA. RSI < 25 indicates extreme panic, higher risk but higher return potential.

4.3 Signal 3: ewolow (Reversal Signal)

RSI_fast < 35
AND Close < EMA_buy × 0.966
AND EWO < -8.562
AND Volume > 0
AND Close < EMA_sell × 1.014

Interpretation: Reversal signal for severe oversold. EWO deeply negative, market extremely pessimistic — potential reversal.

4.4 Entry Signal Comparison

SignalEnvironmentEWO RequirementRisk
ewo1Bull trend pullbackPositive (>3.422)Medium
ewo2Deep pullbackCan be negative (>-4.58)Higher
ewolowBear reversalNegative (<-8.562)Highest

5. Exit Signal Analysis

5.1 Exit Condition 1: Trend Continuation Exit

Close > SMA_9
AND Close > EMA_sell × 1.002
AND RSI > 50
AND Volume > 0
AND RSI_fast > RSI_slow

Interpretation: Captures profit-taking when price reaches target zone. Price above SMA-9, above sell EMA, RSI > 50 — ideal exit timing.

5.2 Exit Condition 2: Trend Reversal Exit

Close < HMA_50
AND Close > EMA_sell × 1.014
AND Volume > 0
AND RSI_fast > RSI_slow

Interpretation: Protective exit when HMA_50 broken but still above baseline. Locks in profit before potential deep correction.

5.3 Slippage Protection

max_slippage: -0.02  # Max 2% negative slippage
retries: 3 # Max 3 retries

6. Risk Management

6.1 Fixed Stop-Loss

stoploss = -0.35  # -35%

Relatively wide, suitable for crypto's high volatility.

6.2 Trailing Stop

trailing_stop = True
trailing_stop_positive = 0.005 # 0.5%
trailing_stop_positive_offset = 0.03 # Activates at 3%

6.3 Tiered ROI

minimal_roi = {
"0": 0.289, # 28.9% immediate
"25": 0.105, # 10.5% after 25 min
"80": 0.038, # 3.8% after 80 min
"140": 0 # Unconditional after 140 min
}

6.4 Risk Control Summary

MeasureValueEffect
Fixed stop-loss-35%Cap max loss
Trailing stop0.5%Lock profits
ROI tiers28.9%/10.5%/3.8%/0%Control greed
Profit-only sell>1%Avoid selling at loss
Slippage protectionMax -2%Control execution cost

7. Parameter Configuration

7.1 Buy Parameters

buy_params = {
"base_nb_candles_buy": 16,
"low_offset": 0.966,
"low_offset_2": 0.951,
"ewo_high": 3.422,
"ewo_high_2": -4.58,
"ewo_low": -8.562,
"rsi_buy": 52
}

7.2 Sell Parameters

sell_params = {
"base_nb_candles_sell": 10,
"high_offset": 1.014,
"high_offset_2": 1.002
}

7.3 EWO Parameters

fast_ewo = 50
slow_ewo = 200

8. Backtesting Recommendations

  1. Data requirements: 60+ days historical data minimum
  2. Trading pairs: Liquid major pairs (BTC/USDT, ETH/USDT)
  3. Fee settings: ~0.1% recommended
  4. Key metrics: Max drawdown, Sharpe ratio, win rate, avg holding time, profit factor

9. Practical Applications

9.1 Bull Market

ewo1 most frequent. Consider tightening trailing stop and lowering ROI targets.

9.2 Ranging Market

ewo1 and ewo2 alternate. Shorten holding time, increase turnover.

9.3 Bear Market

ewolow becomes primary signal. Reduce position size, tighten stop-loss.

9.4 High Volatility Markets

Widen offset coefficients, increase trailing distance, reduce position size.


10. Strategy Pros & Cons

10.1 Advantages

  1. Multi-signal verification: Three signals complement each other
  2. Dynamic offset design: Precise entry at trend pullbacks
  3. Complete risk control: Multi-layer protection
  4. Parameter optimizable: Adapts to markets
  5. Slippage protection: Guards execution quality
  6. Multi-timeframe: 5m + 1h analysis

10.2 Limitations

  1. Wide stop-loss: -35% may be too wide for some
  2. Complex buy conditions: May miss quick reversals
  3. Poor ranging market performance: May trigger frequent stop-losses
  4. Parameter sensitivity: Many parameters need thorough optimization
  5. No volume analysis: Only checks volume > 0
  6. No short mechanism: Long only

11. Summary

NotAnotherSMAOffsetStrategyHO demonstrates how to innovatively combine classic technical indicators (MA, RSI, EWO) for crypto markets. Through strict backtesting and optimization, this strategy aims for stable returns in live trading.

Success requires combining market environment, risk tolerance, and capital management. Quant trading is ultimately a probability game; continuous learning and optimization are key to long-term success.


Document Version: 1.0 Last Updated: 2024