# Spike Rules

Spike Rules is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Detects Market Profile spikes, late-session breakouts beyond the day's range in the final 30 minutes, and applies Dalton's spike rules to the next open: beyond the spike is acceptance, inside it is weaker acceptance with the base to hold, beyond the base is rejection. Each read is tracked on 30-minute period closes, with a tally of how often reads held; an open inside the spike is only traded once a period closes through the base.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Sep 17, 2026.
- Access: free.
- Concepts: [spike rules](https://www.luxalgo.com/library/concept/spike-rules/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cs81fmnwop0cl11kxn7vc15i
- Page: https://www.luxalgo.com/library/indicator/spike-rules/

**Spike Rules** is an automated analytical tool designed to identify late-session price spikes and evaluate how market participants respond to these levels on the following day. By detecting significant breakouts during the final minutes of a session, the indicator helps traders categorize the market intent as either an acceptance of new price extremes or a rejection of the move. It provides a clear framework for monitoring whether subsequent price action confirms or negates the initial spike, offering insights into potential continuation or reversal patterns.

## How to Trade the Spike Rules?

Trading with this indicator involves analyzing the relationship between the next session's opening price and the established spike zone. There are three primary scenarios to watch:

* Open Beyond the Spike: When the market opens beyond the spike extreme, the price is considered accepted. Traders often look for continuation in the direction of the spike, using the spike extreme or base as a reference level for stop placement.
* Open Within the Spike: This indicates weaker acceptance. In this scenario, the market is balancing. The spike base serves as a crucial support or resistance level; a period close through the base suggests the spike is being rejected, shifting the bias against the original move.
* Open Against the Spike: If the market opens beyond the spike base, the late-session breakout is deemed rejected. This environment favors trading in the opposite direction of the initial spike, as the breakout failed to hold interest.

The indicator uses a period-based closing logic to filter out noise, ensuring that a single-bar violation does not trigger a false signal. You can track these trades directly on the chart, with the indicator highlighting the entry, failure levels, and the eventual outcome of the session.

## Spike Rules Settings

### Session
* **Regular Session**: Defines the time window to be scanned for spikes. The default corresponds to the typical market hours for major indices.
* **Timezone**: Specifies the time zone for the session, ensuring correct alignment with exchange operating hours.

### Spike Detection
* **Spike Window (minutes)**: The final minutes of the session used to detect a breakout.
* **Minimum Spike (x average range)**: Filters out minor price fluctuations to ensure only significant moves are labeled as spikes.
* **Close Location in Spike (%)**: Sets the requirement for where the session must close within the spike, filtering against late-day reversals.
* **Average Range Sessions**: The number of completed sessions used to calculate the volatility baseline.

### Next-Day Rules
* **Read On Period Closes (minutes)**: Defines the timeframe for judging level breaks, preventing whipsaws.
* **Level Tolerance (x average range)**: A buffer applied to levels to confirm a legitimate break.
* **Acceptance Fails On**: Determines if a read fails at the spike extreme or the spike base.
* **Track Next-Day Trades**: Toggles the dashed trade line drawn from each entry; the read and outcome labels stay on the chart either way.

### Style
* **Spikes on Chart**: Limits the number of past spikes displayed to maintain a clean workspace.
* **Colors**: Customizable colors for buying spikes, selling spikes, and neutral readings.

### Dashboard
* **Show Dashboard**: Enables a summary table showing the latest spike status and total trade statistics.

## Frequently Asked Questions

### What constitutes a spike in this indicator?
A spike is defined as a significant price breakout that occurs within a specific final window of the trading session, measured against the average volatility of previous days.

### How is the spike base calculated?
The base is the session extreme that existed immediately before the defined spike window began, serving as the critical boundary that separates the spike from the rest of the daily range.

### What happens when a read is rejected?
A rejection occurs when the market fails to accept the new price levels, typically indicated by a period close back through the spike base or a designated failure level, signaling a potential shift in momentum.

## Related indicators

- [Initial Balance Breakout Signals](https://www.luxalgo.com/library/indicator/initial-balance-breakout-signals/) (Initial Balance): markdown at https://www.luxalgo.com/library/indicator/initial-balance-breakout-signals.md
- [Profile Shape Taxonomy](https://www.luxalgo.com/library/indicator/profile-shape-taxonomy/) (Auction Market Theory): markdown at https://www.luxalgo.com/library/indicator/profile-shape-taxonomy.md
- [TPO Profile](https://www.luxalgo.com/library/indicator/tpo-profile/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/tpo-profile.md
- [80% Rule](https://www.luxalgo.com/library/indicator/80-percent-rule/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/80-percent-rule.md
- [Auction Failure](https://www.luxalgo.com/library/indicator/auction-failure/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/auction-failure.md
- [Value Migration](https://www.luxalgo.com/library/indicator/value-migration/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/value-migration.md
- [One-timeframing](https://www.luxalgo.com/library/indicator/one-timeframing/) (Volume & Order Flow): markdown at https://www.luxalgo.com/library/indicator/one-timeframing.md
- [Initial Balance Volume Deficit](https://www.luxalgo.com/library/indicator/initial-balance-volume-deficit/) (Initial Balance): markdown at https://www.luxalgo.com/library/indicator/initial-balance-volume-deficit.md

---

Source: https://www.luxalgo.com/library/indicator/spike-rules/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
