Island bottom event
A gap up out of a gap-down island, a bottom-reversal pattern; it never fired on the default SPY sample.
The indicator looks for a gap down, where a bar's high sits more than gap below the previous bar's low, and then a gap up, where a bar's low sits more than gap above the previous bar's high. After the first gap down it enters a down state and never leaves it, so it counts bars from that gap and marks the gap up that lands on bar island_bars. The named pattern needs the island to close on its own; this code never closes it, so the marker fires at most once.
How to read it
- Markers sit on the candle where a gap up lands on bar island_bars, counting the first gap-down bar as bar 1.
- Read a marker as a bullish reversal only after a clear gap down; the code does not check the trend or how long price stayed down.
- An empty chart is expected at default settings, and at most one marker can appear per run.
What it outputs
- Island exit
- Marks the candle where a gap up lands on bar island_bars, counting the gap-down bar as bar 1. Fires at most once per run.
When it fires
Fires on a gap-up bar, one whose low is more than gap above the prior high, that is bar number island_bars counting the first gap-down bar as bar 1. It is meant to show a gap down reversed by a gap up. It fires at most once, and the default SPY sample had none.
Settings
- gap
- Smallest jump between adjacent bars that counts, as a fraction of the previous bar's low or high (0.01 is 1%). Raising it leaves fewer or no markers; lowering it counts smaller jumps. Negative values let ordinary bars count as gaps.
- island_bars
- The bar on which the gap up must land, counting the gap-down bar as bar 1. Higher values move the gap up later and make a marker less likely. A value of 1 never fires; every value allows at most one marker.
Pitfalls
- Latched state: once a gap down happens the indicator never returns to idle, so the count never restarts and it fires at most once. The loosened presets were not tested on the sample.
- At the default 1% gap, adjacent one-minute bars would need a jump of about $7.65 at SPY's 765 level, so events are rare; the sample had none.
- island_bars = 1 can never fire with a non-negative gap, since a gap down and a gap up cannot land on the same bar. The opens input is accepted but unused.