Premium and discount
The upper and lower halves of the active swing range, split at equilibrium.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| swing_len | int | 5 | 2 to 100 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| premium | zone | Optional | color theme.down/0.10, style area |
| discount | zone | Optional | color theme.up/0.10, style area |
| equilibrium | value | Optional | color theme.neutral, dash dash, style line, width 1 |
- Warm-up
- 2 * swing_len bars (10 at the defaults)
- Repaints
- No
- Parity
- None
Formula
Swings are found as in market structure with swing_len. The active range runs from the lowest low since the latest swing low to the highest high since the latest swing high.
equilibrium is its middle. premium is the upper half, from equilibrium to the top, and discount the lower half, from the bottom to equilibrium. They show once both swings exist.