Trend Bars
Category: trend
A chart overlay that colors price bars/candles based on their position relative to a Moving Average channel of Highs and Lows.
Formula
\text{Upper Band} = MA(\text{High}, P) \\ \text{Lower Band} = MA(\text{Low}, P) \\ \text{Trend} = \begin{cases} \text{Up} & \text{if } \text{Close} > \text{Upper Band} \\ \text{Down} & \text{if } \text{Close} < \text{Lower Band} \\ \text{Neutral} & \text{otherwise} \end{cases}
Inputs
- MaChannel.Periods (default: 100)
- MaChannel.Method (default: SMA* | LWMA | EMA | SMMA | ALMA)
- Color.UpTrend (default: Blue)
- Color.DownTrend (default: Red)
- Color.NoTrend (default: Silver)
- BarWidth (default: 2)
See signal primitives and every published strategy that uses Trend Bars on WOBR StrategyVerse.