SMAOPv1_TTF Strategy In-Depth Analysis
Strategy ID: #357 (357th of 465 strategies)
Strategy Type: SMA Offset + TTF Trend Trigger + EWO Protection Combination
Timeframe: 5 minutes (5m) + 1 hour (1h) informational layer
I. Strategy Overview
SMAOPv1_TTF is a multi-condition trend-following strategy that combines SMA Offset, Trend Trigger Factor (TTF), and Elliott Wave Oscillator (EWO). The strategy identifies entry opportunities through price deviation from moving averages, uses EWO for trend filtering, and employs TTF as a dynamic exit signal, building a complete trend trading system.
Core Features
| Feature | Description |
|---|---|
| Buy Conditions | 2 independent buy signals, can trigger entry independently |
| Sell Conditions | 2 base sell signals + trailing stop mechanism |
| Protection Mechanisms | Triple protection: EWO filter + RSI constraint + trailing stop |
| Timeframe | Main timeframe 5m + informational timeframe 1h |
| Dependencies | talib, numpy, qtpylib, technical |
II. Strategy Configuration Analysis
2.1 Basic Risk Parameters
# ROI exit table
minimal_roi = {
"0": 0.10, # 10% profit immediately
"30": 0.05, # Drops to 5% after 30 minutes
"60": 0.02 # Drops to 2% after 60 minutes
}
# Stop loss setting
stoploss = -0.10 # Fixed stop loss at 10%
# Trailing stop
trailing_stop = True
trailing_stop_positive = 0.001
trailing_stop_positive_offset = 0.01
trailing_only_offset_is_reached = True
Design Philosophy:
- ROI table uses a stepped declining design, initial target of 10%, gradually reducing profit expectations as holding time increases
- Stop loss set at 10%, appropriate for the high volatility of cryptocurrency markets
- Trailing stop activates after 1% profit, locking in 0.1% positive profit to protect gains
2.2 Order Type Configuration
use_sell_signal = True # Enable sell signals
sell_profit_only = True # Only sell when profitable
sell_profit_offset = 0.01 # Sell profit offset 1%
ignore_roi_if_buy_signal = True # Ignore ROI when buy signal active
III. Buy Conditions Detailed Analysis
3.1 Optimizable Parameter Groups
The strategy provides multiple optimizable parameters through Hyperopt:
| Parameter Type | Parameter Name | Default Value | Optimization Range |
|---|---|---|---|
| MA Period | base_nb_candles_buy | 16 | 5-80 |
| Buy Offset | low_offset | 0.978 | 0.9-0.99 |
| EWO High Threshold | ewo_high | 5.638 | 2.0-12.0 |
| EWO Low Threshold | ewo_low | -19.993 | -20.0 to -8.0 |
| RSI Buy Threshold | rsi_buy | 61 | 30-70 |
| TTF Period | ttf_length | 15 | 1-50 |
| TTF Upper Trigger | ttf_upperTrigger | 100 | 1-400 |
| TTF Lower Trigger | ttf_lowerTrigger | -100 | -400 to -1 |
3.2 Buy Conditions Analysis
Condition #1: Trend Continuation Buy
# Logic
- Price below offset MA (close < ma_buy * low_offset)
- EWO at high level (EWO > ewo_high), indicating strong trend
- RSI not overbought (RSI < rsi_buy)
- Volume greater than 0
Interpretation: This condition captures pullback opportunities in an uptrend. When price falls below the offset MA, if EWO shows the trend remains strong and RSI is not overheated, it's a quality entry point.
Condition #2: Trend Reversal Buy
# Logic
- Price below offset MA (close < ma_buy * low_offset)
- EWO at low level (EWO < ewo_low), indicating oversold
- Volume greater than 0
Interpretation: This condition captures oversold bounce opportunities. When EWO is at extreme lows, the market may be oversold, presenting bounce opportunities.
3.3 Buy Condition Classification
| Condition Group | Condition # | Core Logic |
|---|---|---|
| Trend Continuation | #1 | Pullback buy + trend confirmation |
| Reversal Capture | #2 | Oversold buy + bounce expectation |
IV. Sell Logic Detailed Analysis
4.1 ROI Take Profit System
The strategy employs a stepped ROI take profit mechanism:
Holding Time Target Profit
────────────────────────
0 minutes 10%
30 minutes 5%
60 minutes 2%
4.2 Trailing Stop Mechanism
Activation Profit Offset Locked Profit
──────────────────────────────
Profit > 1% 0.1% Current profit - 0.1%
4.3 Sell Signals (2 signals)
Signal #1: SMA Offset Sell
# Sell signal 1: Offset MA breakout
- Price above offset MA (close > ma_sell * high_offset)
- Volume greater than 0
Interpretation: When price breaks above the offset MA, it's considered trend overheating, triggering profit taking.
Signal #2: TTF Trend Trigger Sell
# Sell signal 2: TTF crosses above trigger line
- TTF indicator crosses above 100 trigger line
- Volume greater than 0
Interpretation: TTF (Trend Trigger Factor) crossing above 100 indicates buying power has reached an extreme, suggesting potential reversal - a good time for profit taking.
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicator | Purpose |
|---|---|---|
| Trend | EMA (Exponential Moving Average) | Offset buy/sell line calculation |
| Oscillator | EWO (Elliott Wave Oscillator) | Trend strength assessment |
| Momentum | RSI (Relative Strength Index) | Overbought/oversold filtering |
| Trend | TTF (Trend Trigger Factor) | Trend extreme identification |
5.2 TTF Indicator Detailed Analysis
TTF (Trend Trigger Factor) is the core innovative indicator of this strategy:
def ttf(df, ttf_length):
buyPower = high.rolling(ttf_length).max() - low.shift(ttf_length).min()
sellPower = high.shift(ttf_length).max() - low.rolling(ttf_length).min()
ttf = 200 * (buyPower - sellPower) / (buyPower + sellPower)
return ttf
Calculation Logic:
- Buying Power: Current period's highest price - previous period's lowest price
- Selling Power: Previous period's highest price - current period's lowest price
- TTF Value: Normalized to -100 to +100 range
Interpretation: TTF > 100 indicates extremely strong buying power, possibly overheated; TTF < -100 indicates extremely strong selling power, possibly oversold.
5.3 Informational Timeframe Indicators (1h)
The strategy uses 1 hour as an informational layer, providing higher-dimensional trend assessment:
- Supports 1-hour level trend confirmation
- Can be used for multi-timeframe analysis
VI. Risk Management Features
6.1 Triple Buy Filtering
| Filter Layer | Indicator | Function |
|---|---|---|
| First Layer | EWO | Trend direction confirmation |
| Second Layer | RSI | Overbought/oversold filtering |
| Third Layer | Volume | Liquidity assurance |
6.2 Dynamic Trailing Stop
trailing_stop = True
trailing_stop_positive = 0.001
trailing_stop_positive_offset = 0.01
trailing_only_offset_is_reached = True
Protection Logic:
- Trailing stop activates after 1% profit
- Stop line follows price increase, locking 99.9% of profit
- Effectively protects existing gains
6.3 Only Sell When Profitable
sell_profit_only = True
sell_profit_offset = 0.01
Interpretation: The strategy only responds to sell signals when at least 1% profitable, avoiding exits during small losses.
VII. Strategy Advantages and Limitations
✅ Advantages
- Multi-dimensional Entry Assessment: Combines SMA offset, EWO, RSI triple filtering for more reliable entry signals
- Trend and Reversal Balance: Two buy conditions capture trend continuation and reversal opportunities
- Dynamic Exit Mechanism: TTF indicator provides trend extreme identification, combined with ROI and trailing stop for flexible exits
- Large Optimization Space: 11 tunable parameters, suitable for different market conditions
⚠️ Limitations
- High Parameter Sensitivity: Many tunable parameters, high overfitting risk
- Informational Timeframe Underutilized: Although 1h informational layer is defined, actual application in code is limited
- TTF Indicator Less Common: Limited community validation, real trading performance needs further observation
- Ranging Market Performance Questionable: Offset strategies may produce frequent false signals in sideways consolidation
VIII. Applicable Scenario Recommendations
| Market Environment | Recommended Configuration | Notes |
|---|---|---|
| Uptrend | Raise ewo_high | Trend continuation signals more effective |
| Downtrend | Lower ewo_low | Reversal signals need more extreme conditions |
| Ranging Market | Use with caution | Recommend reducing position size or pausing |
| High Volatility Coins | Appropriately widen stop loss | Give price more room to fluctuate |
IX. Applicable Market Environment Details
SMAOPv1_TTF is a trend-following strategy combining SMA offset and TTF trend trigger. Based on its code architecture and community experience, it performs best in clear trending markets, while potentially underperforming in sideways consolidation markets.
9.1 Strategy Core Logic
- SMA Offset Entry: Enter when price falls below MA by certain percentage, waiting for reversion
- EWO Trend Filtering: Use EWO to assess current trend strength, avoid counter-trend trading
- TTF Dynamic Exit: Exit promptly when TTF reaches extremes to prevent profit giveback
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Analysis |
|---|---|---|
| 📈 Uptrend | ⭐⭐⭐⭐⭐ | SMA offset captures pullbacks, TTF timely exits |
| 🔄 Ranging Market | ⭐⭐☆☆☆ | Frequent offset line touches, many false signals |
| 📉 Downtrend | ⭐⭐☆☆☆ | EWO low threshold can catch bounces, but higher risk |
| ⚡ High Volatility | ⭐⭐⭐☆☆ | Trailing stop protects profits, but may be triggered frequently |
9.3 Key Configuration Recommendations
| Configuration Item | Recommended Value | Notes |
|---|---|---|
| base_nb_candles_buy | 16-30 | Shorter period for faster pace, longer for stability |
| low_offset | 0.95-0.98 | Larger offset = more conservative entry |
| ttf_upperTrigger | 80-120 | Higher = more aggressive profit taking |
X. Important Note: The Cost of Complexity
10.1 Learning Cost
The strategy involves non-standard indicators like EWO and TTF, requiring time to understand their calculation logic and meaning.
10.2 Hardware Requirements
| Trading Pairs | Minimum Memory | Recommended Memory |
|---|---|---|
| 1-10 pairs | 2GB | 4GB |
| 10-50 pairs | 4GB | 8GB |
10.3 Backtesting vs Live Trading Differences
- EWO and TTF performance in backtesting may differ from live trading
- Recommend running on paper trading for at least 2 weeks
- Note trailing stop slippage impact in extreme market conditions
10.4 Manual Trading Recommendations
- Understand SMA offset concept: enter when price falls below MA by certain percentage
- Watch for TTF > 100 extreme signals
- EWO positive value indicates uptrend, negative indicates downtrend
XI. Summary
SMAOPv1_TTF is a trend-following strategy combining SMA offset, EWO trend filtering, and TTF dynamic exit. Its core value lies in:
- Multiple Filtering Mechanisms: SMA offset + EWO + RSI triple confirmation, reducing false signals
- Trend and Reversal Coverage: Two buy conditions cover different market phases
- Dynamic Exit System: TTF + ROI + trailing stop combination, protecting profits
For quantitative traders, this is a strategy suitable for trending markets, but requires parameter optimization for specific trading pairs and attention to risk control in ranging markets.