Gaussian Trend Targets | Supertrend Strategy w/ 3R Exits

Gaussian Trend Targets is a trend-following supertrend strategy built around a smoothed baseline, filtered entries and a defined exit plan. It enters on a trend flip and manages the trade with a stop and three profit targets sized in R, where 1R is the distance from entry to stop. The goal is a clean, rules-based way to test supertrend flips with disciplined risk, not a signal generator.
How it works
1. Trend engine
The baseline is the median of price over a lookback window, then smoothed with a Gaussian-weighted filter. This removes single-bar noise from the center line. ATR bands, or optionally Gaussian-deviation bands, are placed around it and ratchet in the direction of the trend like a classic supertrend. A close through the opposite band flips the trend.
2. Entry
A trade is considered on the close of the flip bar. Three optional filters can veto it:
RMI momentum: the average of RSI and MFI. Longs need it above a threshold and shorts below one.
Regime filter: long only above a slow WMA, short only below it.
Higher-timeframe EMA: trade only in the direction of a higher-timeframe trend. It uses the previous closed higher-timeframe bar, so it doesn’t repaint.
3. Stop and position size
The initial stop can be the trend band, an ATR distance from entry, or a recent swing high/low, plus a small ATR buffer. A minimum stop distance prevents oversized positions on tight stops. Position size is set so that a stop-out costs a fixed percentage of equity. A notional cap limits leverage.
4. Exits
Features
Tips
Warnings
How it works
1. Trend engine
The baseline is the median of price over a lookback window, then smoothed with a Gaussian-weighted filter. This removes single-bar noise from the center line. ATR bands, or optionally Gaussian-deviation bands, are placed around it and ratchet in the direction of the trend like a classic supertrend. A close through the opposite band flips the trend.
2. Entry
A trade is considered on the close of the flip bar. Three optional filters can veto it:
RMI momentum: the average of RSI and MFI. Longs need it above a threshold and shorts below one.
Regime filter: long only above a slow WMA, short only below it.
Higher-timeframe EMA: trade only in the direction of a higher-timeframe trend. It uses the previous closed higher-timeframe bar, so it doesn’t repaint.
3. Stop and position size
The initial stop can be the trend band, an ATR distance from entry, or a recent swing high/low, plus a small ATR buffer. A minimum stop distance prevents oversized positions on tight stops. Position size is set so that a stop-out costs a fixed percentage of equity. A notional cap limits leverage.
4. Exits
- TP1 / TP2: partial exits, 40% and 30% by default, at 1R and 2R.
- Runner: the remainder exits at a fixed 3R, or trails the band with no fixed target.
- Stop management: after TP1 the stop moves to break-even. After TP2 it locks the TP1 level.
- Opposite flip: an opposite flip always closes the open trade.
Features
- Median-Gaussian baseline, with ATR or Gaussian-deviation bands
- Three optional entry filters (RMI, regime WMA, higher-timeframe EMA)
- Three stop methods, with a buffer and a minimum distance
- Risk-percent position sizing with a leverage cap
- Three scale-out targets, break-even and lock rules, and a band-trailing runner
- Long-only, short-only or both directions, plus an optional date range
- Optional late entry once per trend leg, when a filter blocked the flip bar
- On-chart trade map: stop, entry and targets with shaded risk and reward zones, right-edge labels, and markers for target and stop hits
- Trend-colored candles that brighten as price moves away from the band
- Optional EMA ribbon
- Four color modes (Standard, Nordic, Warm, Simple)
- A compact stats table showing how often past signals reached 1R, 2R and 3R, and how often they ended before 1R
Tips
- Start with realistic costs. The defaults are 0.05% commission and 2 ticks of slippage. Set them to match your market and broker before judging any result.
- Match the settings to the market.
- The ATR multiplier controls the trade-off between sensitivity and whipsaws. A higher value gives fewer, slower flips.
- Gaussian length and sigma control how smooth the baseline is.
- Trending markets and higher timeframes generally suit this approach better than choppy ranges.
- Test the filters one at a time. Turn each on separately and compare, rather than stacking everything at once.
- Try both runner modes. Fixed TP3 gives more predictable results. Trail band can capture longer trends but gives back more at reversals.
- Use the stats table. If few signals reach 1R, the stop is likely too wide relative to the target or the market is too choppy for this trend setup.
- Check the Strategy Tester’s list of trades, not just the equity curve, to see how the scale-outs behaved.
- Keep risk small. Around 1% per trade is the default for a reason.
Warnings
- This is a backtest tool, not a prediction. Past results do not indicate future performance. Nothing here is financial advice, and trading carries a real risk of loss.
- Backtests are approximations. Fills are simulated on closed bars. When a stop and a target fall inside the same bar, the real order of events is unknown. The stats table assumes the stop was hit first.
- The table’s hit rates are theoretical. They are based on price touching the levels, so they differ somewhat from the Strategy Tester, which includes slippage and commission.
- Overfitting risk. Many adjustable inputs make it easy to find settings that look great on past data and fail going forward. Test on different symbols, timeframes and periods.
- Small samples mislead. A handful of trades says very little. Look for a large, consistent sample.
- Gaps and fast markets can fill stops and targets at worse prices than shown.
- Futures and leveraged instruments: sizing uses the symbol’s point value. Check that the quantities and leverage match what you would actually trade.
- Volume: if a symbol has no volume data, the RMI filter falls back to RSI alone.
- The first bars on a chart are skipped until every indicator has enough history.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.