Supertrend + Stoch Strategy
Oct 20, 2021

The Supertrend + Stoch Strategy tool is a trend-following trading system designed to identify high-probability entries by combining multi-period Exponential Moving Averages (EMAs), the Supertrend indicator, and Stochastic momentum oscillators.
Usage
The strategy is primarily used to trade trend continuations on higher timeframes like the 1D or 4H. It relies on a three-step confirmation process:
- Trend Filter: The script checks if multiple EMAs (25, 50, 100, 200) are aligned in a specific order to confirm a established bull or bear market.
- Volatility Filter: The Supertrend must align with the detected trend direction.
- Momentum Trigger: A long or short position is initiated when the Stochastic %K line crosses the %D line within the established trend.
Risk management is automated within the script. When a signal is triggered, it calculates a stop-loss based on the previous swing extreme (the lowest low/highest high of the last Stochastic interval) and sets a take-profit target based on a user-defined profit-to-loss ratio.
Details
The script utilizes a hierarchical filtering approach to minimize false signals. By requiring the faster EMAs (25/50) to be above/below the slower EMAs (100/200), the strategy ensures it only trades during periods of clear directional momentum. The inclusion of the Supertrend provides a secondary layer of trend confirmation based on ATR-derived volatility. Finally, the Stochastic crossover acts as the timing mechanism, aiming to enter trades during brief pullbacks or "dips" within the primary trend.
Settings
Strategy Parameters
- P/L: Sets the reward-to-risk ratio (e.g., 1.5 means the target is 1.5x the distance of the stop loss).
- Loss Percentage: Determines the position size based on a percentage of the total equity relative to the stop-loss distance.
Supertrend
- ATR Length: The lookback period for the Average True Range calculation.
- Supertrend Factor: The multiplier applied to the ATR to determine the distance of the Supertrend line from the price.
Stochastic
- %K Length: The lookback period for the raw Stochastic calculation.
- %K Smoothing: The length of the SMA used to smooth the %K line.
- %D Smoothing: The length of the SMA used to calculate the %D signal line.
EMAs
- EMA 1 - 4 Length: Customizable periods for the four Exponential Moving Averages used for trend filtering.
FAQ
How do I access the Supertrend + Stoch Strategy?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Which timeframes work best for this strategy?
The strategy is optimized for the Daily (1D) timeframe, particularly for cryptocurrency pairs. While it can be used on the 4H timeframe, users should adjust the parameters and consider the impact of exchange commissions on smaller timeframes.
How is the stop-loss level calculated?
The stop-loss is dynamically calculated based on the price extremes ("Edge") formed during the period where the Stochastic %K was on the opposite side of the %D line, providing a logical structural exit point.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.