OPEN-SOURCE SCRIPT
OutsiderEdge - Intrabar X-Ray

⚠ This script uses request.footprint() and request.security_lower_tf(), which require a TradingView Premium plan or higher. The script will not load on Free or Plus plans.
Overview — What is X-Ray?
X-Ray is an open-source overlay indicator that dissects every candle into its sub-candle components, footprint data, effort-vs-result dynamics, and trap detection — all in one tool. Instead of guessing what happened inside a bar, X-Ray shows you.
It combines lower-timeframe candle decomposition with native footprint volume profiling, then layers on analytical modules that classify each bar's auction quality and warn for potential traps. Think of it as a bar-by-bar microscope that turns a single candle into a full story.
🔹 FEATURES
- Tooltip Sub-Candle Viewer
Hover over any bar to see its internal structure: all lower-timeframe candles rendered as text-based charts inside the tooltip, with OHLC values, volume, bull/bear ratio, and summary statistics. Choose between a Colored or Black/White theme. - X-Ray Candle Coloring
Recolors your chart candles based on the bull/bear ratio of the sub-candles inside each bar. A bar that closed green but was internally 80% bearish sub-candles will show up differently than a uniformly bullish bar — exposing hidden weakness or strength at a glance. - Mini-Chart
Draws a real candlestick mini-chart to the right of the current bar, showing all lower-timeframe candles as actual visual candles with wicks and bodies. Gives you an instant intra-bar picture without switching timeframes. - Native Footprint Dashboard
A full volume footprint table rendered in the top-right corner using TradingView's nativedata. Displays buy and sell volume per price row, POC highlight, Value Area boundaries (VAH/VAL), delta, total volume, imbalance markers, and heatmap-style cell coloring — all without leaving your chart.Pine Script® request.footprint() - Effort vs Result Analysis
Classifies each bar by comparing volume effort against price result:- High Effort / Low Result — big volume, small body. Possible absorption or exhaustion.
- Low Effort / High Result — small volume, large body. Vacuum/low-liquidity move.
- Efficient Auction — delta-aligned, strong body, healthy volume. Clean price discovery.
- Inefficient Move — delta opposed to direction with notable volume. Divergence warning.
- Trap Detector
Scans each bar for structural trap patterns using delta, wick ratios, and body proportions:- Long Trap Risk — positive delta but bearish close with dominant upper wick.
- Short Trap Risk — negative delta but bullish close with dominant lower wick.
- Breakout Failed — wide range, tiny body, wicks dominate. Likely a fake move.
- Continuation Likely — aligned delta, strong body, minimal wicks. Trend integrity intact.
- Tutor Mode
An educational panel (bottom-right) that walks through each bar step by step: aggression direction, price reaction, imbalance stacking, POC location, volume context, and a final conclusion. Designed to help traders learn how to read order flow by seeing the reasoning broken down in real time.
🔹 HOW TO USE
- Add X-Ray to your chart. Make sure your TradingView plan supports (Premium or higher).
Pine Script® request.footprint() - Hover over any bar — the tooltip reveals the full sub-candle breakdown.
- Check the candle coloring for quick internal sentiment at a glance.
- Open the footprint dashboard (top-right) for row-by-row buy/sell volume, POC, and imbalance markers.
- Look at the chart markers for Effort vs Result classifications and Trap signals.
- Enable Tutor Mode to see a step-by-step explanation of the current bar's auction dynamics.
🔹 SETTINGS SUMMARY
- ① Tooltip: Bar width, number of candles, theme (Colored / B&W), marker style, OHLC/volume/summary toggles.
- ② X-Ray: Enable candle coloring, bull/bear/neutral colors.
- ③ Mini-Chart: Enable, offset, candle width, colors.
- ④ Footprint Dashboard: Enable, ticks per row, Value Area %, imbalance threshold, max rows, colors, totals, imbalance markers.
- ⑤ Data: Lower timeframe selection (Auto or manual), LTF calculation bars.
- ⑥ Effort vs Result: Enable, volume/body MA lengths, classification colors.
- ⑦ Trap Detector: Enable, trap type colors.
- ⑧ Tutor Mode: Enable, panel colors.
🔹 LOWER TIMEFRAME AUTO-DETECTION
When set to "Auto", X-Ray selects an appropriate sub-timeframe based on your chart:
- Daily chart → 1h sub-candles
- 4h chart → 30m sub-candles
- 1h chart → 15m sub-candles
- 30m chart → 5m sub-candles
- 15m chart → 3m sub-candles
- 5m and below → 1m sub-candles
You can override this with a fixed timeframe in the Data settings.
🔹 GOOD PRACTICES
- Use the tooltip and mini-chart to understand what happened inside a bar before making decisions based on its outer shape.
- Effort vs Result works best when combined with context — a "High Effort / Low Result" bar at a key support level tells a very different story than one in the middle of a range.
- Trap signals are most useful near structure (S/R, swing highs/lows, session opens). A trap in the middle of nowhere carries less weight.
- Tutor Mode is great for learning but adds visual clutter — consider disabling it once you're comfortable reading the other modules independently.
- The footprint dashboard shows the last bar only. Scroll through bars to compare footprints over time.
🔹 LIMITATIONS / DISCLAIMER
- Requires TradingView Premium, Expert, or Ultimate plan for full functionality (and
Pine Script® request.footprint()).Pine Script® request.security_lower_tf() - Footprint data availability depends on the exchange and instrument — not all symbols provide tick-level volume.
- Sub-candle data is limited by the parameter (default 300). Very high values may slow chart loading.
Pine Script® calc_bars_count - The Trap Detector and Effort vs Result modules use heuristic thresholds — they are probability tools, not certainties.
Trading involves substantial risk. This tool is for educational purposes only and is not financial advice. Past performance does not guarantee future results. You are solely responsible for your trading decisions and risk management.
Release Notes
v1.0 — Open-source release with: sub-candle tooltip viewer, X-Ray candle coloring, mini-chart, native footprint dashboard, Effort vs Result classification, Trap Detector, and Tutor Mode.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
Try the indicators & strategies for free: whop.com/outsider-edge-ee31/
Join the Discord: discord.gg/DpKqqSSJAe
Visit the website: outsideredge.com/
All content provided is for informational & educational purposes only.
Join the Discord: discord.gg/DpKqqSSJAe
Visit the website: outsideredge.com/
All content provided is for informational & educational purposes only.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
Try the indicators & strategies for free: whop.com/outsider-edge-ee31/
Join the Discord: discord.gg/DpKqqSSJAe
Visit the website: outsideredge.com/
All content provided is for informational & educational purposes only.
Join the Discord: discord.gg/DpKqqSSJAe
Visit the website: outsideredge.com/
All content provided is for informational & educational purposes only.
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。