Asc channel
The highest and lowest recent closes both rising at a similar pace: a rising channel.
It takes the highest and lowest close over the last 100 bars and measures how much each line has changed over the last 20 bars, in percent. It fires when both lines rise more than the slope threshold and move at similar speeds, so the band between them stays roughly parallel. These are rolling extremes of closing prices, not trendlines fitted through pivot points, so the channel is a rule about the price range rather than a drawn line.
How to read it
- Markers sit on the candles where the channel holds; a run of markers is one episode, about 13 bars long at default settings.
- Each marker means the price range is rising: both lines rose more than 0.05% over 20 bars, at rates within 0.5 points of each other.
- The markers say the range is climbing in step, not where price goes next. When they stop, one line has flattened or the two have fanned apart.
What it outputs
- Rising channel
- True on each bar where the highest and lowest recent closes both rise together at a similar pace. Nothing is drawn on other bars.
When it fires
All conditions hold on the same bar: both lines rose more than the slope threshold over 20 bars, at similar rates, and the top sits above the bottom. The first marker of a run is when the channel forms; the rest of the run means it has held.
Settings
- slope_eps
- Minimum change over 20 bars, in percent, that both lines must exceed. Raising it keeps only steep channels, so fewer and stronger uptrends show. Lowering it admits flatter ones; below zero, mildly falling channels also fire.
- channel_eps
- Largest allowed gap between how fast the top and bottom change, in percentage points over 20 bars. Raising it admits fanning or converging channels, so more markers. Lowering it keeps only near-parallel channels, so fewer markers.
Pitfalls
- Not a fitted trendline: the lines are the highest and lowest closes of the last 100 bars. The source comment says lows and highs, but the code uses closes.
- Rolling extremes jump when a new high or low enters the window or an old one leaves it, so markers can switch on and off abruptly.
- Fires often at defaults: about 25 episodes in one month of SPY one-minute bars, roughly one a day.