Bearish divergence
On while price makes a higher high but an indicator makes a lower high, a sign buying is losing force.
It takes the highest price of the last window bars and compares it with the highest of the window bars before, and does the same for the indicator. It is on while the price high is higher and the indicator high is lower. The indicator input has no default; on this chart it reads the close, the same series as price, so it never fires here.
How to read it
- Markers sit on the candles on every bar where the divergence holds.
- In a strategy, bind the indicator to a momentum line such as RSI.
- A cluster of markers is one divergence lasting several bars, not several separate ones.
What it outputs
- Bearish divergence
- On while price's window high is higher and the indicator's window high is lower than in the window before.
When it fires
On every bar where the highest price of the last window bars is above the highest of the window before while the indicator's highest is below its highest of the window before. On this chart it never fires, since both inputs are the close.
Settings
- window
- How many bars each high is taken over, and how far back the earlier high sits. Longer windows compare bigger swings and fire less often; shorter ones catch small wiggles.
Pitfalls
- The highs come from fixed blocks of window bars, not from swing points, so they may not be the highs a chart reader would pick.
- It warns that buying is fading; it does not time a turn, and price can keep rising while it is on.