Strategy vault / Mean reversion
Dual Smoothed Stochastic Bressert Strategy
The Dual Smoothed Stochastic Bressert strategy is designed by William Blau. It attempts to combine moving average methods with oscillator principles. The strategy generates trading signals by calculating a series of…

Overview
The Dual Smoothed Stochastic Bressert strategy is designed by William Blau. It attempts to combine moving average methods with oscillator principles.
The strategy generates trading signals by calculating a series of dual smoothed stochastic indices. Specifically, it first calculates the smoothed stochastic index of prices, and then applies a smooth average to this stochastic index again to obtain the "dual smoothed stochastic index". When the trigger line crosses the dual smoothed stochastic index, buy or sell signals are generated.
Principle
- Calculate the PDS period smoothed stochastic index xPreCalc of prices
- Apply an EMAlen exponential moving average to xPreCalc to obtain xDSS, i.e., the "dual smoothed stochastic index"
- Calculate the trigger line xTrigger, which is another EMA line of xDSS
- Generate trading signals:
- Go long when xTrigger is below xDSS and below the oversold line
- Go short when xTrigger is above xDSS and above the overbought line
- Plot the curves of dual smoothed stochastic index xDSS and trigger line xTrigger
Pros
The strategy combines the trend following capability of moving averages and the overbought/oversold identification capability of stochastic indices. The main advantages are:
- Dual smoothing filters false signals and improves stability
- Trigger line generates trading signals and avoids frequent trading
- Customizable parameters adapt to different market conditions
- Intuitive graphics for easy grasping and validation of the strategy
Risks
The Dual Smoothed Stochastic Bressert Strategy also has some risks:
- More false signals of Bressert indicator in low volatile markets
- Dual smoothing may cause signal lag, missing price turning points
- Improper parameter settings may fail to identify price swings
- Trading risk still exists
Countermeasures:
- Optimize parameters to improve accuracy
- Filter signals with other indicators
- Use position sizing to hedge risks
Optimization
The strategy can also be optimized in the following aspects:
- Adjust the cycle parameters of the dual smoothed index to optimize the smoothing effect
- Add stop loss mechanisms to control single loss
- Add trend judgment indicators to avoid reverse operation
- Use position sizing to maximize profit space
Conclusion
The Dual Smoothed Stochastic Bressert Strategy combines the advantages of moving averages and stochastic indices for identifying overbought/oversold points and following trends. Setting up dual smoothing and trigger lines can effectively filter out noisy signals. However, parameter optimization and risk control are still needed to obtain steady gains in live trading.
Parameters
| Name | Default | What it controls |
|---|---|---|
| v_input_1 | 10 | PDS |
| v_input_2 | 9 | EMAlen |
| v_input_3 | 5 | TriggerLen |
| v_input_4 | 80 | Overbought |
| v_input_5 | 20 | Oversold |
| v_input_6 | false | Trade reverse |
Source Pine Script
/*backtest
start: 2024-01-05 00:00:00
end: 2024-02-04 00:00:00
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 05/04/2017
// Double Smoothed Stochastics (DSS) is designed by William Blaw.
// It attempts to combine moving average methods with oscillator principles.
//
// You can change long to short in the Input Settings
// Please, use it only for learning or paper trading. Do not for real trading.
////////////////////////////////////////////////////////////
strategy(title="DSS Bressert (Double Smoothed Stochastic)", shorttitle="DSS Bressert")
PDS = input(10, minval=1)
EMAlen = input(9, minval=1)
TriggerLen = input(5, minval=1)
Overbought = input(80, minval=1)
Oversold = input(20, minval=1)
reverse = input(false, title="Trade reverse")
hline(Overbought, color=green, linestyle=line)
hline(Oversold, color=red, linestyle=line)
xPreCalc = ema(stoch(close, high, low, PDS), EMAlen)
xDSS = ema(stoch(xPreCalc, xPreCalc, xPreCalc, PDS), EMAlen)
//xDSS = stoch(xPreCalc, xPreCalc, xPreCalc, PDS)
xTrigger = ema(xDSS, TriggerLen)
pos = iff(xTrigger < xDSS and xTrigger < Oversold, -1,
iff(xTrigger > xDSS and xTrigger > Overbought, 1, nz(pos[1], 0)))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1, 1, pos))
if (possig == 1)
strategy.entry("Long", strategy.long)
if (possig == -1)
strategy.entry("Short", strategy.short)
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
plot(xDSS, color=blue, title="DSS")
plot(xTrigger, color=red, title="Trigger")Published by ChaoZhang on the FMZ strategy square · last modified 2024-02-05. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Dual-Smoothed-Stochastic-Bressert-Strategy.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- Advanced 15 Minute Chart Trading Signal StrategyPine Script · Mean reversion · 3h
- Dynamic Adaptive Multi Timeframe Trend Following and Range Reversal Hybrid StrategyPine Script · Mean reversion · 2d
- Multi Strategy Technical Analysis Trading SystemPine Script · Mean reversion · 1d
- Oma and Apollo Dual Rail Trading StrategyPine Script · Mean reversion · 5m
- Stochastic Moving Average StrategyPine Script · Mean reversion · 1h
- 3EMA with Stochastic RSI StrategyPine Script · Mean reversion · 1h