Update:
* fix plotshape so that long/short signals now work.
* change color palette to be visible to color blind individuals, and also to avoid misinterpretations (e.g., misunderstanding the ADX trend coloring the background in aqua does not mean that the market is bullish, just that it is trending in either direction).
Updated instructions:
This indicator automatically highlights the background in purple when ADX is above 25 to indicate that there is a trend, regardless of its direction, and in dark blue when ADX is below 20, indicating that the market is ranging. When the market is undecided, the background is not highlighted.
There is a "Trend bar" at the bottom that allows for easy interpretation:
* it is colored in green when the market is bullishly trending (DMI+ over DMI- and ADX > 25).
* in red when market is bearishly trending (DMI+ under DMI- and ADX > 25).
* in dark blue when market is ranging (ADX < 20).
* in gray when market is undecided (20 <= ADX < 25).