detect_divergence
Identify regular and hidden bullish and bearish divergences by comparing pivot highs and lows with an oscillator, and get divergence signals with price, oscillator values, and bar offsets.
Instructions
Detect regular/hidden bullish & bearish divergence between price and an oscillator.
Compares the two most recent confirmed pivot highs (for bearish) and
pivot lows (for bullish). oscillator is any indicator spec
(rsi:14, macd:12,26,9, cci:20, mfi:14, …). left and
right set the pivot confirmation window. Returns the detected
divergences with their pivot price/oscillator values and bar offsets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| left | No | ||
| limit | No | ||
| right | No | ||
| symbol | Yes | ||
| exchange | No | ||
| timeframe | No | 1h | |
| oscillator | No | rsi:14 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||