Find Swing Highs and Lows
Mark swing highs and lows and check them against a rule based on neighboring closes.
In this exercise a swing high is above both neighboring closes, and a swing low is below both. Equal closes do not qualify under this rule. Classify the interior points; each endpoint has only one neighbor.