The Stochastic HMA Strategy is a versatile trading strategy designed for trend-following and momentum-based trading. It combines the Stochastic Oscillator with the Hull Moving Average (HMA) to identify potential entry and exit points.
This strategy also includes optional filters such as RSI, ADX, MFI, EMA, VWAP, and ATR to refine trade signals.
Core Components
- Stochastic Oscillator: Measures momentum by comparing a particular closing price to a range of its prices over a certain period. The %K and %D lines are used to identify overbought and oversold conditions.
- Hull Moving Average (HMA): A faster and smoother moving average used to identify trend direction.
Entry Conditions
Long Entry
Triggered when the Stochastic Oscillator crosses above the oversold level within a specified window of bars and the short HMA crosses above the long HMA. Additional filters (RSI, ADX, MFI, VWAP, ATR) can be applied to confirm the signal.
Short Entry
Triggered when the Stochastic Oscillator crosses below the overbought level within a specified window of bars and the short HMA crosses below the long HMA. Similar filters can be applied.
Exit Strategy
Take Profit and Stop Loss
The strategy employs a two-level take profit system:
TP1: A portion of the position is closed when the first take profit level is hit.
TP2: The remaining position is closed at the second take profit level or if the stop loss, adjusted to the TP1 level after hitting TP1, is hit.
Stop Loss: The stop loss is initially set based on the input percentage of the entry price. After hitting TP1, the stop loss is moved to the TP1 level to protect gains.
Optional Filters
- RSI Filter: Trades are only taken when the RSI is below (for longs) or above (for shorts) certain thresholds.
- ADX Filter: Ensures that trades are only taken in markets with a certain level of directional movement.
- MFI Filter: Adds a volume-based momentum filter to the entry conditions.
- EMA Confirmation: Confirms trades only if the price is above (for longs) or below (for shorts) a specified EMA.
- VWAP Filter: Confirms trades based on the relationship between price and VWAP.
- ATR Filter: Adds a volatility filter to ensure trades are taken only in volatile conditions.
Use Cases
This strategy is ideal for traders looking to combine momentum indicators with trend-following techniques. It is versatile enough to be used across various timeframes and assets, with customizable filters to suit different market conditions.