Strategy Lab
Volatility Band Return rules and sample replay
This Crown Pips research variant looks for a close back inside a volatility envelope after the previous candle closed outside it.
Crown Pips · Reviewed
Walkthrough
- On each candle, take the average of the latest five closes. Place the bands 1.5 population standard deviations above and below that mean.
- Compare each closing price with the bounds calculated for that same candle. Require a strictly outside previous close and a current close strictly inside both bands.
- A return from below records a long study. A return from above records a short study. Flat bands, touches and jumps across the entire envelope produce WAIT.
Worked example
For closes of 100, 100, 100, 100, 90 and 99, the lower band for the fifth candle is 92. The close of 90 is outside. The next close of 99 is back inside its updated bands.
Replay the rule
Fictional M15 candles. Each decision uses only bars completed at that point.
- Bar 1 · WAIT · Close 103
Need 6 completed bars including the decision bar.
- Bar 2 · WAIT · Close 101
Need 6 completed bars including the decision bar.
- Bar 3 · WAIT · Close 102
Need 6 completed bars including the decision bar.
- Bar 4 · WAIT · Close 101
Need 6 completed bars including the decision bar.
- Bar 5 · WAIT · Close 100
Need 6 completed bars including the decision bar.
- Bar 6 · WAIT · Close 101
A strictly outside close followed by a close inside both bands is required.
- Bar 7 · WAIT · Close 104
A strictly outside close followed by a close inside both bands is required.
- Bar 8 · SHORT STUDY · Close 103
The previous close was above its upper band. This close is back inside.
- Bar 9 · WAIT · Close 104
A strictly outside close followed by a close inside both bands is required.
- Bar 10 · WAIT · Close 100
A strictly outside close followed by a close inside both bands is required.
- Bar 11 · WAIT · Close 102
A strictly outside close followed by a close inside both bands is required.
- Bar 12 · WAIT · Close 103
A strictly outside close followed by a close inside both bands is required.
- Bar 13 · WAIT · Close 110
A strictly outside close followed by a close inside both bands is required.
- Bar 14 · SHORT STUDY · Close 109
The previous close was above its upper band. This close is back inside.
- Bar 15 · WAIT · Close 102
A strictly outside close followed by a close inside both bands is required.
- Bar 16 · WAIT · Close 99
A strictly outside close followed by a close inside both bands is required.
In the Crown Pips Telegram bot, send /tactics band-return 8 for this candle.
What to keep in mind
This is a short-window demonstration inspired by volatility bands. The reference strategy uses different parameters and order handling.
Source & further reading
TradingView · Bollinger Bands Strategy Directed