A breakout is only worth chasing when momentum and trend agree. The Elder Impulse framework blends a rising EMA slope with a strengthening MACD histogram to define impulse. A Bollinger-band pierce provides structural confirmation, a long-trend SMA filters direction, and exits are prioritized: take-profit at distance, volatility collapse to avoid dead tape, and an ATR trail to protect gains.
Impulse block: EMA slope and MACD histogram slope in the same
direction
Structure: close beyond Bollinger bands
Trend filter: price vs. SMA
Risk: ATR-based trailing stop plus fixed ATR take-profit
Disengage: volatility collapse via rolling standard deviation normalized
by price
def next(self):
if self.order:
return
if not self.position:
= self.impulse_ema[0] > self.impulse_ema[-1]
ema_up = self.macd_histo[0] > self.macd_histo[-1]
hist_up = not ema_up
ema_dn = not hist_up
hist_dn
= ema_up and hist_up
bull_imp = ema_dn and hist_dn
bear_imp
= self.data.close[0] > self.trend_sma[0]
uptrend = self.data.close[0] < self.trend_sma[0]
downtrend
= self.data.close[0] > self.bband.top[0]
bb_up = self.data.close[0] < self.bband.bot[0]
bb_dn
if bull_imp and uptrend and bb_up:
self.order = self.buy()
elif bear_imp and downtrend and bb_dn:
self.order = self.sell()
else:
= (self.stddev[0] / self.data.close[0]) < self.p.vol_exit_threshold
vol_collapse
if self.position.size > 0: # long
# 1) take-profit
if self.data.high[0] >= self.take_profit_price:
self.order = self.close(); return
# 2) volatility collapse
if vol_collapse:
self.order = self.close(); return
# 3) ATR trail
self.highest_price_since_entry = max(self.highest_price_since_entry, self.data.high[0])
= self.highest_price_since_entry - self.atr[0] * self.p.atr_stop_multiplier
new_stop self.stop_price = max(self.stop_price, new_stop)
if self.data.close[0] < self.stop_price:
self.order = self.close()
elif self.position.size < 0: # short
# 1) take-profit
if self.data.low[0] <= self.take_profit_price:
self.order = self.close(); return
# 2) volatility collapse
if vol_collapse:
self.order = self.close(); return
# 3) ATR trail
self.lowest_price_since_entry = min(self.lowest_price_since_entry, self.data.low[0])
= self.lowest_price_since_entry + self.atr[0] * self.p.atr_stop_multiplier
new_stop self.stop_price = min(self.stop_price, new_stop)
if self.data.close[0] > self.stop_price:
self.order = self.close()
Impulse alignment reduces false breakouts; the band pierce ensures structural expansion; the trend gate enforces directional bias; and the exit hierarchy captures convexity while cutting dead time when volatility compresses.
Increase bb_devfactor
to curb shallow pierces, or
lengthen bb_period
to emphasize slower expansions. Tighten
vol_exit_threshold
to leave coils earlier; widen
atr_tp_multiplier
for fatter tails; adjust
atr_stop_multiplier
to trade off staying power
vs. giveback.
Performance: Exceptionally strong with a total return of +20,504%, driven by multiple triple-digit yearly gains.
Consistency: Mean return per window of +158.63% and a median close to that at +147.04%, showing a balanced distribution of high returns.
Volatility: High (std dev ≈ 141%) — large swings both up and down, typical for crypto momentum strategies.
Downside Risk: Largest loss in a rolling year was -25.81%, indicating relatively contained drawdowns compared to upside.
Win Rate: Very high at 85.7% — most rolling windows were profitable.
Sharpe Ratios:
Per window: 1.12 (strong risk-adjusted return for crypto).
Total-period: 1.02 (also solid for a high-volatility asset).
Standout Year: Best window hit +369.1%, worst was -25.8%.
Overall, this is a high-volatility, high-return breakout profile with an excellent hit rate and relatively modest drawdowns given the aggressive upside capture.