TopTrend (BBands Stop)
Category: trend, volatility
A trend-following trail stop indicator based on Bollinger Bands volatility. It locks and trails the upper/lower bands to define trend bias and exit levels.
Formula
1. Upper Band(UB) = SMA(Length) + Dev * StdDev; Lower Band(LB) = SMA(Length) - Dev * StdDev \n2. Trend = +1 if Close > UB[prev], -1 if Close < LB[prev] \n3. Offset = 0.5 * (MoneyRisk - 1) * (UB - LB) \n4. StopLevel (Up) = Max(LB - Offset, PrevStop); StopLevel (Down) = Min(UB + Offset, PrevStop)
Inputs
- Length (default: 20)
- Deviation (default: 2)
- MoneyRisk (default: 1.00)
- Signal (default: 1)
- Nbars (default: 1000)
See signal primitives and every published strategy that uses TopTrend (BBands Stop) on WOBR StrategyVerse.