Divergent Bars[Salty]Updated an existing Divergent Bar script to be able to show all divergent bars. There are 2 set of divergent bars that can be turned on. The original one based on price and alligator lines, and a new second one that shows ALL divergent bars. The second set has lighter lines and colors to differentiate them from the filtered alligator divergent bars.
Divergent
Bill Williams Divergent BarsBill William Bull/Bear divergent bars
See: Book, Trading Chaos by Bill Williams
Coded by polyclick
A bullish (green) divergent bar, signals a trend switch from bear -> bull
-> The current bar has a lower low than the previous bar, but closes in the upper half of the candle.
-> This means the bulls are pushing from below and are trying to take over, potentially resulting in a trend switch to bullish.
-> We also check if this bar is below the three alligator lines to avoid false positives.
A bearish (red) divergent bar, signals a trend switch from bull -> bear
-> The current bar has a higher high than the previous bar, but closes in the lower half of the candle.
-> This means the bears are pushing the price down and are taking over, potentially resulting in a trend switch to bearish.
-> We also check if this bar is above the three alligator lines to avoid false positives.
Best used in combination with the Bill Williams Alligator indicator.