Indicator

Indicator

Adaptive Smart Money Liquidity Sweep Levels [AlgoAlpha]🟠 OVERVIEW
Adaptive Smart Money Liquidity Levels tracks liquidity resting above and below price by detecting swing highs and lows across multiple lookback periods. Instead of displaying every historical level equally, it stores active liquidity zones, updates them over time, and removes them once price mitigates them.
The indicator also estimates the amount of liquidity accumulated around nearby levels using traded volume. This information is displayed through level opacity, a near-range liquidity balance chart, and an orderbook-style liquidity depth profile to provide context around where liquidity is concentrated.
🟠 CONCEPTS
Liquidity Level — Swing highs and swing lows detected from fast, medium, and slow lookback windows. Nearby levels are merged together to reduce duplicate levels. These levels are used to estimate the location of stop-loss orders, and volume + candle direction are used to estimate the buying/selling (and thus concentration of stop-loss orders) to determine the magnitude of orders at these levels.
Liquidity Depth — Volume is assigned to the nearest active liquidity levels based on candle direction and configurable distance weighting. The accumulated volume forms a depth profile around current price.
Mass Liquidation — Triggered when a candle body moves through two or more active liquidity levels on the same side, indicating multiple liquidity pools were cleared within a single move.
Stop-runs and Liquidity Dynamics — This script takes advantage of the concept of resting limit orders, and resting stop-loss orders. When a bar wicks a liquidity level instead of strongly trading through it, it implies a stronger amount of opposing pressure from both limit and market-orders than the pressure coming from clustered stop-losses, preventing a stop run and signalling a higher chance of that level holding and potentially a rebound. In simple terms, this indicator can be used as part of ICT and Smart Monet Concepts to help better understand a real liquidity sweep (marked by ▲▼) vs liquidation events (marked by highlighted candles) as both events usually require vastly different actions to capitalize on correctly.
🟠 FEATURES
Adaptive Liquidity Levels . Displays the nearest active liquidity above and below price.
• Level opacity increases as more volume accumulates.
• Levels automatically disappear after mitigation or when they exceed the selected maximum age.
• Levels represent accumulating stop loss orders as more trades occur (using volume and candle direction to estimate market orders)
Near Range Liquidity Balance . Shows the relative liquidity accumulated of the 3 nearest levels above and below current price using a two-column comparison chart.
Liquidity Depth Curve . Draws an orderbook-style cumulative depth profile beside price to visualize how liquidity builds further away from the current market.
Liquidation And Sweep Signals . Highlights candles that clear multiple liquidity levels and marks wick-only liquidity sweeps with directional markers.
🟠 HOW TO USE
Monitor liquidation labels and wick sweep markers to distinguish between full liquidity removals and liquidity that was only briefly tested. Liquidity removals imply weak levels while those that were wicked imply strong concentration of limit orders, useful for planning where to place stop losses or to time trade entries.
Watch the nearest liquidity levels to identify where resting liquidity is currently concentrated around price.
Compare the Near Range Liquidity Balance to see whether more liquidity is currently stacked above or below the market.
Use the Liquidity Depth Curve to estimate how liquidity changes as price moves further away from its current location.
🟠 CONCLUSION
Adaptive Smart Money Liquidity Levels combines multi-scale liquidity detection, volume-weighted liquidity accumulation, and mitigation tracking into a single view. By displaying active liquidity, nearby liquidity balance, and cumulative liquidity depth together, it provides additional context for where price is interacting with resting stop orders and how that structure changes over time. A key detail to note is that this script estimates the position and concentration of orders with proxies like swing levels and volume, and that the levels represent stop-loss orders, not limit orders. Indicator

Crypto: Fear & Greed Index [invincible3]Crypto: Fear & Greed Index
Crypto: Fear & Greed Index is a multi-factor sentiment oscillator designed to estimate crypto market risk appetite directly inside PulseWire. Instead of relying on a single RSI or momentum reading, this indicator combines several market proxies into one smoothed 0–100 sentiment index.
The model uses price momentum, volatility behavior, RSI strength, volume pressure, range position, crypto breadth, stablecoin dominance, TOTAL market trend, and BTC dominance context. These factors are auto-normalized into a composite Fear & Greed score.
The oscillator is divided into clear sentiment zones:
0–25: Extreme Fear
25–45: Fear
45–55: Neutral
55–75: Greed
75–100: Extreme Greed
The indicator also includes a market-regime layer to classify conditions as Bull / Risk-On, Bear / Risk-Off, or Mixed / Transition. This helps traders avoid interpreting fear and greed in isolation.
Key features:
• Multi-factor crypto sentiment model
• Auto-normalized Fear & Greed score
• Adaptive dark/light chart colors
• Risk-on / risk-off regime detection
• Crypto breadth using major market symbols
• Stablecoin dominance and BTC dominance context
• TOTAL and TOTAL2 market trend integration
• Fear, Neutral, and Greed oscillator zones
• Dashboard with index value, regime, bias, factor scores, and weights
• Visual Fear-to-Greed meter
• Accumulation, Risk, Trend, and Trim context markers
• Regular bullish and bearish divergence detection
• Divergence plotted on both price chart and oscillator
• Alerts for major sentiment transitions and divergence signals
How to interpret:
Extreme Fear does not automatically mean buy. In a bear regime, fear can continue and price may keep falling. Extreme Fear becomes more useful when the broader regime is improving or when bullish divergence appears.
Extreme Greed does not automatically mean sell. In a strong bull regime, greed can support continuation. However, extreme greed with fading momentum may indicate crowding risk, where trimming or reducing exposure may be considered.
The indicator works best as a sentiment and risk-context tool, not as a standalone buy/sell system. It should be combined with price structure, support and resistance, volume, trend filters, and risk management.
This indicator is designed primarily for crypto markets. It can be applied to BTC, ETH, altcoins, and other crypto symbols. BTC is not the only supported asset; BTC is used as one part of the broader market-context model.
Disclaimer:
This script is for educational and analytical purposes only. It does not provide financial advice. Always use proper risk management and confirm signals with your own trading plan.
Indicator

US Sector Rotation vs SPY - Relative StrengthUS Sector Rotation vs SPY vergleicht die Performance der wichtigsten US-Sektor-ETFs mit dem S&P-500-Benchmark SPY.
Das Script dient dazu, relative Stärke und Schwäche einzelner Sektoren schneller zu erkennen. Dadurch lassen sich Marktrotationen besser einordnen und potenziell interessante Sektoren für die weitere Underlying-Auswahl identifizieren.
Enthalten sind unter anderem die großen US-Sektor-ETFs wie XLK, XLC, XLY, XLI, XLB, XLE, XLP, XLV, XLU, XLF und XLRE. SPY dient als Benchmark.
Das Script berechnet die Performance direkt im Pine Script. Deshalb sollte die PulseWire-Skala regulär bleiben und nicht zusätzlich auf Prozent oder indexierte Darstellung umgestellt werden.
Funktionen:
Vergleich der absoluten Sektor-Performance
Darstellung der relativen Performance gegenüber SPY
wählbare Performance-Fenster: 21, 63, 126, 252 oder eigene Handelstage
Standardwert für eigene Handelstage: 90
Ranking-Tabelle nach relativer Stärke gegenüber SPY
Startpunkt-Markierung der Performance-Berechnung
optionale Endlabels mit Verbindungslinien
Interpretation:
Ein positiver Wert in der Spalte „vs SPY“ zeigt, dass der jeweilige Sektor den Gesamtmarkt im gewählten Zeitraum outperformt. Ein negativer Wert zeigt relative Schwäche gegenüber SPY.
Das Script ist kein Entry- oder Exit-Signal. Es ist als Analysewerkzeug gedacht, um Sektorrotation, relative Stärke und mögliche Underlying-Kandidaten besser vorzuselektieren.
Für Stillhalterstrategien wie Short Puts oder Bull Put Spreads kann die Ansicht helfen, Sektoren mit stabiler oder überdurchschnittlicher relativer Stärke zu identifizieren. Die finale Bewertung sollte jedoch immer zusätzlich Liquidität, IV Rank, Bid/Ask-Spreads, Unterstützungszonen, Earnings- und Eventrisiken sowie Positionsgröße berücksichtigen. Indicator

Indicator

Indicator

Brownian Motion Residual [JOAT]BROWNIAN MOTION RESIDUAL
A regime classifier rooted in the sqrt(T) scaling law of geometric Brownian motion. Under a true random walk, the standard deviation of T-bar returns scales as σ₁ · √T — that is the central fact of Brownian motion in continuous time. Markets violate this scaling in revealing ways: when they trend, dispersion at long horizons grows faster than √T; when they mean-revert, it grows slower. Brownian Motion Residual measures that violation across three horizons simultaneously, aggregates it, and surfaces a single Z-like residual that classifies the market into Strong MR / MR / Random / Trend / Strong Trend.
The sqrt(T) scaling law, restated
For a Brownian process with per-bar volatility σ₁:
σ(T-bar return) = σ₁ · √T
For a real market the observed σ at horizon T can be measured directly. The residual is the deviation of the observed value from the Brownian-implied value:
residual(T) = σ_observed(T) − σ₁ · √T
When the residual is positive , dispersion at T is greater than Brownian predicts — the market is trending (price travels further than a random walk in T bars). When it is negative , dispersion is less than Brownian predicts — the market is mean-reverting (price ends up closer to home than a random walk would).
Optional normalisation by σ₁ · √T turns the residual into a unit-less percentage of expected dispersion, so the same threshold values are meaningful across instruments and timeframes.
Three horizons, weighted blend
A single horizon is noisy. Brownian Motion Residual reads three horizons simultaneously (default 5 / 20 / 100 bars), each independently toggleable and weighted (default 1.0 each). The horizons are aggregated into a single residual line — the script's headline metric. Toggling off the short horizon makes the read smoother and slower; toggling off the long horizon makes it more reactive. Configurable.
A configurable EMA on top of the aggregated residual suppresses single-bar noise without lagging the regime view.
Two-tier classification
The aggregated residual is mapped to one of five regimes by two symmetric thresholds (default ±1 mild, ±2 strong):
Strong Trend — residual > +2. Aggressive momentum regime.
Trend — residual between +1 and +2. Trending.
Random — residual between −1 and +1. Brownian-like.
MR — residual between −2 and −1. Mean-reverting.
Strong MR — residual < −2. Aggressive reversion regime.
Visual system
Slope-coloured residual line with configurable width and optional area fill under it (transparency configurable).
Zero line and ±1 / ±2 threshold lines (toggleable).
Background tint by regime (subtle 88 transparency default) — teal trend, lavender MR, mint random.
Per-horizon plots (toggleable, off by default) — each horizon's residual as a faint dotted overlay; useful for seeing which horizon is driving the read.
Regime-change dots above the line at every confirmed flip.
A locked Aurora palette (teal trend / lavender MR / mint random on a deep-night ground) gives the pane a distinctive structural identity.
Dashboard
Monospaced table, positionable to any of nine corners, with vertical row-fade. Surfaces:
Aggregated residual (raw and smoothed).
Regime classification with glyph.
σ₁ value (the Brownian anchor).
Per-horizon residuals (h1 / h2 / h3) when enabled.
Bars in current regime.
Distance to nearest threshold.
Optional fancy Unicode header for the institutional aesthetic.
Alerts
Three alert conditions, each independently controllable:
Regime Change (any classification flip)
Strong threshold cross (±2)
Mild threshold cross (±1) — off by default
How to read it
Three reads, in order of conviction:
Strong Trend / Strong MR entry — the highest-conviction read. The market has decisively departed from Brownian scaling in one direction. Pair with a momentum tool in Trend regimes, a reversion tool in MR regimes.
Residual crossing zero — the regime fault line. Even before crossing a threshold, a sustained sign flip means the underlying distribution has rotated; the next threshold cross will confirm the new regime.
Per-horizon disagreement (when enabled) — when the short horizon is in trend regime but the long horizon is in MR regime, the market is in a nested state: short-term momentum inside a longer reversion. This is the textbook setup for fade-the-extreme intraday plays inside a wider range.
Suggested settings
Defaults (σ₁ window 100, observed σ window 60, horizons 5/20/100, equal weights, log returns ON, normalisation ON) are tuned for 15m–4H on liquid markets. For lower timeframes drop horizon 3 to 50. For HTF (daily+) raise horizon 3 to 200 and σ₁ window to 200. Log returns are theoretically correct and the recommended default — the script's regime classification depends on the scaling law, which assumes log returns; switch off only for research.
Originality
The √T Brownian scaling law is textbook continuous-time finance — the central piece of Bachelier's 1900 thesis and the foundation of every diffusion model in pricing. The implementation here — the per-horizon σ measurement pipeline, the σ₁-anchored Brownian baseline with optional normalisation, the three-horizon weighted aggregation, the EMA-smoothed residual classifier with two-tier thresholds, the per-horizon overlay layer, the regime-tinted background, and the dashboard — is JOAT-original. No third-party code reused. The use of residual against Brownian as a regime classifier is the original quantitative contribution.
Limitations
The √T law is exact only for Brownian motion — real markets have fat tails, autocorrelation, and discrete bars, so the measured "residual" is always non-zero even in a regime that looks random. The thresholds (±1 / ±2) are calibrated to be the regime boundaries empirically; tighten or loosen if your instrument has unusual variance behaviour. Per-horizon σ values need their respective windows populated to be meaningful — early bars give a warm-up read.
—
-made with passion by jackofalltrades
Indicator

Panel S-500s-500 is a multi-timeframe market dashboard designed to give a fast and clean view of the current market context.
the tool combines trend, rsi, macd, adx, volume, volatility, sessions, killzones, vwap, moving averages, momentum, compression, expansion and general market bias inside one compact panel.
the goal of s-500 is not to replace your strategy. it is built to help you read the market environment before taking a trade. it can be used as a confirmation tool, a market filter, or a quick decision dashboard.
main features
multi-timeframe trend reading
multi-timeframe rsi reading
multi-timeframe macd reading
multi-timeframe adx reading
volume analysis
obv direction
volume moving average status
volume trend
vsa activity
stochastic direction
vwap bias
ema 20, ema 26, ema 50 and ema 200 context
rsi slope
ema 20 slope
range to atr ratio
body ratio
atr slope
volume delta
compression and expansion reading
tokyo, london, new york and sydney session status
london and new york killzone status
market bias
suggested action
market regime
momentum strength
volatility status
trend strength
market phase
risk environment
how to use s-500
enable the panel from the settings.
start by looking at the bias line.
if bias shows bullish, the market context is mostly bullish.
if bias shows bearish, the market context is mostly bearish.
if bias shows neutral, the market does not have a clear directional structure.
then check the action line.
buy means the current conditions are more favorable for long setups.
sell means the current conditions are more favorable for short setups.
wait means the market is not clean enough and it may be better to wait.
after that, check the regime line.
trend up means the market is moving in an upward structure.
trend down means the market is moving in a downward structure.
range means the market is more sideways and less directional.
unclear means the structure is not strong enough to define a clean regime.
beginner tutorial
1. check the bias first
the bias gives the main direction of the market.
bullish bias means buyers are stronger.
bearish bias means sellers are stronger.
neutral bias means the market is mixed.
a beginner should avoid trading against the bias.
2. check the action
the action line gives a simple reading of the current context.
buy means you should mainly look for long opportunities.
sell means you should mainly look for short opportunities.
wait means conditions are not clean enough.
this does not mean you should enter immediately. it means the market context is more favorable in that direction.
3. check the trend mtf section
the trend mtf section shows if multiple timeframes are bullish or bearish.
when most timeframes are bullish, the market has stronger upward alignment.
when most timeframes are bearish, the market has stronger downward alignment.
when timeframes are mixed, the market may be unstable or ranging.
4. check rsi mtf
rsi above 50 usually supports bullish momentum.
rsi below 50 usually supports bearish momentum.
if rsi is growing across several timeframes, momentum is improving.
if rsi is falling across several timeframes, momentum is weakening.
5. check macd mtf
macd above 0 supports bullish pressure.
macd below 0 supports bearish pressure.
a growing macd means momentum is increasing.
a falling macd means momentum is decreasing.
6. check adx mtf
adx helps estimate trend strength.
a stronger adx can confirm that the market has directional force.
a weak adx can indicate a range or a low-quality trend.
7. check vwap
if price is above vwap, buyers have more control.
if price is below vwap, sellers have more control.
vwap is useful for intraday trading and quick market context.
8. check volatility
high volatility means the market is moving aggressively.
low volatility means the market is calmer.
high volatility can create opportunities, but it also increases risk.
low volatility can create slow or choppy price action.
9. check market phase
expansion means the market is moving with more range and energy.
compression means the market is becoming tighter and less volatile.
neutral means there is no strong expansion or compression signal.
10. check risk environment
favorable means the environment is cleaner for trading.
dangerous means conditions may be unstable or risky.
neutral means the market is not clearly favorable or dangerous.
example of bullish use
the panel shows:
bias bullish
action buy
regime trend up
momentum strong
price above vwap
ema 50 above ema 200
rsi above 50 on several timeframes
macd growing on several timeframes
in this case, the trader can focus only on long setups.
a beginner could wait for a pullback, a support retest, a bullish candle confirmation, or a clean continuation signal before entering.
example of bearish use
the panel shows:
bias bearish
action sell
regime trend down
momentum strong
price below vwap
ema 50 below ema 200
rsi below 50 on several timeframes
macd falling on several timeframes
in this case, the trader can focus only on short setups.
a beginner could wait for a rejection from resistance, a bearish retest, a breakdown, or a continuation signal before entering.
example of range use
the panel shows:
bias neutral
action wait
regime range
momentum weak
volatility low
mixed trend mtf
weak adx
in this case, the market does not have a clean direction.
a beginner should be careful, reduce risk, or wait for a clearer breakout with stronger volume and momentum.
example of session use
if london or new york is active, the market may have more movement.
if a killzone is active, volatility can increase.
if all sessions are quiet, the market may be slower.
sessions should not be used alone. they are best used with trend, volume, volatility and structure.
settings
enable panel
turns the dashboard on or off.
position
selects where the panel appears on the chart.
aggressive mode
enables a more aggressive context reading. this can be useful for faster traders, but it may also react earlier and with more sensitivity.
ema fast
sets the fast ema used for trend calculations.
ema slow
sets the slow ema used for trend calculations.
rsi length
sets the rsi period.
adx length
sets the adx period.
best practices
use s-500 as a market filter before entering a trade.
avoid buying when the panel shows a strong bearish context.
avoid selling when the panel shows a strong bullish context.
look for alignment between bias, action, trend, rsi, macd, vwap, volume and volatility.
do not enter only because one line is bullish or bearish. stronger setups usually appear when several elements confirm the same direction.
s-500 can be useful for:
scalping
intraday trading
trend confirmation
multi-timeframe analysis
filtering weak signals
avoiding bad market conditions
reading momentum
reading volatility
session awareness
market preparation before entry
important note
s-500 does not guarantee profit.
it should be used with proper risk management, position sizing, stop loss placement and personal analysis.
no indicator can predict the market with certainty. the best use of this tool is to combine it with structure, support and resistance, volume, trend, volatility and disciplined risk management. Indicator

Indicator

Tomukas Daily Scale-In
I used to think entries were everything.
The more I trade, the more I think most traders are obsessed with the wrong thing.
Everyone wants the perfect entry.
Nobody talks about what happens after the trade is open.
This strategy is built around an idea I've been testing for a long time:
Build the position. Don't marry the entry.
The Daily timeframe is where this framework makes the most sense.
Less noise.
Less stress.
Less staring at charts.
You get a signal, build the position if needed, and let the market do its thing.
Current forward testing is sitting around 7.8% drawdown, which is one of the reasons I keep pushing this framework forward.
Not because it's perfect.
Because it's realistic.
No martingale.
No doubling forever.
No holy grail.
Just trend, position building, and patience.
Most of my scripts end up evolving around the same thing:
Scale-ins.
Because after years of testing indicators, filters, confirmations, and fancy ideas, position management ended up mattering more than almost everything else.
If you decide to test it, let me know what market you're running it on.
And if you find value in the work, boost the script.
It genuinely helps.
Forward testing tools, tracker, and the full framework are in the link in my bio.
— Tomukas
Strategy

Algo torma RiskManagerAlgo Torma RiskManager — Adjustable RR Tool
Managing risk is the most important skill in trading, yet it's the one most beginners overlook. This indicator was built specifically for novice traders who want to stay disciplined and protect their account from the start.
**What it does**
Once added to your chart, set your account size, how much you're willing to risk per trade (recommended 1%), your stop-loss distance in points, and your target risk:reward ratio. The tool then:
- Calculates your exact position size so you never risk more than your defined percentage
- Draws your entry, stop-loss, and take-profit levels directly on the chart as colored boxes and lines, scaled to your risk (red box) and reward (green box) zones
- Tracks losses across up to six trades you log manually and tells you how much of your daily loss budget remains
- Displays everything in a single on-chart info panel for quick reference
**How it works (the concepts behind the math)**
The core calculation is a standard fixed-fractional position sizing model: position size = (account size × risk %) ÷ (stop distance in points × contract size). This is the same method used by most professional risk-management plans — you decide the dollar amount you're willing to lose on a single trade, and the tool works backward from your stop distance to tell you how many contracts or units that translates to. The take-profit level is derived from your chosen risk:reward multiple applied to the same stop distance, so your boxes always reflect a consistent R-multiple rather than an arbitrary price target. The daily loss tracker simply sums the trade losses you input and compares that running total against a max-daily-loss threshold you set as a percentage of your account, flagging when you've hit your limit for the session.
**How to use it**
1. Add the indicator to your chart.
2. In settings, enter your account size, risk per trade %, and max daily loss %.
3. Enter your planned entry price (or leave at 0 to use the current price), your stop-loss distance in points, direction (Long/Short), and target R:R ratio.
4. Set the contract size for your instrument (tooltip includes common futures multipliers: MNQ, MES, NQ, MGC, GC — adjust for other instruments accordingly).
5. Optionally log losses from trades taken earlier in the session into the Daily Loss Tracker fields to see your remaining risk budget update in real time.
6. Use the on-chart boxes, lines, and info panel to confirm your position size and risk before entering a trade manually.
**Important notes**
This is a manual planning and visualization tool only. It does not generate buy or sell signals, does not analyze price action or market structure, and does not predict market direction — the Long/Short selector simply tells the tool which side of your entry to draw the stop and target on. All outputs are derived purely from the numbers you enter; the indicator performs no backtesting and makes no claims about historical or future performance.
This script is for educational and informational purposes only and does not constitute financial, investment, or trading advice. Trading involves substantial risk of loss, and you are solely responsible for your own trading decisions. Always perform your own due diligence and risk management. The author assumes no responsibility for any losses incurred through the use of this tool.
This script is open-source so you can review exactly how each calculation is performed. Indicator

Median Point of ControlMedian Point of Control calculates and displays the median OHLC4 price for customizable time periods, along with percentage-based upper and lower bands. It provides a statistical reference framework for identifying potential support, resistance, and mean-reversion zones.
What It Does
This indicator computes the median of all OHLC4 values within a defined period and plots three horizontal levels:
Median Line — The statistical middle price of the period
Upper Band — Median + user-defined percentage
Lower Band — Median - user-defined percentage
The current period's levels update dynamically as new bars form. Completed periods are preserved as historical reference lines.
Why Median Instead of Average?
The median is the "middle" value when all prices are sorted. Unlike the mean (average), the median is resistant to outliers — a single extreme wick or price spike won't distort the level. This makes it more representative of typical price action during the period.
Two Calculation Modes
Timeframe Mode Define periods using standard timeframes: 4H, Daily, Weekly, Monthly, etc. The indicator automatically detects when each period begins and ends.
Bars Mode Define periods by a fixed number of bars (e.g., every 50 bars, every 100 bars). Useful for non-time-based analysis or custom period lengths that don't align with standard timeframes.
Settings
Calculation Mode: Choose between Timeframe or Bars
Timeframe: Period length when using Timeframe mode
Bars: Number of bars per period when using Bars mode
Band Distance (%): Percentage offset for upper/lower bands from median
Line Colors: Customize colors for median, upper, and lower bands
Line Width: Thickness of the plotted lines
Historical Transparency: Opacity of completed period lines
Max Historical Periods: Number of past periods to display
How To Use
Identify the range: The upper and lower bands create a price envelope based on the period's median. When price approaches these levels, watch for reactions.
Mean reversion reference: The median line represents the "fair value" of the period. Price tends to oscillate around this level.
Breakout detection: If price breaks and holds beyond a band, it may signal trend continuation rather than reversion.
Multi-timeframe analysis: Use Daily median on intraday charts to see where price stands relative to the day's statistical center.
Important Notes
This indicator does not predict price direction. It provides statistical reference levels only.
The current period's median updates with each new bar — this is expected behavior, not repainting.
Historical period lines are fixed once their period closes.
For best results, use on liquid instruments (stocks, forex majors, major crypto pairs).
Indicator

Order Flow Footprint [JOAT]ORDER FLOW FOOTPRINT
A full intrabar footprint engine — POC, Value Area, per-row imbalance detection, stacked imbalance zones, delta-flip alerts, POC-shift alerts, and per-bar footprint ladder labels — built to read like a Bookmap-style auction view directly on a PulseWire chart. Uses the native Footprint API when your plan provides it, with a graceful fallback to lower-timeframe tick-rule reconstruction so the script works on every account tier.
Data source — Footprint API or reconstructed
Three modes, behaviourally identical:
Footprint API — uses request.footprint() with a configurable aggregation (Auto / 1m / 3m / 5m / 15m / 30m). Native bid/ask volume per row when your plan supports it.
Reconstructed — uses request.security_lower_tf() to sample intrabar prints, then assigns each tick to buy or sell via the standard tick rule. Configurable LTF (1m / 3m / 5m / 15m / 30m).
Auto — picks Footprint when available, falls back to Reconstructed. The recommended default.
A configurable Profile Rows input (default 24, max 80) sets the vertical resolution — each chart bar's intrabar volume is bucketed into N horizontal price slices and the footprint is built from those buckets.
Imbalance detection (Bookmap diagonal)
The institutional definition of an imbalance is diagonal , not lateral :
A buy row is imbalanced when buy ≥ ratio × sell (this row's buys vs the row below it's sells).
A sell row is imbalanced when sell ≥ ratio × buy (this row's sells vs the row above it's buys).
The ratio is configurable (default 3.0× — the institutional norm). An optional minimum-row-volume filter mutes illiquid wick rows from being counted as imbalances. When N or more same-side imbalances occur inside a single bar, the Burst alert fires.
Stacked imbalance zones (the headline)
Stacked imbalances are the textbook order-flow structural read: N consecutive same-side imbalanced rows on top of each other. They mark where price had to gap through multiple thin levels to print — and they are reliable revisit zones.
Minimum stack count is configurable (default 4 consecutive rows).
Each stack zone is drawn as a box extending right by a configurable bar count.
Optional glow border on stack zones (toggleable).
Maximum active zones is capped (default 8) — older zones shift out FIFO.
POC + Value Area
Per-bar Point of Control (the row with the highest volume), Value Area High and Value Area Low (the 70%-volume centred range) are computed and toggleable. POC is rendered as a dot; VAH / VAL as lines. A configurable POC Shift Threshold (in mintick units) fires the POC Shift alert when the POC jumps more than the threshold bar-over-bar.
Delta flip detection
Per-bar delta (buy − sell) is computed continuously. The delta-flip alert fires only when delta switches sign after at least N consecutive same-sign bars (configurable, default 5). This filters out the micro-fluctuations that pure-sign-flip detectors would noise on.
Per-bar footprint ladder (optional, heavy)
When enabled, inline labels at every row of every recent bar (configurable history depth) show the buy × sell tuple per row — the full Bookmap-style read. This is visually rich but rendering-heavy; keep it off when scrolling long histories or running on low-end hardware.
Visual system
POC dot in accent yellow.
Value Area lines (VAH / VAL).
Imbalance cells highlighted in palette colour per row.
Stacked imbalance zones with optional glow.
Bar colouring by delta sign (toggleable).
Per-bar delta annotations every N bars (configurable).
Per-bar ladder labels (optional).
A locked Iridescent palette (magenta bull / cyan bear / yellow POC accent on pure black) gives the chart a cyberpunk holographic identity that reads as institutional rather than retail.
Dashboard
Monospaced table positionable to any of nine corners. Surfaces:
Source mode in use (Footprint / Reconstructed) with aggregation/LTF.
Current bar's delta value and sign.
POC price and intrabar volume share.
Imbalance count this bar (buy / sell).
Active stack zone count.
Last delta-flip direction with bar-age.
Alerts
Five alert conditions, each independently controllable:
Stacked Imbalance Zone Formed
POC Shift (POC jumped > threshold)
Delta Flip After Run (delta sign change after N+ same-sign bars)
Buy Imbalance Burst (N+ buy imbalances in one bar)
Sell Imbalance Burst (N+ sell imbalances in one bar)
How to read it
Three reads, in order of conviction:
Stacked imbalance zone — the highest-conviction read. Price had to plough through multiple thin levels to print. Future revisits are reliable reactive zones.
Delta flip after run — regime-change signal. When delta has been net-buying for many bars and finally flips net-selling, the auction direction has just rotated.
POC shift through a structural level — value migration. When the POC moves through a previous-day VAH or VAL, value has migrated and the next session's bias often follows.
Suggested settings
Defaults (1m reconstruction LTF, 24 rows, 3.0× imbalance ratio, 4-stack minimum) are tuned for 5m–15m charts on liquid markets. For 1m scalping, drop rows to 16 and stack minimum to 3. For HTF macro (1H+), raise rows to 36 and stack minimum to 5. The 3.0× imbalance ratio is the institutional Bookmap norm; tighten to 2.5× for more frequent imbalance prints.
Originality
The implementation — the Auto/Footprint/Reconstructed source router, the diagonal-Bookmap imbalance detector with row-volume filter, the consecutive-row stack zone builder with glow border, the POC-shift detector with mintick-unit threshold, the run-length-gated delta-flip alert, the per-bar ladder renderer with history depth control, and the dashboard's holographic palette — is JOAT-original. No third-party code reused. The footprint vocabulary (POC, VAH/VAL, imbalance, stacked imbalance, delta) is public-domain auction-theory language; the implementation here is purpose-built for chart-based Pine v6.
Limitations
Reconstructed footprints are an approximation — the tick rule is the accepted public-market inference for assigning intrabar trades to buy/sell but it is not a direct read of bid/ask volume. Footprint API requires a PulseWire Premium or Ultimate plan and is unavailable on some instruments. The per-bar ladder labels are rendering-heavy; keep them off when historical performance matters. Stacked-imbalance zones honour the max active cap (FIFO eviction) and the extension bars cap.
—
-made with passion by jackofalltrades
Indicator

Random Entry BenchmarkCan Your Strategy Beat Random Entries?
Most traders spend countless hours searching for the perfect entry signal. But what if random entries could achieve similar results?
Random Entry Benchmark is designed to put your strategy's edge to the test. Instead of relying on indicators, patterns, or market predictions, it generates completely random long-only entries and manages trades using realistic risk controls, including stop losses, risk-reward targets, and position sizing.
In strong markets, even random entries can produce surprisingly respectable returns. A profitable backtest alone does not prove that a strategy has a genuine edge. By running multiple independent simulations and analyzing the distribution of outcomes, this indicator establishes a statistical benchmark for what can be achieved without any predictive entry logic.
If your strategy cannot consistently outperform randomness, does it really have an edge?
The simulator reports key metrics including net return, win rate, average trade return, maximum drawdown, and percentile outcomes, helping separate skill from luck.
Key Features
1. Multiple Simulations Instead of a Single Test
A single random backtest tells very little because luck plays a large role. The simulator performs multiple independent random-entry runs and aggregates the results, providing a Monte Carlo-style view of potential outcomes.
Review key performance metrics across all simulations:
- Net Return
- Win Rate
- Average Trade Return
- Maximum Drawdown
2. Percentile-Based Results
Understand the full distribution of outcomes rather than relying on averages alone.
Typical statistics include:
- 25th Percentile
- Median (50th Percentile)
- 75th Percentile
This helps distinguish normal outcomes from exceptionally lucky or unlucky runs.
3. Realistic Trading Rules
The simulator incorporates common risk management techniques used in actual trading:
- Configurable Stop Loss
- Configurable Risk-Reward Ratio
- Risk-Based Position Sizing
This creates a more realistic benchmark for swing trading and day trading strategies.
How to Use
1. Configure stop-loss and risk-reward settings that closely match your own strategy.
2. Run the simulation and review the statistical results.
3. Compare your strategy's performance against the random-entry benchmark.
4. Determine whether your entry methodology produces results that are meaningfully better than chance.
Note: The simulator currently generates long-only entries, and only one position can be open at a time. The strategy compounds returns by sizing positions based on current account equity (initial capital plus net profit/loss), while limiting risk on each trade according to the Max Risk % setting.
Important!
This indicator does not generate trading signals and is not intended as a trading strategy.
Its purpose is to provide a statistical benchmark against which traders can evaluate the effectiveness of their own entry techniques.
Input Parameters
Execution Period
Start Year / Month – Beginning of the simulation period.
End Year / Month – End of the simulation period.
Only for intraday timeframes:
Trading Hours – Time window during which random entries can be generated.
Time Zone – Timezone used for the trading session.
Close @ COB – Forces all open positions to be closed at the end of the regular trading session.
Strategy Parameters
Initial Capital – Starting account balance used for the simulation.
Max Risk % – Maximum percentage of account equity risked per trade.
STP Type – Method used to calculate stop-loss distance (e.g., ATR-based or fixed % change).
Parameter (M) – Value used by the selected stop-loss method.
ATR: Stop Loss = Entry Candle Low − M × ATR(14)
Change %: Stop Loss = Entry Price × (1 − M/100)
PL Ratio – Profit target expressed as a multiple of the stop-loss distance (Risk/Reward ratio).
Max Bars – Maximum number of bars a trade can remain open before being closed.
Simulation Parameters
Random Seed – Controls the random number sequence used for the first simulation run. Using the same seed reproduces identical results.
Entry Frequency – Average number of random trade entries generated during the simulation period.
Runs # – Number of independent simulation runs. Higher values produce more statistically reliable results.
Low-High % – Lower and upper percentiles displayed in the results. Median values are always shown.
Visuals
Dashboard Position and Size – Position and text size of the results output.
Plot – Selects the performance metric to visualize (Equity, Net Profit, Win Rate, etc.). Trade markers are displayed only for the first simulation run.
Output Results
Total Trades – Number of trades executed during the simulation.
Net Return – Total percentage return generated over the simulation period (Net Profit / Initial Capital).
Win Rate – Percentage of profitable trades.
Avg Return – Average percentage net return per trade.
Max Drawdown – Largest peak-to-trough decline in account equity during the simulation.
Percentiles (25%, 50%, 75%) – Results are reported across all simulation runs:
- 25% – Conservative outcome (75% of runs performed better)
- 50% – Median outcome
- 75% – Favorable outcome (25% of runs performed better)
Known Issues
1. PulseWire Execution Limits
Due to PulseWire's script execution time limits, the indicator may occasionally fail to complete all simulations, especially when using a long execution period and/or a large number of simulation runs.
In most cases, reducing the amount of historical data or the number of runs will resolve the issue.
2. Intraday Close at COB
On some symbols and timeframes, PulseWire does not always allow reliable identification of the final bar of the regular trading session. As a result, positions configured to close at the end of the session may occasionally remain open beyond the intended close and be exited on a later bar.
Indicator

IB/ORB Statistical Mapper (hardcoded)# IB / ORB Live Stats — Publication Description
---
## What This Indicator Does
The **IB / ORB Live Stats** indicator studies the relationship between the **Initial Balance (IB)** and a user-defined **Opening Range Breakout (ORB)** window, and builds its probability statistics **live, from the history on your own chart** — there are no pre-supplied or hard-coded numbers anywhere in this script. Every percentage you see is computed from the completed sessions visible on the current symbol and timeframe, so the statistics describe exactly the instrument you are looking at.
Rather than issuing buy/sell signals, the indicator answers structural questions about how each session tends to behave:
- When the IB **high** forms before the IB **low**, which side tends to **break first** afterward — and vice versa?
- Does the side that formed first also tend to break first (a continuation tendency), or reverse?
- Do these tendencies change when the range is unusually **wide** or **narrow**?
- When the ORB closes bullish or bearish, how often does the IB end up bullish or bearish?
It draws a box and midpoint for both the IB and the ORB, and presents two independent, separately-configurable statistics tables — one for the IB, one for the ORB.
---
## Core Concepts and Definitions
Before the statistics make sense, it helps to define each term precisely as the script uses it.
### Initial Balance (IB)
The price range established during the IB window (default **09:30–10:30 ET**). The IB high is the highest traded price and the IB low the lowest traded price during that hour. The IB midpoint is the average of the two.
### Opening Range Breakout (ORB)
A shorter range measured from the open. You set its length in **minutes** (default **15**), and the script builds the corresponding session window automatically. The ORB high, low and midpoint are defined the same way as the IB's.
### Formed First (the order of the extremes)
For each window, "formed first" identifies whether the session **high** or the session **low** was reached **earlier in time**. This is the single most important measurement in the script, and it is deliberately **not** judged from chart bars. A single chart candle frequently contains both the session high and the session low, which makes any bar-by-bar guess unreliable. Instead, the script requests **1-minute intrabar data** and walks those sub-bars in chronological order: the first 1-minute bar whose high reaches the final session high, versus the first whose low reaches the final session low — whichever comes earlier is the extreme that "formed first."
### Broke First (the order of the breakouts)
Once a window's formation period closes, the script watches for price to trade **beyond** that window's high or low. "Broke first" records which side was exceeded **first** during the rest of the regular session. Like formed-first, this uses the 1-minute intrabar feed so a large chart candle cannot hide the true sequence. If neither side is exceeded before the regular session ends, broke-first is recorded as **"none" (Neither)**.
### Direction (Bullish / Bearish / Neutral)
A single composite read of the window, combining where it formed first with where it closed:
- **Bullish** — the **low** formed first **and** the window closed in its **upper** half.
- **Bearish** — the **high** formed first **and** the window closed in its **lower** half.
- **Neutral** — every other combination (mixed signals).
The same definition is applied to both the IB and the ORB so the two can be compared like-for-like.
### Range Size: Narrow / Normal / Wide
Each window's range (high minus low) is classified **relative to its own prior history on the chart**. The classification is computed **before** the current session is added to the history, so "Wide" genuinely means wide relative to the past, not relative to a sample that already includes today. Two methods are available:
- **Z-Score** — today's range is expressed as a number of standard deviations from the historical mean. A range at or below `−Z band` is **Narrow**; at or above `+Z band` is **Wide**; in between is **Normal**.
- **Percentile** — today's range is ranked against history. At or below the Narrow percentile cutoff it is **Narrow**; at or above the Wide cutoff it is **Wide**; in between is **Normal**.
---
## The Statistics Tables, Explained Line by Line
There are two tables — **IB LIVE STATS** and **ORB LIVE STATS** — each with the same structure. The ORB table adds one extra section (the ORB-to-IB contingency) at the bottom.
### Top block — today's live readout
- **Formed first** — for the current session: `HIGH`, `LOW`, `pending` (window not yet complete), or `—` (could not be resolved, e.g. no intrabar data).
- **Broke first** — `HIGH`, `LOW`, `pending` (window not complete), `watching…` (window complete, no break yet this session), or `none` (session ended with no break).
- **Range** — today's range value, followed where available by its z-score (`z=`) and its percentile rank (`%`) against history.
- **Type** — the Narrow / Normal / Wide classification of today's range.
- **Direction** — today's Bullish / Bearish / Neutral composite.
### Cross-tabulation block — the formed-first by broke-first matrix
This is the heart of the tool. It answers: *given which extreme formed first, which side then broke first?* The columns are **BrkH** (broke high first), **BrkL** (broke low first) and **Neither**. There are two rows:
- **HIGH (n)** — all completed sessions where the **high** formed first. The three percentages show how often, within those sessions, the high broke first, the low broke first, or neither side broke. `n` is the number of such sessions.
- **LOW (n)** — the same, for sessions where the **low** formed first.
Each row sums to 100% across its three columns. Reading across the HIGH row tells you, when the high formed first, whether the market tends to continue up (BrkH) or reverse down (BrkL).
- **Same side broke 1st** — a single summary figure: across **all** completed sessions, how often the side that formed first was also the side that broke first. This is the overall **continuation tendency**; a high value means formed-first tends to predict broke-first, a low value means the market tends to reverse the early extreme.
### BY SIZE block — does range size change behavior?
This block splits every completed session into its size bucket and reports, per bucket:
- **Size** — Narrow, Normal or Wide. The bucket matching **today's** session is highlighted.
- **n** — number of completed sessions in that bucket.
- **Brk%** — of those sessions, how often **any** side broke (i.e. the session was not a "Neither" day).
- **Cont%** — of those sessions, how often the side that formed first also broke first (the continuation tendency, but isolated to that size bucket).
This is where the size classification earns its place: you can see directly whether, say, Wide ranges break and continue more often than Narrow ones.
### ORB-to-IB contingency block (ORB table only)
This answers how the early ORB read relates to the later IB outcome. It is a small matrix with the columns **IB Bull**, **IB Bear** and **IB Neut**, and two rows:
- **Bullish (n)** — all completed days where the **ORB** direction was Bullish. The three percentages show how the **IB** direction turned out on those days. `n` is the count.
- **Bearish (n)** — the same, for days where the ORB direction was Bearish.
Each row sums to 100%. The Bullish row directly answers "when the ORB is bullish, how often is the IB also bullish, bearish, or neutral?"
### The "Min sample" dimming rule
Any percentage drawn from fewer completed days than the **Min sample** input is shown in grey rather than its normal colour. This is a guard against over-reading thin data — a 100% figure from 2 sessions is meaningless, and the dimming makes that visually obvious while still letting the count build.
---
## How To Use This Indicator
### Recommended setup
Run it on a **1-minute chart** for the most accurate formed-first and broke-first detection. A 5-minute chart is the practical maximum; on higher timeframes the 1-minute intrabar window loses resolution and the ordering of extremes becomes less reliable. Make sure your chart has enough history loaded — the statistics only accumulate from sessions actually present on the chart, so a fresh chart starts empty and fills in over days of scrolled-back or elapsed history.
### A typical workflow
1. **Let it build.** The longer the history on the chart, the larger every `n`. Figures stay greyed out until they pass the Min sample threshold.
2. **Read the cross-tab.** In the IB table, look at the HIGH and LOW rows to see whether the first extreme tends to lead to continuation or reversal on your instrument.
3. **Check the size split.** In the BY SIZE block, compare Brk% and Cont% across Narrow / Normal / Wide to see whether range size meaningfully changes behavior. Today's bucket is highlighted for quick reference.
4. **Use the ORB-to-IB contingency** to gauge whether the early ORB direction is informative about how the IB resolves.
5. **Combine with your own analysis.** These figures are descriptive context, not signals.
---
## Inputs and Configuration
Every input is listed below with its default and its effect.
### Sessions group
- **IB Period (ET)** — the Initial Balance window. Default `0930-1030`.
- **ORB Period (minutes from 09:30)** — the ORB length in minutes. Default `15`, range `1–120`. The script builds the actual session window from this (e.g. 15 → 09:30–09:45) so you never edit a session string for the ORB.
- **RTH (ET)** — the regular trading hours window during which breaks are tracked and after which each day's outcome is recorded. Default `0930-1600`.
- **Intrabar resolution** — the lower timeframe used for first-touch detection. Default `1` (one minute). This must be at or below your chart timeframe; one minute is strongly recommended.
### IB/ORB Type group
- **Size method** — `Z-Score` or `Percentile`, selecting how Narrow / Normal / Wide is decided. Default `Z-Score`.
- **Z band (Narrow<=-z, Wide>=+z)** — the z-score threshold used by the Z-Score method. Default `0.5`. A range at or below −0.5 SD is Narrow, at or above +0.5 SD is Wide.
- **Narrow <= percentile** — the percentile cutoff for Narrow when using the Percentile method. Default `33`.
- **Wide >= percentile** — the percentile cutoff for Wide when using the Percentile method. Default `67`.
### Display group
- **Show IB (box)** — draw the IB box and midpoint. Default on.
- **Show ORB (box)** — draw the ORB box and midpoint. Default on.
- **Show NY Open Line** — draw a vertical line at the regular-session open. Default on.
- **Box Transparency** — transparency of the box fills, `50–95`. Default `88` (higher is more transparent).
- **IB / ORB / NY Line colours** — colour pickers for each element.
### Tables group
- **Show IB Table** — master toggle for the IB statistics table. Default on.
- **IB Position** — one of nine on-chart positions for the IB table. Default Top Right.
- **IB Text Size** — Tiny / Small / Normal / Large. Default Tiny.
- **Show ORB Table** — master toggle for the ORB statistics table. Default on.
- **ORB Position** — nine-position selector for the ORB table. Default Top Left.
- **ORB Text Size** — Tiny / Small / Normal / Large. Default Tiny.
- **Min sample (dim below)** — the minimum number of completed days a percentage must be based on before it is shown in full colour rather than grey. Default `30`, range `5–200`.
---
## How the Calculations Work (methodology)
All statistics are computed on-chart, in real time, with no external data:
1. **During each window**, the script accumulates the running high and low and collects every 1-minute sub-bar's high and low.
2. **At window close (seal)**, it walks the collected 1-minute bars in order to determine which extreme was reached first, classifies the range size against prior history, computes the composite direction, and freezes the box and midpoint at the closing bar.
3. **After the window, through the regular session (watch)**, it scans the 1-minute feed for the first break of either side and records broke-first.
4. **At the regular-session close (tally)**, it increments the cumulative counters — the formed-first by broke-first cross-tab, the size buckets, and (for the ORB) the ORB-to-IB direction contingency — so each completed day is counted exactly once.
The boxes and midpoints are **frozen** at each window's close; they do not extend across the day.
---
## Important Limitations and Considerations
1. **History-dependent.** All statistics come only from sessions present on your chart. A fresh chart has no sample; figures grow over time and stay greyed until they pass the Min sample threshold. The depth of history PulseWire loads depends on your plan and the chart timeframe.
2. **Intrabar accuracy.** Formed-first and broke-first rely on the 1-minute feed and are most accurate at or below 5-minute chart resolution. On higher timeframes the ordering can be wrong.
3. **Same-sub-bar ties.** If a single 1-minute bar contains both a new extreme and a break of the opposite side simultaneously, the tie is resolved in favour of the high. This is rare but worth knowing.
4. **Descriptive, not predictive.** The indicator reports what has happened on your data. It does not forecast, and it issues no signals. Past frequency does not guarantee future behavior — a 70% tendency still failed 30% of the time.
5. **Not financial advice.** Use these statistics as objective context alongside your own strategy and risk management, never as a substitute for judgement.
---
*This is an analytical and educational tool. It does not provide buy or sell signals and makes no claim about future price direction.* Indicator

IB / ORB Live Stats# IB / ORB Live Stats — Publication Description
---
## What This Indicator Does
The **IB / ORB Live Stats** indicator studies the relationship between the **Initial Balance (IB)** and a user-defined **Opening Range Breakout (ORB)** window, and builds its probability statistics **live, from the history on your own chart** — there are no pre-supplied or hard-coded numbers anywhere in this script. Every percentage you see is computed from the completed sessions visible on the current symbol and timeframe, so the statistics describe exactly the instrument you are looking at.
Rather than issuing buy/sell signals, the indicator answers structural questions about how each session tends to behave:
- When the IB **high** forms before the IB **low**, which side tends to **break first** afterward — and vice versa?
- Does the side that formed first also tend to break first (a continuation tendency), or reverse?
- Do these tendencies change when the range is unusually **wide** or **narrow**?
- When the ORB closes bullish or bearish, how often does the IB end up bullish or bearish?
It draws a box and midpoint for both the IB and the ORB, and presents two independent, separately-configurable statistics tables — one for the IB, one for the ORB.
---
## Core Concepts and Definitions
Before the statistics make sense, it helps to define each term precisely as the script uses it.
### Initial Balance (IB)
The price range established during the IB window (default **09:30–10:30 ET**). The IB high is the highest traded price and the IB low the lowest traded price during that hour. The IB midpoint is the average of the two.
### Opening Range Breakout (ORB)
A shorter range measured from the open. You set its length in **minutes** (default **15**), and the script builds the corresponding session window automatically. The ORB high, low and midpoint are defined the same way as the IB's.
### Formed First (the order of the extremes)
For each window, "formed first" identifies whether the session **high** or the session **low** was reached **earlier in time**. This is the single most important measurement in the script, and it is deliberately **not** judged from chart bars. A single chart candle frequently contains both the session high and the session low, which makes any bar-by-bar guess unreliable. Instead, the script requests **1-minute intrabar data** and walks those sub-bars in chronological order: the first 1-minute bar whose high reaches the final session high, versus the first whose low reaches the final session low — whichever comes earlier is the extreme that "formed first."
### Broke First (the order of the breakouts)
Once a window's formation period closes, the script watches for price to trade **beyond** that window's high or low. "Broke first" records which side was exceeded **first** during the rest of the regular session. Like formed-first, this uses the 1-minute intrabar feed so a large chart candle cannot hide the true sequence. If neither side is exceeded before the regular session ends, broke-first is recorded as **"none" (Neither)**.
### Direction (Bullish / Bearish / Neutral)
A single composite read of the window, combining where it formed first with where it closed:
- **Bullish** — the **low** formed first **and** the window closed in its **upper** half.
- **Bearish** — the **high** formed first **and** the window closed in its **lower** half.
- **Neutral** — every other combination (mixed signals).
The same definition is applied to both the IB and the ORB so the two can be compared like-for-like.
### Range Size: Narrow / Normal / Wide
Each window's range (high minus low) is classified **relative to its own prior history on the chart**. The classification is computed **before** the current session is added to the history, so "Wide" genuinely means wide relative to the past, not relative to a sample that already includes today. Two methods are available:
- **Z-Score** — today's range is expressed as a number of standard deviations from the historical mean. A range at or below `−Z band` is **Narrow**; at or above `+Z band` is **Wide**; in between is **Normal**.
- **Percentile** — today's range is ranked against history. At or below the Narrow percentile cutoff it is **Narrow**; at or above the Wide cutoff it is **Wide**; in between is **Normal**.
---
## The Statistics Tables, Explained Line by Line
There are two tables — **IB LIVE STATS** and **ORB LIVE STATS** — each with the same structure. The ORB table adds one extra section (the ORB-to-IB contingency) at the bottom.
### Top block — today's live readout
- **Formed first** — for the current session: `HIGH`, `LOW`, `pending` (window not yet complete), or `—` (could not be resolved, e.g. no intrabar data).
- **Broke first** — `HIGH`, `LOW`, `pending` (window not complete), `watching…` (window complete, no break yet this session), or `none` (session ended with no break).
- **Range** — today's range value, followed where available by its z-score (`z=`) and its percentile rank (`%`) against history.
- **Type** — the Narrow / Normal / Wide classification of today's range.
- **Direction** — today's Bullish / Bearish / Neutral composite.
### Cross-tabulation block — the formed-first by broke-first matrix
This is the heart of the tool. It answers: *given which extreme formed first, which side then broke first?* The columns are **BrkH** (broke high first), **BrkL** (broke low first) and **Neither**. There are two rows:
- **HIGH (n)** — all completed sessions where the **high** formed first. The three percentages show how often, within those sessions, the high broke first, the low broke first, or neither side broke. `n` is the number of such sessions.
- **LOW (n)** — the same, for sessions where the **low** formed first.
Each row sums to 100% across its three columns. Reading across the HIGH row tells you, when the high formed first, whether the market tends to continue up (BrkH) or reverse down (BrkL).
- **Same side broke 1st** — a single summary figure: across **all** completed sessions, how often the side that formed first was also the side that broke first. This is the overall **continuation tendency**; a high value means formed-first tends to predict broke-first, a low value means the market tends to reverse the early extreme.
### BY SIZE block — does range size change behavior?
This block splits every completed session into its size bucket and reports, per bucket:
- **Size** — Narrow, Normal or Wide. The bucket matching **today's** session is highlighted.
- **n** — number of completed sessions in that bucket.
- **Brk%** — of those sessions, how often **any** side broke (i.e. the session was not a "Neither" day).
- **Cont%** — of those sessions, how often the side that formed first also broke first (the continuation tendency, but isolated to that size bucket).
This is where the size classification earns its place: you can see directly whether, say, Wide ranges break and continue more often than Narrow ones.
### ORB-to-IB contingency block (ORB table only)
This answers how the early ORB read relates to the later IB outcome. It is a small matrix with the columns **IB Bull**, **IB Bear** and **IB Neut**, and two rows:
- **Bullish (n)** — all completed days where the **ORB** direction was Bullish. The three percentages show how the **IB** direction turned out on those days. `n` is the count.
- **Bearish (n)** — the same, for days where the ORB direction was Bearish.
Each row sums to 100%. The Bullish row directly answers "when the ORB is bullish, how often is the IB also bullish, bearish, or neutral?"
### The "Min sample" dimming rule
Any percentage drawn from fewer completed days than the **Min sample** input is shown in grey rather than its normal colour. This is a guard against over-reading thin data — a 100% figure from 2 sessions is meaningless, and the dimming makes that visually obvious while still letting the count build.
---
## How To Use This Indicator
### Recommended setup
Run it on a **1-minute chart** for the most accurate formed-first and broke-first detection. A 5-minute chart is the practical maximum; on higher timeframes the 1-minute intrabar window loses resolution and the ordering of extremes becomes less reliable. Make sure your chart has enough history loaded — the statistics only accumulate from sessions actually present on the chart, so a fresh chart starts empty and fills in over days of scrolled-back or elapsed history.
### A typical workflow
1. **Let it build.** The longer the history on the chart, the larger every `n`. Figures stay greyed out until they pass the Min sample threshold.
2. **Read the cross-tab.** In the IB table, look at the HIGH and LOW rows to see whether the first extreme tends to lead to continuation or reversal on your instrument.
3. **Check the size split.** In the BY SIZE block, compare Brk% and Cont% across Narrow / Normal / Wide to see whether range size meaningfully changes behavior. Today's bucket is highlighted for quick reference.
4. **Use the ORB-to-IB contingency** to gauge whether the early ORB direction is informative about how the IB resolves.
5. **Combine with your own analysis.** These figures are descriptive context, not signals.
---
## Inputs and Configuration
Every input is listed below with its default and its effect.
### Sessions group
- **IB Period (ET)** — the Initial Balance window. Default `0930-1030`.
- **ORB Period (minutes from 09:30)** — the ORB length in minutes. Default `15`, range `1–120`. The script builds the actual session window from this (e.g. 15 → 09:30–09:45) so you never edit a session string for the ORB.
- **RTH (ET)** — the regular trading hours window during which breaks are tracked and after which each day's outcome is recorded. Default `0930-1600`.
- **Intrabar resolution** — the lower timeframe used for first-touch detection. Default `1` (one minute). This must be at or below your chart timeframe; one minute is strongly recommended.
### IB/ORB Type group
- **Size method** — `Z-Score` or `Percentile`, selecting how Narrow / Normal / Wide is decided. Default `Z-Score`.
- **Z band (Narrow<=-z, Wide>=+z)** — the z-score threshold used by the Z-Score method. Default `0.5`. A range at or below −0.5 SD is Narrow, at or above +0.5 SD is Wide.
- **Narrow <= percentile** — the percentile cutoff for Narrow when using the Percentile method. Default `33`.
- **Wide >= percentile** — the percentile cutoff for Wide when using the Percentile method. Default `67`.
### Display group
- **Show IB (box)** — draw the IB box and midpoint. Default on.
- **Show ORB (box)** — draw the ORB box and midpoint. Default on.
- **Show NY Open Line** — draw a vertical line at the regular-session open. Default on.
- **Box Transparency** — transparency of the box fills, `50–95`. Default `88` (higher is more transparent).
- **IB / ORB / NY Line colours** — colour pickers for each element.
### Tables group
- **Show IB Table** — master toggle for the IB statistics table. Default on.
- **IB Position** — one of nine on-chart positions for the IB table. Default Top Right.
- **IB Text Size** — Tiny / Small / Normal / Large. Default Tiny.
- **Show ORB Table** — master toggle for the ORB statistics table. Default on.
- **ORB Position** — nine-position selector for the ORB table. Default Top Left.
- **ORB Text Size** — Tiny / Small / Normal / Large. Default Tiny.
- **Min sample (dim below)** — the minimum number of completed days a percentage must be based on before it is shown in full colour rather than grey. Default `30`, range `5–200`.
---
## How the Calculations Work (methodology)
All statistics are computed on-chart, in real time, with no external data:
1. **During each window**, the script accumulates the running high and low and collects every 1-minute sub-bar's high and low.
2. **At window close (seal)**, it walks the collected 1-minute bars in order to determine which extreme was reached first, classifies the range size against prior history, computes the composite direction, and freezes the box and midpoint at the closing bar.
3. **After the window, through the regular session (watch)**, it scans the 1-minute feed for the first break of either side and records broke-first.
4. **At the regular-session close (tally)**, it increments the cumulative counters — the formed-first by broke-first cross-tab, the size buckets, and (for the ORB) the ORB-to-IB direction contingency — so each completed day is counted exactly once.
The boxes and midpoints are **frozen** at each window's close; they do not extend across the day.
---
## Important Limitations and Considerations
1. **History-dependent.** All statistics come only from sessions present on your chart. A fresh chart has no sample; figures grow over time and stay greyed until they pass the Min sample threshold. The depth of history PulseWire loads depends on your plan and the chart timeframe.
2. **Intrabar accuracy.** Formed-first and broke-first rely on the 1-minute feed and are most accurate at or below 5-minute chart resolution. On higher timeframes the ordering can be wrong.
3. **Same-sub-bar ties.** If a single 1-minute bar contains both a new extreme and a break of the opposite side simultaneously, the tie is resolved in favour of the high. This is rare but worth knowing.
4. **Descriptive, not predictive.** The indicator reports what has happened on your data. It does not forecast, and it issues no signals. Past frequency does not guarantee future behavior — a 70% tendency still failed 30% of the time.
5. **Not financial advice.** Use these statistics as objective context alongside your own strategy and risk management, never as a substitute for judgement.
---
*This is an analytical and educational tool. It does not provide buy or sell signals and makes no claim about future price direction.* Indicator

Indicator

OhMyHtfLibraryLibrary "OhMyHtfLibrary"
HTF candle platform: timeframe alignment, profiles, and (future) packed OHLC / draw helpers. Import as `import daggerok/OhMyHtfLibrary/1 as omhl`. Sweep/OB domain → future `OhMyHtfSweepLibrary` (`omhsl`).
resolveHtfContext(chart_tf_seconds, default_htf, default_candle_count, align_ctf_max_seconds, align_htf, align_enabled, profile_ctf_exact_seconds, profile_htf, profile_enabled, profile_candle_counts)
Resolves HTF string, enable flag, and candle count from Timeframes Alignment + Profiles.
TFA: first alignment row where `chart_tf_seconds <= align_ctf_max_seconds ` wins.
Profiles: first enabled row where `chart_tf_seconds == profile_ctf_exact_seconds ` overrides TFA.
Parameters:
chart_tf_seconds (int) : Chart timeframe in seconds.
default_htf (string) : Fallback HTF when no alignment rule matches.
default_candle_count (int) : Default HTF candle count (HTF Candles input).
align_ctf_max_seconds (array) : Upper-bound CTF seconds per TFA row (length 14).
align_htf (array) : HTF string per TFA row.
align_enabled (array) : Enabled flag per TFA row.
profile_ctf_exact_seconds (array) : Exact chart TF seconds per profile row (length 12).
profile_htf (array) : HTF string per profile row.
profile_enabled (array) : Profile row enabled flags.
profile_candle_counts (array) : Candle count per profile row.
Returns: `HtfContext` with resolved settings.
HtfContext
Resolved HTF timeframe settings for the current chart.
Fields:
htf (series string) : Higher timeframe string for `request.security` and draw logic.
is_enabled (series bool) : Whether HTF features are active for this chart TF (TFA enable flag or profile override).
candle_count (series int) : Number of HTF candles to display (profile may override default).
profile_override (series bool) : True when a profile row matched (exact CTF). Library

Indicator

Machine Learning Smart Money Concepts | GainzAlgo
What It Is
This is a PulseWire indicator that fuses two ideas that don't usually share a chart:
Smart Money Concepts (SMC): classic structure-based trading, specifically Change of Character (CHoCH) detection off swing highs/lows.
K-Nearest Neighbors (KNN) : a simple, non-parametric machine learning method — used to score each new structure break against the most similar structure breaks that happened earlier on the same chart, and to project price targets from how those similar setups actually played out.
In plain terms: every time price breaks structure, the indicator asks 'what did the last several breaks that looked like this one actually do?' and uses that historical evidence to assign a probability and a set of price targets, instead of relying on a fixed, one-size-fits-all rule.
Structure first (the SMC layer)
The indicator finds swing points using ta.pivothigh / ta.pivotlow with a configurable pivot length. It tracks a simple internal trend state (marketTrend: up / down / neutral) and flags a CHoCH:
Bullish CHoCH: price closes above the last swing high while the prevailing state was not already bullish (i.e., a flip up).
Bearish CHoCH: price closes below the last swing low while the prevailing state was not already bearish (i.e., a flip down).
This is the standard SMC definition of "change of character", the first sign that the prior trend may be giving way to a new one.
Turning the break into an actionable trade
When a CHoCH fires, the script doesn't just say "structure broke", it measures how it broke, using three features computed over the bars since the prior swing point:
Volume delta: An estimate of buy vs. sell pressure on each bar (derived from where the close sits within the bar's range, weighted by volume), averaged over the move. Positive = buyers dominant, negative = sellers dominant.
Displacement: The size of the price move since the swing point, normalized by ATR. This tells you whether the break was a forceful, large-range move or a weak, barely-there one, independent of the instrument's raw volatility.
Velocity: Displacement divided by the number of bars it took (i.e., how fast the move happened.)
Finding lookalikes (the KNN engine)
The script keeps a rolling database (capped at 2,000 records, with a "Historical Memory Window" limiting how far back it'll search) of every previous CHoCH's fingerprint, along with what actually happened afterward.
For a new CHoCH, it:
Filters the database to past events of the same direction (bullish vs. bearish) within the memory window.
Computes Euclidean distance between the new fingerprint and every stored one.
Pulls the K nearest neighbors (default 5) — the most similar past setups.
Uses those neighbors to calculate:
1. A Significance Score = % of the K neighbors where price moved further in the favorable direction than the adverse direction (i.e., a "win rate" among lookalikes).
2. Three price targets, built from the distribution of how far those neighbor setups actually ran:
TP1 (mean × conservative scalar) — a toned-down average outcome.
TP2 (median) — the typical outcome.
TP3 (75th percentile) — a stretch/aggressive outcome.
These 3 targets are represented by a drawn box on the chart.
How the database learns (the "training" loop)
This is the part that makes it adaptive rather than a static rule set. On every bar, the script checks: did a CHoCH happen exactly lookahead bars ago (default 20)? If so, it now has enough hindsight to grade that old setup:
It walks forward through those 20 bars and finds the maximum favorable excursion and maximum adverse excursion from the price at the time of that old CHoCH.
It labels the outcome (favorable > adverse → success) and records the fingerprint as it existed at that time, plus the result, into the database.
So the model is continuously and only ever trained on fully resolved history, never on the bar currently forming. It's an online-learning loop: today's signal is scored against yesterday's already-graded outcomes, and today's setup itself won't be graded and added to the database until lookahead bars from now.
What's Drawn on the Chart
CHoCH connector line: solid line from the broken swing point to the breakout close.
Broken level marker: dashed line showing the swing high/low that got taken out, plus a short dotted line marking the actual break.
Wick trace: a stylized multi-layer glow line tracing the wicks leading into the break (purely visual/aesthetic).
CHoCH region fill: soft fill color between the wick trace and the broken level.
Probability badge: small label (▲/▼ + %) printed near the break; gets a ★ if direction confidence is ≥85%.
CHoCH tag: secondary tiny label showing "+CHoCH / −CHoCH" and the raw significance score.
Target box — a shaded box from TP1 to TP3 with a dotted TP2 line through the middle, extended a fixed number of bars to the right.
Dynamic Target Ribbon: a smoothed (SMA-based) pair of lines tracking the most recent bull/bear target, with a fill between them, giving a continuously-updating visual "zone."
Side panel (table): live readout of bias (bullish/bearish/neutral), current significance score, last TP1/TP2/TP3 with counts of how many of each tier are still outstanding (unhit), database size, current volume delta, the active swing high/low, and the K / Window settings.
Settings Guide
🧠 Quant Engine
Look-Ahead Window (Bars): how many bars forward the model waits before grading a past CHoCH and adding it to the database. Larger = more patient/accurate labeling but slower to build a dataset.
Historical Memory Window: how far back (in bars) the KNN search is allowed to look for neighbors. Smaller = more regime-adaptive (recent behavior only); larger = more data per query but less responsive to regime shifts.
K-Nearest Neighbors (K): how many lookalikes to average over. Lower K = more reactive/noisy; higher K = smoother but slower to reflect new behavior.
Min Significance Score (%): the threshold below which the indicator visually marks a signal as low-conviction (greyed badge) rather than colored.
ATR Period: used both for the displacement feature and for badge placement offsets.
Pivot Length: swing-point sensitivity; smaller = more (and earlier, but less confirmed) swings.
🎯 Target Levels
Conservative Scalar: multiplier applied to the mean neighbor outcome to produce TP1.
Target Extension (Bars): how far right the target box are drawn.
How to Use It
Wait for a CHoCH badge. Direction is shown by the arrow; the percentage is the KNN-derived probability that this break behaves like the favorable-outcome neighbors.
Check the significance score against your threshold. Setups below your Min Significance Score print in a neutral grey, treat these as "structure broke, but the model has no strong opinion" rather than as a clean signal.
Use the target box as a planning zone, not a guarantee. TP1 is the conservative/likely zone, TP2 the typical outcome among similar past moves, TP3 the stretch target, read it as a probability-weighted range, not a prediction.
Watch "DB Records" in the side panel. Early on a chart, or on a symbol with limited history, the database will be small and the KNN matches less statistically meaningful. The model gets more reliable as it accumulates more graded history.
Use the ★ marker as an extra filter. It only appears when directional confidence (not the raw significance score, but the bull/bear probability split) is ≥85%.
Cross-reference with the bias/volume-delta in the panel for a quick read on whether the broader trend state and the most recent candle pressure agree with the new signal.
Helpful Trade Tips
Tip 1: Works extremely well on larger timeframes. Sweet spot is hourly and daily, which positions this indicator well for swing traders. Let's take a look at some examples:
Example 1: SPY 30-Minute timeframe
Here, with extended hours disabled, SPY snagged 8/9 of its target boxes.
Example 2: QQQ Weekly
Here, QQQ touched all recent targets.
This highlights the strength of SMC to aid traders in having higher timeframe and longer range expectations based on the structural changes of the market.
Let's highlight a few other examples:
Example 3: BTCUSD on the Daily timeframe
Here, BTC shows its loyalty to SMC, hitting the majority of its targets on the daily timeframe.
Note: One thing to be aware of, to prevent the chart from looking overly cluttered, the box length has been sized to the immedate range to prevent a messy looking chart. However, you can manually adjust the size by using the "Manual Extension (Bars)" feature in the settings menu to increase the width of the target boxes. Here is an example:
Alerts
You can set custom alerts with this indicator to trigger buy and sell signals based on a probability threshold. You can set the probability thresholds for bearish and bullish conditions within the indicators setting menus. Then, toggle over to the alerts menu and set your Buy and Sell alerts. From there, you will be notified when there is a CHoCH that meets your specific probability threshold. Indicator

Indicator

ICT Sessions & Killzones - VWAP + Asia Mid [Dots3Red]█ ICT SESSIONS & KILLZONES — VWAP + ASIA MID
This script visualizes the four major forex trading sessions alongside the four ICT killzone windows, with three analytical additions that most session scripts do not include: a per-session VWAP line, a Daily Open reference, and an Asia range midpoint that extends forward into the London and New York sessions.
It works on intraday timeframes. The number of historical session days displayed is configurable.
█ SESSIONS
Four sessions are available, each independently toggleable:
• Tokyo — 09:00–18:00 Asia/Tokyo
• London — 08:00–17:00 Europe/London
• New York — 09:30–16:00 America/New_York
• Sydney — 07:00–16:00 Australia/Sydney (off by default)
Each session draws a high/low line pair with a soft glow layer behind it, a midpoint dotted line at 50% of the session range, and optional quartile lines at 25% and 75%. A semi-transparent fill box covers the active session range and fades when the session closes. Historical sessions are preserved as lighter boxes and lines, controlled by the Historical Sessions (days) setting.
Session labels are positioned at the horizontal midpoint of the session and display the session name, current range in points, the range as a percentage of ATR(14), and the live VWAP value.
When two sessions are active simultaneously — London and New York from approximately 13:00–17:00 UTC, or Tokyo and London around 07:00–09:00 UTC — an overlap box is drawn over that window in a distinct color.
█ ICT KILLZONES
All four ICT killzone windows are implemented, each individually toggleable under a master switch:
• Asia KZ — 20:00–00:00 America/New_York
• London Open KZ — 02:00–05:00 America/New_York
• NY Open KZ — 07:00–10:00 America/New_York
• London Close KZ — 10:00–12:00 America/New_York
Each killzone box uses a dotted border when closed and switches to a solid border while the window is currently active. This makes it immediately clear at a glance whether a killzone is live or historical.
Most published session scripts include only two killzones (London Open and NY Open). The Asia and London Close windows are included here because they are part of the complete ICT framework — the Asia killzone in particular is where a significant portion of daily liquidity is engineered before the London session opens.
█ SESSION VWAP
A VWAP line is calculated independently for each session. It resets to zero at each session open and accumulates using the standard (High + Low + Close) / 3 × Volume formula throughout the session. This is not a daily or weekly VWAP — it is a session-scoped VWAP that resets with each new Tokyo, London, and New York open.
Price above the session VWAP indicates the session is currently net bullish in terms of volume-weighted price. Price below indicates net bearish. The VWAP value is also shown in the live metrics table and in the session label.
Sydney VWAP is not calculated as volume data on that session is generally unreliable outside of ASX-listed instruments.
█ DAILY OPEN LINE
A horizontal line is drawn at the price level at which the new day opened — specifically at midnight New York time (00:00 America/New_York). This corresponds to the ICT "00:00 line" or daily open reference, which is used in ICT methodology as a key intraday reference level for assessing whether price is trading at a premium or discount relative to the daily range.
The line extends forward through the trading day and refreshes at each midnight NY transition.
█ ASIA RANGE MIDPOINT EXTENSION
When the Tokyo session closes, the midpoint of its high-low range is calculated and projected forward as a dashed line into the London and New York sessions. This level — the 50% point of the Asian range — is referenced in ICT methodology as a key intraday equilibrium. London and New York sessions frequently interact with this level before establishing directional bias.
This extension is drawn automatically and requires no manual input. It is toggled by the Asia Range Mid Extension setting.
█ LIVE METRICS TABLE
A table in the corner of the chart displays eight columns for each active session:
• SESSION — name, color-coded to the session
• STATUS — ACTIVE or CLOSED
• RANGE (PTS) — current range in price ticks
• % ATR — range expressed as a percentage of ATR(14)
• VWAP DEV — current close deviation from session VWAP in percent (green = above, red = below)
• VS PREV % — current session range versus the equivalent previous session's range (green = larger, red = smaller)
• HIGH / LOW — current session extremes
The bottom row shows whether a session overlap is currently active.
█ HISTORICAL DISPLAY
The Historical Sessions (days) input controls how many past session blocks remain visible. The script uses a millisecond-based time window rather than a bar count, so the lookback is stable across different timeframes. Setting this to 1 shows only the current day's sessions. Setting it to 5 retains the last five days. Objects beyond the limit are deleted automatically to manage Pine's drawing object limits.
█ ALERTS
Eleven alert conditions are available:
• Tokyo, London, New York session opens and closes (6 alerts)
• Asia KZ, London Open KZ, NY Open KZ, London Close KZ starts (4 alerts)
• London + New York overlap start (1 alert)
█ NOTES
• Designed for intraday timeframes. Most useful at 5-minute through 1-hour.
• Session times adjust automatically for daylight saving time because timezone identifiers (America/New_York, Europe/London, etc.) are used rather than fixed UTC offsets.
• The Tokyo session uses Asia/Tokyo exchange hours (09:00–18:00). Forex traders who prefer the broader Asian session window (00:00–09:00 UTC) can adjust the time string in the source code.
• All session boxes and killzone boxes are gated to the historical window. Objects outside the configured lookback are not drawn, which keeps performance stable on lower timeframes with many bars.
█ DISCLAIMER
This is a visualization tool for session timing and reference levels. It does not generate trade signals and does not constitute financial advice. Past price behavior within or around session windows does not predict future results. Indicator
