Premium and discount

premium_discountsmart_moneyForge API 1

The upper and lower halves of the active swing range, split at equilibrium.

Inputs

NameTypeDefaultRange
swing_lenint52 to 100

Outputs

NameTypeRequiredDescription
premiumzoneOptionalcolor theme.down/0.10, style area
discountzoneOptionalcolor theme.up/0.10, style area
equilibriumvalueOptionalcolor 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.