See comments section below for a sample chart. Copy the code from the pastebin above and update your local copy (TV doesn't allow me to update an already published code -- yet!).
The LBR PaintBars indicator changes the colour of the price bars based on the trend direction (derived from price & volatility bands). This is mostly used as a confirmation indicator.
For the Pine coders: I suggest trying stdev() in lieu of atr()...some wild combinations can be derived from this simple idea :)
Indicator supports the following options: - Switching on/off volatility bands - Switching on/off LBR colors (lime/maroon). - Color non-LBR bars (blue).