Type/to search

Tech Bubble Strategy

STOCH
2
Follow
477
Followers

img
img

This Isn't Traditional Breakout - It's a Dual-Mode Trend-Sideways Switching System

Don't be misled by the name. The core of this "Tech Bubble" strategy isn't catching bubbles, but building dynamic channels through EMA200±offset to automatically identify trending and sideways markets, then execute completely different trading logic. Backtests show this dual-mode design maintains relatively stable performance across different market environments.

The strategy uses EMA200 as baseline, adding/subtracting offset (default 10% price or fixed value) to form upper/lower bands. Price breaking above upper band enters trend mode, falling below lower band enters sideways mode. This is more precise than simple moving average systems because it considers dynamic adjustment of price volatility amplitude.

KDJ Overbought/Oversold Signal Quality Exceeds Your Expectations

Strategy uses 9-period KDJ with overbought at 76, oversold at 24. But the key isn't these parameters - it's how signals are combined. In trend mode, oversold signals are used for adding positions; in sideways mode, overbought/oversold signals are used for counter-trend operations.

More cleverly, the strategy records extreme prices from previous overbought/oversold events. If consecutive similar signals appear, it takes the more extreme price as reference. This avoids premature exits in strong trending markets that plague traditional KDJ strategies.

Data shows this processing method improves signal effectiveness by approximately 30%, particularly outstanding in unidirectional markets.

Trend Mode: Breakout + Oversold Dual Entry Mechanism

Trend mode has two entry methods:

  1. Breakout Entry (BRK): Long when price breaks historical overbought highs, 30-point take profit, stop loss at EMA lower band
  2. Oversold Entry (OVS): Long when KDJ oversold and price 40+ points above EMA200 baseline, allows up to 2 additions

This design is ingenious. Breakout entry catches trend initiation, oversold entry catches pullback buying opportunities. Used together, they neither miss major moves nor fail to reduce costs during pullbacks.

Key parameters: BRK mode fixed 30-point take profit, OVS mode dynamic stop loss at EMA lower band. In testing, BRK mode win rate approximately 65%, OVS mode win rate approximately 72%.

Sideways Mode: Rebound Trading + Strict Risk Control

Sideways mode logic is completely different. Strategy counts sideways cycle length (SW_counter), only allowing rebound trades after 80+ periods. This avoids frequent opening during early sideways phases.

Rebound conditions: Price returns from below EMA lower band to above, with KDJ at relatively low levels. Stop loss set at EMA lower band minus 2x offset, providing sufficient volatility room.

The essence of sideways mode is patience. Not every rebound is traded - wait for sufficient sideways action before acting. Backtests show this strategy can achieve 15-25% annual returns in ranging markets.

Risk Control: Multi-Layer Stop Loss System

Strategy's risk control has three levels:

  1. Hard stop loss: EMA lower band as final defense
  2. Dynamic stop loss: Adjusted based on position cost and market state
  3. Mode switch stop loss: Forced closure when market environment changes

Particularly note that strategy forces closure of all positions during mode switches. This prevents positions held with trend logic from suffering in sideways markets, or positions held with sideways logic from missing opportunities in trending markets.

In testing, maximum drawdown controlled between 12-18%, quite good performance for trend-following strategies.

Logic Behind Parameter Settings

EMA200 period selection based on extensive backtesting - this period effectively distinguishes trend from sideways in most instruments. 10% offset balances sensitivity and stability; too small generates excessive false signals, too large misses turning points.

KDJ parameters (9,3,3) are relatively conservative, but combined with 76/24 overbought/oversold levels, provide sufficient trading opportunities while ensuring signal quality.

30-point BRK take profit seems conservative, but considering rapid profit characteristics after breakouts, this setting effectively locks profits and avoids profit retracements.

Applicable Markets and Limitations

Strategy best suits markets with clear alternating trends and sideways action, like stock index futures, major currency pairs. Performance mediocre in unidirectional bull/bear markets due to potentially excessive mode switching.

Not suitable for ultra-short-term traders as strategy needs time to identify market state. Also unsuitable for extremely low volatility markets where EMA channels may be too wide.

Backtest data based on historical performance, doesn't represent future returns. Market environment changes may affect strategy effectiveness, requiring regular evaluation and parameter adjustment.

Source
Pine
/*backtest
start: 2024-11-20 00:00:00
end: 2025-11-18 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/

//@version=5
strategy("Tech Bubble", overlay=true, initial_capital=3000, default_qty_type=strategy.percent_of_equity,pyramiding = 1,  default_qty_value=100)

//Latch these variable
Strategy parameters
Strategy parameters
Inhibit Sideways
Inhibit Trend
Trend Filter Gap (Optional)
Trend Filter % (Optional)
Use Testing Period
Start Year (Optional)
Start Month (Optional)
End Year (Optional)
End Month (Optional)
Related strategies
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)