Double top breakout event
A sell marker for a double top breaking down; at default settings it never fires.
The indicator takes the highest and lowest closes of the last 100 bars, not intraday highs and lows. A double top counts when the close reaches within eps (0.3% by default) of that high, dips at least pullback (0.6%) below it, then returns within eps of the high. The sell test fires on the next bar if the close is under the 100-bar low by band, but that low already includes the current close, so a band of zero or more can never pass.
How to read it
- Markers sit on candles, on the bar after a double top completes, if the close is under the 100-bar low.
- A blank chart is the normal result at defaults: a month of SPY one-minute bars produced no markers at all.
- Read any marker as a rare one-time event, not a repeating sell call, because the setup latches once the second top forms.
What it outputs
- Double top breakout
- Marks the bar after a double top has formed when the close is under the 100-bar low times (1 minus band). Never marks at default settings.
When it fires
Fires at most once per run, on the bar after the second top forms, when the close is under the 100-bar low times (1 minus band). At band zero or above it cannot fire, so the default never fires.
Settings
- eps
- How close the close must be to the 100-bar high to count as a top, as a fraction (0.003 is 0.3%). Raising it lets looser touches count; lowering it demands closer ones. Below zero no touch can match, so the indicator never fires.
- pullback
- How far the close must fall below the 100-bar high between the tops (0.006 is 0.6%). Raising it demands a deeper dip and fewer setups; lowering it accepts shallow dips. At zero or below the dip always counts, so the second top only needs to touch the high.
- band
- Margin under the 100-bar low that the sell test needs (0.001 is 0.1%). At zero or above it can never pass, since the low includes the current close. Below zero it fires when the close sits within that margin above the low, not under it.
- confirm_days
- How many consecutive bars the sell test must hold before a marker draws. At 1 it draws on the first bar. Above 1 it never draws, because the test is true for only one bar per run.
Pitfalls
- Zero markers at defaults on SPY one-minute bars, 2026-09-01 to 2026-10-01. Band at zero or above and confirm_days of 2 or more also gave zero; band below zero gave one marker in the month.
- Once the second top forms it stays armed, so the marker fires at most once per continuous run, not once per double top.
- The levels are 100-bar extremes of closes, not highs and lows, and the sell test is not a neckline break. The name suggests the classic pattern; the logic does not match it.