Impulse Memory Engine [JOAT]Impulse Memory Engine is an open-source Pine Script v6 overlay that measures fresh displacement, stores directional memory with exponential decay, and displays adaptive retest rails after significant impulse bars. It is built to answer a simple question: is the most recent meaningful impulse still fresh enough to matter?
The script blends MAD-style distance, ATR, trend basis, and decay memory. This creates a visual layer that distinguishes fresh impulse, fading impulse, and reset conditions while keeping the chart clean.
Core Concepts
1. MAD and ATR Normalized Displacement
The script estimates a robust distance unit using median absolute deviation and ATR. The impulse score is the one-bar displacement divided by this unit.
medianSource = ta.median(sourceInput, madLengthInput)
madDistance = ta.median(math.abs(sourceInput - medianSource), madLengthInput)
unitDistance = math.max(atrValue * 0.35, madDistance * 1.4826)
impulseRaw = safeRatio(sourceInput - sourceInput , unitDistance)
2. Trend Basis and Fast Track
A slower EMA defines the trend basis while a faster EMA tracks near-term movement. The distance between them contributes to the heat score.
3. Freshness Decay
When a bullish or bearish impulse appears, the script measures bars since that impulse and applies exponential decay. Fresh impulses have more weight; older impulses fade naturally.
bullBars = ta.barssince(bullImpulse)
bearBars = ta.barssince(bearImpulse)
bullFresh = na(bullBars) ? 0.0 : math.exp(-bullBars / decayLengthInput)
bearFresh = na(bearBars) ? 0.0 : math.exp(-bearBars / decayLengthInput)
memorySigned = bullFresh - bearFresh
4. Adaptive Bands
The trend band widens when memory strength increases. This helps separate quiet reset states from active impulse regimes.
5. Retest Rails
After a fresh impulse, the script stores a rail near the impulse bar. A confirmed retest occurs when price revisits the rail while memory remains directionally active.
Features
Impulse score: Measures displacement relative to MAD and ATR distance
Memory decay model: Tracks whether the last strong impulse is fresh or fading
Adaptive trend cloud: EMA basis and fast track are filled by memory state
Dynamic bands: Band width expands with volatility and impulse memory
Retest rails: Bull and bear rails remain visible for a configurable window
Rail labels: Active bull and bear rails are labeled at the right edge with spacing protection when both rails are close
Confirmed buy/sell labels: Compact BUY and SELL labels mark fresh impulse continuation or rail retest continuation on confirmed bars
Heat candles: Optional candle coloring by impulse and memory strength
Dashboard: Top-right panel shows impulse, memory, state, and rail status
Alerts: Fresh impulse, rail retest, confirmed buy, and confirmed sell conditions
Input Parameters
Source: Price source used for calculations
Trend Length: Slow EMA basis length
Fast Track Length: Faster EMA used inside the cloud
MAD Length: Median distance length
ATR Length: ATR distance length
Band Multiplier: Scales adaptive bands
Impulse Threshold: Minimum normalized displacement for a fresh impulse
Memory Half Window: Controls decay speed
Rail Visibility: Bars a rail remains eligible for retests
Heat Candles: Enables candle coloring
Dashboard: Shows or hides the top-right dashboard
Rail Labels: Shows active bull and bear rail labels
Buy/Sell Signals: Shows confirmed continuation signal labels
Palette: Selects the local JOAT color preset
Dashboard: Shows the panel
Palette: Selects color pair
How to Use This Indicator
Step 1: Read the Memory State
The dashboard state shows whether the script is tracking bull memory, bear memory, or resetting.
Step 2: Watch Fresh Impulse Events
Fresh impulse alerts show that displacement exceeded the configured threshold in the direction of the trend basis.
Step 3: Use Retest Rails
Rails act as reference levels after impulse. A retest is most meaningful when the dashboard memory state still agrees with the rail direction.
Indicator Limitations
Impulse detection is sensitive to the selected source and threshold
Very low volatility can make normalized movement appear larger
A rail retest is contextual and does not define risk by itself
The memory model fades old impulses; it does not predict the next impulse
Originality Statement
Impulse Memory Engine is original in its use of robust distance normalization, exponential impulse decay, adaptive bands, and retest rails in one compact overlay. It is built with original Pine v6 logic and public mathematical functions.
Disclaimer
This script is provided for educational and informational use only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Impulse readings can fail during choppy markets or sudden volatility shifts. Always use independent analysis and proper risk management.
-Made with passion by jackofalltrades
Indicator

Impulse Regime Engine [JOAT]Impulse Regime Engine
Introduction
Impulse Regime Engine is a hybrid breakout-and-trend indicator designed to detect when participation expands, when that expansion compresses into a tradeable box, and when price finally resolves that box with directional intent. It combines a volume regime engine with an RSI-projected price trend framework, creating a clean overlay built for timing impulsive releases without sacrificing directional context.
This indicator is especially useful for traders who like breakout structures but do not want to trade every range break blindly. The regime box defines the event. The projected trend framework defines the context.
Why This Indicator Exists
Participation Regime Classification: Distinguishes low-quality price movement from meaningful volume expansion
Lifecycle-Based Box Engine: Separates the setup into building, armed, and resolved states
Projected Trend Overlay: Maps RSI into price space for contextual trend direction
Strength-Based Candle Coloring: Visualizes conviction without overloading the chart
Active Risk Map: Adds optional stop and target staging after valid breaks
Core Components Explained
1. Volume Regime Engine
volRatio = shortVolMA / longVolMA
Volume is classified into Low, Normal, High, and Extreme states by comparing short-term participation to a longer-term baseline. Only elevated regimes are allowed to build a valid impulse box.
2. Regime Box Lifecycle
Building: While elevated volume persists, the box expands to contain the active burst
Armed: Once the burst cools, the box freezes and waits for release
Resolved: A confirmed close beyond the boundary triggers the breakout event and resets the cycle
The script now includes a cooldown between resolved boxes so repeated high-volume churn does not keep repainting fresh structures on every minor burst.
3. RSI Projection Framework
projected = priceLow + smoothedRsi * priceRange / 100.0
avgLine = ta.ema(projected, smoothLen)
Instead of reading RSI only as a sub-pane oscillator, the script converts RSI into projected price space. This produces a trend reference line directly on the chart.
4. Dynamic Tolerance Bands
tolerance = avgBody * toleranceMultiplier
marginUp = avgLine + tolerance
marginDn = avgLine - tolerance
Price above the upper band confirms bullish projected trend. Price below the lower band confirms bearish projected trend. This acts like a directional bias filter around the projection basis.
5. Breakout Risk Framework
When price resolves the armed box, the script can draw one stop and three profit levels using either ATR-derived or percentage-derived distance. The lines auto-expire so old trade maps do not crowd the chart.
Visual Elements
Regime Box: Semi-transparent box during build and armed phases
Projection Basis: Gold-accent projected trend line
Tolerance Bands: Bull and bear projection boundaries
Gradient Candles: Optional candle coloring by directional strength
Breakout Markers: Compact IRE triangles on confirmed release
TP/SL Lines: Optional risk staging while the active breakout remains valid
Dashboard: Volume regime, ratio, bias, box state, signal state, RSI, and strength
Input Parameters
Regime Engine:
Short / Long Volume MA
Low / Normal / High thresholds
Max build bars
Max armed bars
New box cooldown bars
Trend Projection:
RSI length and smoothing
Projection range bars
Projection EMA
Tolerance multiplier
Strength lookback
Risk Framework:
ATR period
ATR stop multiplier
TP1 / TP2 / TP3 risk-reward ratios
TP/SL maximum life
How to Use This Indicator
Step 1: Wait for elevated participation to build the impulse box.
Step 2: Let the box transition into the armed state.
Step 3: Read whether projected trend bias agrees with the likely breakout direction.
Step 4: Use confirmed breaks, not intrabar pokes, as the actual event trigger.
Step 5: Manage the trade against the active risk map or your own execution rules.
Best Practices
Use on instruments with reliable participation data
Prefer breakouts aligned with the projected trend state
Treat extreme volume bursts as high-opportunity but also high-volatility events
Use the cooldown to avoid overreacting in noisy compression cycles
Disable extra visuals if you want a cleaner execution chart
Indicator Limitations
Volume regime logic depends on the quality of the feed
Not every armed box will produce a sustained move
Projected RSI trend is a contextual guide, not a guarantee
Breakouts can fail or reverse quickly in low liquidity
Repeated tests of the same area reduce signal quality
Technical Implementation
Built in Pine Script v6 using:
Short-vs-long volume regime classification
Stateful box lifecycle logic
RSI-to-price projection
Body-based tolerance bands
Strength-gradient candle coloring
Optional ATR or percent risk mapping
Confirmed-bar breakout and trend-shift alerts
Originality Statement
This indicator is original in the way it combines regime participation, lifecycle breakout structure, and projected momentum context into one overlay. Its edge is not just detecting expansion, but framing when expansion is worth respecting.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Breakout trading involves risk, including false breaks and fast reversals. Always manage risk carefully and confirm signals with your own process.
-Made with passion by officialjackofalltrades
Indicator

Indicator

Crypto Breadth Engine [alex975]
A normalized crypto market breadth indicator with a customizable 40 coin input panel — revealing whether rallies are broad and healthy across major coins and altcoins or led by only a few.
📊 Overview
The Crypto Breadth Engine measures the real participation strength of the crypto market by analyzing the direction of the 40 largest cryptocurrencies by market capitalization.
⚙️ How It Works
Unlike standard breadth tools that only count assets above a moving average, this indicator measures actual price direction:
+1 if a coin closes higher, –1 if lower, 0 if unchanged.
The total forms a Breadth Line, statistically normalized using standard deviation to maintain consistent readings across timeframes and volatility conditions.
🧩 Dynamic Input Mask
All 40 cryptocurrencies are fully editable via the input panel, allowing users to easily replace or customize the basket (Top 40, Layer-1s, DeFi, Meme Coins, AI Tokens, etc.) without touching the code.
This flexibility keeps the indicator aligned with the evolving crypto market.
🧭 Trend Bias
The indicator classifies market structure as Bullish, Neutral, or Bearish, based on how the Breadth Line aligns with its moving averages (10, 20, 50).
💡 Dashboard
A compact on-chart table displays in real time:
• Positive and negative coins
• Participation percentage
• Current trend bias
🔍 Interpretation
• Rising breadth → broad, healthy market expansion
• Falling breadth → narrowing participation and structural weakness
Ideal for TOTAL, TOTAL3, or custom crypto baskets on 1D,1W.
Developed by alex975 – Version 1.0 (2025).
-------------------------------------------------------------------------------------
🇮🇹 Versione Italiana
📊 Panoramica
Il Crypto Breadth Engine misura la partecipazione reale del mercato crypto, analizzando la direzione delle 40 principali criptovalute per capitalizzazione.
Non si limita a contare quante coin sono sopra una media mobile, ma calcola la variazione effettiva del prezzo:
+1 se sale, –1 se scende, 0 se invariato.
La somma genera una Breadth Line normalizzata statisticamente, garantendo letture coerenti su diversi timeframe e fasi di volatilità.
🧩 Mascherina dinamica
L’indicatore include una mascherina d’input interattiva che consente di modificare o sostituire liberamente i 40 ticker analizzati (Top 40, Layer-1, DeFi, Meme Coin, ecc.) senza intervenire nel codice.
Questo lo rende sempre aggiornato e adattabile all’evoluzione del mercato crypto.
⚙️ Funzionamento e Trend Bias
Classifica automaticamente il mercato come Bullish, Neutral o Bearish in base alla relazione tra la breadth e le medie mobili (10, 20, 50 periodi).
💡 Dashboard
Una tabella compatta mostra in tempo reale:
• Numero di coin positive e negative
• Percentuale di partecipazione
• Stato attuale del trend
🔍 Interpretazione
• Breadth in crescita → mercato ampio e trend sano
• Breadth in calo → partecipazione ridotta e concentrazione su pochi asset
Ideale per analizzare TOTAL, TOTAL3 o panieri personalizzati di crypto.
Funziona su timeframe 1D, 4H, 1W.
Sviluppato da alex975 – Versione 1.0 (2025).
Indicator
