← Back to Home
Flow-Fueled Momentum - Price–Volume Thrust with RSI Guardrails

Flow-Fueled Momentum - Price–Volume Thrust with RSI Guardrails

Momentum that arrives with real participation tends to travel farther. This composite model aligns four simple conditions before committing capital: trend context (price vs. MA), directional thrust (lookback momentum), participation (volume vs. its mean), and a momentum health check (RSI within non-extreme bounds). Positions are managed by ratcheting trailing stops that only move in the trade’s favor.

Main Logic (strategy loop only)

def next(self):
    px = self.data.close[0]

    # Manage existing positions with ratcheting trailing stops
    if self.position.size > 0:  # long
        if self.highest_price is None or px > self.highest_price:
            self.highest_price = px
            self.trailing_stop_long = px * (1 - self.p.trailing_percent / 100)
        if px <= self.trailing_stop_long:
            self.close()
            self.highest_price = None
            self.trailing_stop_long = None

    elif self.position.size < 0:  # short
        if self.lowest_price is None or px < self.lowest_price:
            self.lowest_price = px
            self.trailing_stop_short = px * (1 + self.p.trailing_percent / 100)
        if px >= self.trailing_stop_short:
            self.close()
            self.lowest_price = None
            self.trailing_stop_short = None

    # New entries only when flat
    if self.position.size == 0:
        price_above_ma  = px > self.price_ma[0]
        price_below_ma  = px < self.price_ma[0]
        strong_volume   = self.volume_ratio[0] > self.p.volume_threshold
        pos_mom         = self.price_momentum[0] >  self.p.momentum_threshold
        neg_mom         = self.price_momentum[0] < -self.p.momentum_threshold
        rsi_ok_long     = self.rsi[0] > self.p.rsi_oversold and self.rsi[0] < self.p.rsi_overbought
        rsi_ok_short    = self.rsi[0] < self.p.rsi_overbought and self.rsi[0] > self.p.rsi_oversold

        # Long: trend up + positive thrust + real participation + RSI not stretched
        if price_above_ma and pos_mom and strong_volume and rsi_ok_long:
            self.buy()
            self.highest_price = px
            self.trailing_stop_long = px * (1 - self.p.trailing_percent / 100)

        # Short: trend down + negative thrust + real participation + RSI not stretched
        elif price_below_ma and neg_mom and strong_volume and rsi_ok_short:
            self.sell()
            self.lowest_price = px
            self.trailing_stop_short = px * (1 + self.p.trailing_percent / 100)

Why it holds up

Tuning levers

Performance Snapshot (SOL-USD, 2018–2025, 12-month rolling windows)

Pasted image 20250815214818.png

This reads as a high-volatility, asymmetric payoff profile — the losers are small, but the winners are massive. The key challenge would be enduring sideways or flat years without giving back gains.

If you want, I can now write this as part of a full article with the strategy logic snippet, similar to your last request.