Skip to content

feat: add get_levels() for support/resistance level query (closes #11)#33

Merged
GregoryMorse merged 2 commits into
masterfrom
feature/issue-11-get-levels
Apr 9, 2026
Merged

feat: add get_levels() for support/resistance level query (closes #11)#33
GregoryMorse merged 2 commits into
masterfrom
feature/issue-11-get-levels

Conversation

@GregoryMorse
Copy link
Copy Markdown
Owner

Given the return value of calc_support_resistance, a series index, and the current price, get_levels() evaluates every computed trend line at that index and classifies the results as support (level <= price) or resistance (level > price). Each level entry is (level, strength, slope, intercept) sorted by proximity to price (up to n levels each). Risk-to-reward ratios are also returned for each resistance level relative to the nearest support.

Given the return value of calc_support_resistance, a series index, and the
current price, get_levels() evaluates every computed trend line at that index
and classifies the results as support (level <= price) or resistance
(level > price).  Each level entry is (level, strength, slope, intercept)
sorted by proximity to price (up to n levels each).  Risk-to-reward ratios are
also returned for each resistance level relative to the nearest support.
@GregoryMorse GregoryMorse merged commit c8e6c04 into master Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant