EWOWithSL Strategy Analysis
Strategy ID: Community Strategy
Strategy Type: Momentum Indicator + Stop-Loss Protection
Timeframe: 15 Minutes / 1 Hour
I. Strategy Overview
EWOWithSL (Elliott Wave Oscillator with Stop Loss) is a trend-following strategy based on the Elliott Wave Oscillator (EWO). Its core feature is the addition of strict stop-loss protection on top of the EWO zero-axis crossover signal. The strategy name directly reflects its design philosophy: use EWO to capture trend reversals and stop-loss to control risk exposure.
The strategy is suitable for scenarios pursuing simple trading logic and disciplined execution. It identifies trend reversal points through EWO momentum changes and manages downside risk through a dual-layer protection mechanism of fixed and trailing stops.
Core Characteristics
| Feature | Description |
|---|---|
| Buy Conditions | 1 core buy signal (EWO crosses above zero) |
| Sell Conditions | 1 base sell signal (EWO crosses below zero) + stop-loss trigger |
| Protection | Fixed stop-loss + trailing stop (dual-layer protection) |
| Timeframe | 15 Minutes / 1 Hour |
| Dependencies | TA-Lib |
II. Strategy Configuration Analysis
2.1 Basic Risk Parameters
# ROI Exit Table
minimal_roi = {
"0": 0.08, # Immediate exit: 8% profit
"60": 0.04, # After 60 minutes: 4% profit
"180": 0.02 # After 180 minutes: 2% profit
}
# Stop-Loss Settings
stoploss = -0.03 # -3% hard stop-loss
Design Philosophy:
- Graded take-profit: Uses time-decreasing ROI table; the longer the holding time, the lower the threshold, balancing quick profit-locking and potential gains from trend continuation
- Strict stop-loss: The 3% stop-loss threshold is relatively tight, enabling quick exit on wrong judgments to protect principal
2.2 Trailing Stop Configuration
trailing_stop = True
trailing_stop_positive = 0.02
trailing_stop_positive_offset = 0.04
Configuration Notes:
- Activates trailing stop when profit reaches 4%
- Trailing stop distance is 2%
- This configuration locks in profit while giving trends some pullback room
III. Entry Conditions Details
3.1 Core Buy Logic
The strategy employs a single buy signal with simple and clear logic:
dataframe.loc[
(
(dataframe['ewo'].shift(1) < 0) & # Previous day's EWO was negative
(dataframe['ewo'] > 0) & # Today's EWO turns positive
(dataframe['volume'] > 0) # Volume confirms signal
),
'buy'
] = 1
Logic Breakdown:
| Condition | Meaning | Technical Significance |
|---|---|---|
ewo.shift(1) < 0 | Previous EWO was negative | Short MA below long MA, bearish momentum dominant |
ewo > 0 | Today's EWO turns positive | Short MA crosses above long MA, bullish momentum strengthening |
volume > 0 | Volume present | Ensures market liquidity, filters false signals |
3.2 EWO Zero-Axis Crossover Buy Signal Trigger
The essence of the EWO zero-axis crossing above is the short MA crossing above the long MA, indicating a change in momentum direction:
- Before signal trigger: Short SMA(5) < long SMA(35), EWO is negative, bearish momentum dominant
- At signal trigger: Short SMA(5) crosses above long SMA(35), EWO turns from negative to positive, bullish momentum confirmed
IV. Exit Conditions Details
4.1 Base Sell Signal
dataframe.loc[
(
(dataframe['ewo'].shift(1) > 0) & # Previous day's EWO was positive
(dataframe['ewo'] < 0) # Today's EWO turns negative
),
'sell'
] = 1
Logic Breakdown: EWO turning from positive to negative indicates the short MA has fallen below the long MA, bullish momentum is exhausted, and bearish momentum is starting to dominate.
4.2 Stop-Loss Exit Mechanism
| Exit Type | Trigger Condition | Role |
|---|---|---|
| Hard stop-loss | Loss >= 3% | Limit maximum single-trade loss |
| Trailing stop | Profit >= 4% then retraces 2% | Lock in partial profit |
4.3 ROI Graded Take-Profit
Holding Time Profit Threshold Behavior
───────────────────────────────────────────
0 minutes 8% Immediate exit
60 minutes 4% Exit
180 minutes 2% Exit
Design Intent:
- New positions are given sufficient upward space (8% target) at entry
- As holding time increases, gradually lower profit expectations to avoid profit pullback
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicator | Purpose |
|---|---|---|
| Trend Indicator | EWO (Elliott Wave Oscillator) | Momentum direction judgment, trend reversal identification |
| Confirmation Indicator | Volume | Signal validity confirmation |
5.2 EWO Indicator Calculation
# EWO Calculation
fast_sma = ta.SMA(dataframe, timeperiod=5) # Short MA
slow_sma = ta.SMA(dataframe, timeperiod=35) # Long MA
dataframe['ewo'] = fast_sma - slow_sma # EWO value
Indicator Characteristics:
| Parameter | Value | Description |
|---|---|---|
| Short MA period | 5 | Rapid response to price changes |
| Long MA period | 35 | Smooths noise, identifies main trend |
| Zero axis | EWO = 0 | Bull/bear dividing line |
EWO Value Interpretation:
| EWO State | Meaning | Trading Signal |
|---|---|---|
| EWO > 0 and rising | Bullish momentum strengthening | Hold or buy |
| EWO > 0 and falling | Bullish momentum weakening | Watch for reversal |
| EWO < 0 and falling | Bearish momentum strengthening | Exit or sell |
| EWO < 0 and rising | Bearish momentum weakening | Wait for reversal signal |
VI. Risk Management Highlights
6.1 Fixed Stop-Loss Mechanism
stoploss = -0.03 # 3% hard stop-loss
Characteristics:
- Threshold setting is moderate, providing adequate normal market volatility room while effectively controlling single-trade loss
- The 3% stop-loss amplitude is relatively tight in momentum strategies, reflecting strict risk control discipline
6.2 Trailing Stop Mechanism
trailing_stop = True
trailing_stop_positive = 0.02
trailing_stop_positive_offset = 0.04
Mechanism Notes:
- Activation condition: Profit reaches 4% (
trailing_stop_positive_offset) - Trailing distance: 2% retracement from the highest point (
trailing_stop_positive) - Purpose: Protect principal while allowing profits to grow with the trend
6.3 Dual-Layer Protection Logic
Entry price
│
├── Loss 3% → Hard stop-loss exit (principal protection)
│
└── Profit >= 4%
│
└── Retrace 2% → Trailing stop exit (lock in profit)
VII. Strategy Pros & Cons
Advantages
- Simple logic: Single technical indicator, clear buy/sell conditions, no complex parameter tuning required
- Strict risk control: Fixed stop-loss + trailing stop dual-layer protection, controllable risk
- Strong adaptability: Applicable across multiple timeframes, flexibly adjustable based on trading style
- Intuitive signals: EWO zero-axis crossover signals are easy to understand and execute
Limitations
- Poor performance in oscillating markets: Frequent EWO crossovers during consolidation, easily generating consecutive losing signals
- Lacks filtering mechanism: No additional technical indicator confirmation, limited single-signal reliability
- Lagging issues: MA is inherently a lagging indicator; entry points may lag the trend start
- Fixed parameters: SMA(5,35) parameters are hardcoded, not dynamically adjusted based on market volatility
VIII. Applicable Scenarios
| Market Environment | Recommended Configuration | Description |
|---|---|---|
| Clear uptrend | Enable trailing stop | Let profits grow with the trend |
| Clear downtrend | Exit or reverse operation | Wait for trend reversal signals |
| Oscillating consolidation | Disable or widen stop-loss | Avoid frequent stop-losses |
| High volatility market | Widen stop-loss threshold | Avoid being stopped out by normal volatility |
IX. Applicable Market Environment Details
EWOWithSL is a simple trend-following strategy. Based on its code architecture and logic, it is best suited for markets with clear trends and performs poorly during oscillation and consolidation.
9.1 Core Strategy Logic
- Trend identification: Determine trend reversal points through EWO zero-axis crossover
- Risk control: Manage downside risk through fixed and trailing stops
- Signal confirmation: Volume confirmation ensures market liquidity
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Analysis |
|---|---|---|
| Clear trend | Excellent | EWO effectively captures trend reversals; stop-loss protection controls risk |
| Oscillating consolidation | Below Average | Frequent crossovers produce false signals; repeated stop-losses |
| Unilateral decline | Moderate | Can exit quickly but consecutive signals may cause cumulative losses |
| High volatility oscillation | Very Poor | Increased noise trading; frequent stop-loss triggers |
9.3 Key Configuration Suggestions
| Configuration Item | Suggested Value | Description |
|---|---|---|
| Timeframe | 1 hour and above | Longer cycles filter some noise |
| Stop-loss threshold | -0.03 ~ -0.05 | Adjust based on trading pair volatility |
| Trading pair selection | Pairs with strong trends | Avoid selecting targets in long-term consolidation |
X. Summary
EWOWithSL is a simple trend-following strategy based on the Elliott Wave Oscillator. It captures trend reversal points through EWO zero-axis crossover and protects principal through a dual-layer mechanism of fixed and trailing stops. Its core value lies in:
- Simplicity: Single technical indicator, clear logic, easy to understand and execute
- Discipline: Clear stop-loss rules, mandatory risk control execution
- Adaptability: Multi-timeframe applicability, flexible adjustment based on trading style
For quantitative traders, EWOWithSL is suitable as an entry-level trend-following strategy or as a trend signal component in multi-strategy portfolios. However, be mindful of its limitations in oscillating markets, and it is recommended to use it in conjunction with market environment assessment and money management principles.
Core Recommendation: Enable in markets with clear trends; exit and observe or switch to other strategies during oscillation. Strictly enforce stop-loss discipline; avoid frequent trading in unfavorable market conditions.