DiNapoli Levels Confluence Targets [MarkitTick]💡 This script automates the complete DiNapoli-style Fibonacci workflow on any symbol and timeframe: it locates confirmed swing pivots, measures the resulting impulse leg, selects an appropriate Fibonacci retracement entry from that leg, projects a three-tier set of Fibonacci profit objectives from the pullback point, cross-checks a second independent swing for confluence, filters everything through a displaced-average trend context, and then tracks the resulting trade in real time through on-chart levels and a live dashboard.
Rather than requiring a trader to manually draw retracement and expansion tools on every fresh swing, cross-reference two different Fibonacci grids by eye, and mentally track a displaced moving average's bias, the script performs all of that detection, labeling, and state-tracking automatically, and exposes the resulting signals through webhook-ready alert payloads for automation.
✨ Originality and Utility
This is not a rehash of a single built-in Pine tool or a simple retracement drawing utility. It implements the full, interdependent DiNapoli Levels sequence as one coherent system, where each stage consumes the output of the previous one:
Confirmed fractal pivot detection builds the swing skeleton the entire tool depends on.
The most recent three-to-five pivots are used to define both a primary swing (for entries and objectives) and a secondary, older swing (used only for confluence cross-checking).
Retracement depth of the pullback determines which of two Fibonacci entry levels is actually referenced, rather than relying on a single fixed ratio for every setup.
Profit objectives are geometric extensions of the very same swing used to derive the entry, not independent, arbitrarily chosen levels.
The displaced-average trend filter, ATR-based stop, and confluence check all read from the same pivot/swing state, so removing any one of them would break the internal logic rather than simply "simplify" the script.
Because the entry, stop, and all three objectives are all mathematically derived from the same confirmed swing, the tool gives traders a single, internally consistent read on a setup instead of several disconnected indicators layered on top of one another. The value is in the integration and automation of a documented, multi-step methodology, the live tracking of trade state once a signal fires, and the structured webhook output for downstream automation — not in inventing a new mathematical formula.
🔬 Methodology and Concepts
• Pivot and Swing Detection
Swing highs and lows are identified using a standard confirmed-fractal method: a candidate high (or low) is only accepted once it is verified to be the extreme point across a window of Pivot Left bars before it and Pivot Right bars after it. Confirmed pivots are stored in a rolling, alternating high/low sequence (capped at the eight most recent) that forms the script's live market-structure map.
• Swing Classification
The three most recent pivots are labeled, oldest to newest, A, B, and C. A bullish structure requires the sequence low → high → low (A low, B high, C low), representing an upward impulse leg from A to B followed by a pullback into C. A bearish structure is the mirror image. The distance from A to B defines the primary swing used for every subsequent calculation.
• Retracement Measurement
The pullback's depth is expressed as a percentage of the A–B swing: how far price has travelled back from B toward A by the time pivot C is confirmed. This retracement percentage drives both setup validity and entry-level selection.
• Fibonacci Retracement Entry Zone
Two retracement levels of the A–B swing are calculated, at 38.2% and 61.8%. If the confirmed pullback has already reached 61.8% or deeper, the script references the 61.8% level as the entry; otherwise it references the shallower 38.2% level. This dynamic selection reflects the idea that the appropriate entry reference depends on how deep the actual retracement has gone, rather than committing to one ratio for every swing.
• Fibonacci Objective Targets
Three profit objectives are projected from pivot C using the primary swing magnitude, following the classic three-tier DiNapoli objective-point structure:
COP (Contracted Objective Point) — C plus 0.618 times the swing.
OP (Objective Point) — C plus 1.000 times the swing.
XOP (Expanded Objective Point) — C plus 1.618 times the swing.
These represent successively less conservative price projections derived from the same impulse leg used for the entry.
• Setup Validation
A setup is only considered valid when all of the following hold: the alternating high/low pattern is intact, the retracement sits between 38.2% and the user-defined Max Retrace ceiling (filters out pullbacks that have gone too deep to be a valid retracement), the swing's magnitude is at least the Min Swing × ATR threshold (filters out insignificant, noise-driven swings), the swing direction is consistent with the claimed bias, the trend filter (if enabled) agrees, and a confluence zone exists (if Confluence Required is enabled).
• Dual-Swing Confluence Detection
A second, independent swing is measured from an older pivot (A2) to B, and the same 38.2%/61.8% retracement math is applied to it. The script then compares all four combinations of the primary and secondary retracement levels and, if the two closest levels fall within Confluence Tolerance × ATR of each other, marks the midpoint between them as a confluence zone. This reflects agreement between two independently measured Fibonacci grids rather than a single grid taken in isolation, which is the basis of the confluence concept in DiNapoli's original methodology.
• Displaced Moving Average Trend Filter
A short simple moving average (DMA Length) is calculated, and the internal trend comparison uses that average's value from DMA Displace bars earlier, effectively lagging the filter by that many bars. The same average is plotted on the chart with a forward visual offset equal to the same displacement, so the line drawn on the chart lines up with the value actually being compared against price. When enabled, only setups where price sits on the correct side of this displaced average are accepted.
• Stop and Objective Placement Logic
The stop is placed a user-defined multiple of ATR beyond pivot C, giving the stop room proportional to the instrument's own recent volatility rather than a fixed distance. All targets are recalculated fresh each time a new, valid setup fires and remain fixed for the life of that trade.
• Signal Firing and State Tracking
A new signal fires only on a confirmed (closed) bar, and only once per underlying pivot, preventing duplicate or repeated firing on the same structure. Once fired, the script tracks live high/low crosses against the stop and each objective; a stop hit takes priority over a same-bar target hit, and each hit updates the relevant level's on-chart label and color permanently for that trade. The Lock Signal input can freeze the presently tracked setup on the real-time bar so that a fresh pivot does not override an open position mid-trade.
⏱️ Confirmation Lag Notice
Because a pivot cannot be confirmed until Pivot Right bars have elapsed past it, both the pivot itself and any signal built from it only become visible on the chart after that many bars have passed — the resulting lines and labels are drawn retroactively onto a swing that has already formed. This is a structural characteristic of any confirmed-pivot Fibonacci tool rather than a flaw, but it does mean a signal never appears exactly at the live turning point; it appears with a short, deliberate confirmation delay.
The script contains no request.security() calls and references no higher-timeframe or future data, so outside of this inherent pivot-confirmation delay there is no forward-looking bias in the setup logic. Entry signals fire only on confirmed, closed bars, and once a signal and its levels are drawn they do not later shift to a different bar or disappear — they are only replaced outright when a new, opposite setup fires.
The DMA line's forward visual offset is a display convention matching the traditional presentation of a displaced moving average: the values plotted are ordinary trailing averages, simply drawn shifted to the right so the line visually tracks price with the same lag the trend filter itself uses internally. It is not a projection or forecast of future price.
🎨 Visual Guide
• Trade Level Lines and Labels
When a setup fires, five horizontal lines and their accompanying labels extend from the signal bar: the Stop (solid, thicker line), Entry (dashed), and the COP, OP and XOP objectives (dashed, drawn in progressively fuller shades of the same bullish or bearish color to reflect their increasing distance). All five lines automatically extend to the current bar while the trade remains open, and extend up to the closing bar once the trade is stopped out or reaches XOP.
• Fibonacci Node Reference Line
A dotted line marks whichever of the two retracement levels (38.2% or 61.8%) was not selected as the entry, shown for reference so the alternate level remains visible alongside the chosen one.
• Confluence Line
When a confluence zone is detected and the Confluence Line option is enabled, a dashed line marks the midpoint between the two agreeing Fibonacci levels from the primary and secondary swing grids.
• Merged Labels
When two or more levels land at the same price, their labels are merged into a single combined label (separated by a middle dot) instead of stacking overlapping duplicate labels, keeping the chart readable.
• Signal Markers
A "BULL" or "BEAR" label is plotted at the low or high of the firing bar respectively, colored to match the configured bullish or bearish color.
• Displaced Moving Average Line
The DMA is plotted in its configured color, shifted forward on the chart by the DMA Displace setting, matching the internal trend-filter reference described above.
• Live Dashboard Table
An on-chart table (position configurable to any corner) shows, row by row: symbol and timeframe, Lock status, current bias, which Fibonacci node is active, retracement depth as a ten-block progress bar with percentage, whether confluence was present, the Entry/Stop/COP/OP/XOP price levels, risk-to-reward expressed as a block bar scaled to 5R, progress toward OP as a block bar, current trade status (open, or which level was hit), the swing size, the current ATR value, and the number of bars elapsed since the last signal.
📖 How to Use
Wait for a "BULL" or "BEAR" marker and its accompanying level lines to appear; remember these will appear with the short pivot-confirmation delay described above rather than exactly at the swing extreme.
On a bullish setup, price will already be sitting in the retracement zone of the prior up-leg; the Entry line marks the DiNapoli-selected reference level, the Stop sits an ATR-buffered distance beyond the swing low, and COP/OP/XOP are staged, increasingly distant profit levels. Bearish setups mirror this on the downside.
Enable Confluence Required to restrict signals to setups where two independently measured Fibonacci grids agree — this produces fewer but more selectively filtered setups.
Leave the DMA Filter enabled to only take setups aligned with the displaced-average trend context, or disable it to see every structurally valid swing regardless of that bias.
Use Lock Signal on the real-time bar if you are already in a tracked trade and do not want a newly forming pivot to override the current levels mid-position.
Watch the dashboard's Status row and block-bar visualizations for a fast read of retracement depth, risk-to-reward, and progress toward the OP objective without needing to read exact prices.
Configure the Alerts group's action strings to match the JSON keys your webhook or automation platform expects, then use TradingView's "Any alert() function call" option to route long, short, close, objective-hit, and stop-hit events.
Treat the Stop, COP, OP and XOP levels as a structured framework for planning risk and staged exits, not as a guarantee that price will reach any particular level — always size positions according to your own risk tolerance.
⚙️ Inputs and Settings
• Core
Pivot Left / Pivot Right — number of bars required on each side of a candidate swing point before it is confirmed; larger values confirm more significant but slower-appearing swings.
Min Swing × ATR — minimum size, in ATR multiples, an A–B swing must have to be considered valid, filtering out noise-sized structures.
Max Retrace — the deepest retracement (as a fraction of the swing) still accepted as a valid pullback.
ATR Len — lookback period for the Average True Range used throughout the stop, minimum-swing, and confluence-tolerance calculations.
• Filters
DMA Filter — toggles the displaced-average trend requirement on entries.
DMA Len / DMA Displace — period and forward displacement of the trend-filter average.
Confluence Required — toggles whether a confluence zone is mandatory for a setup to fire.
Confluence Tol × ATR — maximum distance, in ATR multiples, between two Fibonacci levels for them to be treated as confluent.
• Trade Tools
Lock Signal — freezes the currently tracked setup on the real-time bar, blocking new signals from overriding it.
Stop Buffer × ATR — distance, in ATR multiples, the stop is placed beyond pivot C.
• Visuals
Fibnodes — shows or hides the unused Fibonacci reference node line.
Confluence Line — shows or hides the confluence-zone line.
Signal Markers — shows or hides the BULL/BEAR labels.
DMA Line — shows or hides the displaced moving average plot.
• Dashboard
Show Dashboard — toggles the on-chart table.
Position — selects which chart corner hosts the dashboard.
• Alerts
Long / Short Action, Close Long / Close Short Action — the "action" values sent in the JSON payload for entries and exits.
COP / OP / XOP Action, Stop Action — the "action" values sent when each objective or the stop is hit.
• Colors
Individual color controls are provided for the bullish and bearish themes, stop, entry, each of the three objectives, both Fibonacci nodes, the confluence line, the DMA line, label text, the dashboard's three-tier progress-bar shading, and the dashboard's header, background, and text colors, allowing the full visual theme to be adapted to any chart background.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The core methodology follows Joe DiNapoli's published approach from "Trading with DiNapoli Levels" (1998), which combines a displaced moving average for trend context with Fibonacci retracement levels for entry timing and a three-tier set of Fibonacci expansion objectives — the Contracted, standard, and Expanded Objective Points — for profit projection. The script's DMA filter and COP/OP/XOP target structure are direct implementations of that framework.
The use of Fibonacci ratios in price analysis traces back to the Fibonacci sequence itself (Leonardo of Pisa, 13th century) and its adoption into market analysis through Ralph Nelson Elliott's wave theory and W.D. Gann's work on proportional price relationships, later formalized by DiNapoli into a discrete, rules-based entry and objective framework.
Swing-point identification via a confirmed left/right bar window reflects the standard swing-high/swing-low definition used broadly across technical analysis, closely related to the fractal concept popularized by Bill Williams, and provides an objective, repeatable substitute for discretionary chart reading.
Average True Range, developed by J. Welles Wilder, supplies the volatility-normalized basis for the stop distance and minimum-swing filter, allowing the same input values to scale automatically across instruments and volatility regimes rather than relying on fixed point or pip distances.
The confluence-detection logic reflects the broader "cluster" or "confluence zone" concept found throughout Fibonacci-based technical analysis: treating agreement between two independently derived retracement grids as a stronger signal than either grid considered alone, a filtering approach explicitly discussed within DiNapoli's own writings on Fibonacci analysis.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. 지표

Strong Pressure Zones | ProjectSyndicateStrong Pressure Zones
Strong Pressure Zones maps where market pressure is concentrated — then waits for the trap. Every swing pivot becomes a volume-weighted pressure pool, drawn as a round heat bubble sized by how much pressure sits there and stamped with a live 0–10 strength rank inside it. Then the engine watches for the one event that flips an ordinary level into a high-conviction reversal: a sweep of the zone (the liquidity grab) followed by a reclaim back through it (the failed break). A pressure pool swept below and reclaimed is a bear trap. A pool swept above and reclaimed is a bull trap. Your chart stays clean — bubbles, level bands and a number, nothing else — while the engine tracks every grab-and-reclaim underneath.
Most level tools trade the bounce or trade the break. This one grades the pressure behind the level, and trades the trap.
GBPUSD
🫧 Pressure Bubbles — the visual that carries the read
Each pressure pool is a filled circular bubble sitting on its level. Bubble size = pressure magnitude (volume × range concentrated there), so the heaviest pools are unmistakable at a glance. The number inside = live 0–10 strength. A soft glow halo gives every pool its heat. One look tells you where pressure is stacked, how heavy it is, and how strong the level rates — without reading a single line of text off to the side.
🌐 Pressure Fuel — native on every market, aggregated on BTC
On any symbol — Gold, Silver, Forex, Indices, Futures, stocks or crypto — pressure is measured from that market's own volume, so the read is correct everywhere out of the box. On Bitcoin pairs it goes a step further and aggregates Binance + Coinbase + Bitstamp into one deeper book, so BTC magnitude reflects the broader crypto tape instead of a single venue's slice. The switch is automatic: chart a BTC pair and the multi-exchange aggregation kicks in; chart anything else and it uses that instrument's native volume — nothing to toggle.
📊 Volume × Range Magnitude — real weight, not just a wick
A pool's magnitude is volume multiplied by the bar's range at formation — the classic footprint of a level where size actually traded and leveraged positions rest. Big participation on a wide bar builds a heavy pool; a thin, quiet pivot builds a light one. Magnitude is then ranked relative to the other live pools on your chart, so the heaviest pressure always reads at the top of the scale and the map re-ranks itself as new pools form.
🎯 The Reclaim Engine — the core
Each zone is treated as a pool of resting liquidity where the crowd parks its stops. A wick that pierces a zone border by your Min Sweep Depth is a sweep — a liquidity grab, not a normal touch. If price then closes back through the zone within the Reclaim Window, the breakout has failed: that's the reclaim, the contrarian event the whole tool is built around. Grab the stops, fail the break, reverse.
🟩🟥 Multi-Zone Pool — both sides, always live
Swing-low pivots build long-pressure pools below price (support); swing-high pivots build short-pressure pools above (resistance) — a full pool of levels tracked at once, not one per side. Overlap suppression keeps the read clean, a max-bubbles cap keeps it fast, and the oldest pools recycle automatically.
XTIUSD
🧲 Sweep vs. Hold — the separation that matters
A wick that dips into a zone and closes back inside is a hold — it strengthens the level (its retest count). A wick that pierces clean through it by the sweep depth is a grab. The engine never confuses the two, so a genuine liquidity raid is flagged the moment it happens.
♻️ Reclaim Confirmation — border, midline, or far side
Choose how far back through the zone price must close to confirm a reclaim: the near border (loose), the midline, or the far border (strict). Deeper confirmation means fewer, higher-quality reclaims. An optional RSI momentum-extreme filter only accepts a bullish reclaim while oversold and a bearish reclaim while overbought — strictly contrarian.
💥 Genuine Break & Flip — when it isn't a trap
If price accepts beyond the border — a decisive close through, or no reclaim inside the window — the level genuinely broke. The zone doesn't just vanish: it flips its side in place and becomes a breaker, ready for break-and-retest continuation.
⚡ Sweep-Defense Memory — defended levels get stronger
Every time a zone is swept, reclaims and holds, it logs a defended sweep and its strength rises. A pool that has trapped traders and survived is exactly the pool that matters — and the ranking reflects it. Defended counts persist; they never un-count to flatter the chart.
XAUUSD
🔢 0–10 Strength Ranking — printed inside every bubble
Each pool carries a live grade inside the bubble, blending its pressure magnitude (ranked against the other live pools) with defense quality — held retests, volume, rejection-wick depth and defended sweeps — with idle decay so stale, ignored levels fade back down. Magnitude is what makes a level matter even before it's tested; defense is what earns it the top of the scale. Set a strength floor and weak pools simply dim out, leaving only the levels that earned attention.
📏 Recent-Only Discipline — no stale rails from 90 bars ago
Pools older than your Max Level Age are removed, so the chart shows the pressure that's actually in play right now — not a graveyard of levels dragged forward as if they were still active. Widen it when you want deeper history; keep it tight for a pure recent read.
🎨 Fully Themed & Configurable
Vertical spectrum coloring by price height (the heat look) or clean by-side coloring (teal longs / magenta shorts); adjustable bubble size boost, score text size and number format; magnitude weight, contrast and lookback; strongest/weakest transparency and glow; thick level bands (width up to 10 so lines read as zones) with their own transparency, style and projection; plus the full detection, sweep/reclaim, strength-weight and decay controls.
🔒 Honest, Non-Repainting Core
Pools anchor to confirmed swing pivots — which, like all pivots, confirm a few bars after the fact; that is inherent, not a defect. A reclaim is evaluated on the reclaim bar's close and is fixed once that bar closes; on the live forming bar it can still flicker until close, as any close-based read does. Defended-sweep counts persist and never un-count. The 0–10 strength is a descriptive ranking framework for directing attention, not a backtested edge. Multi-exchange aggregation applies on BTC pairs; every other market ranks on its own native volume automatically.
NQ
🔔 Native Alerts
Proximity to a long/short pressure pool and to a strong pool, zone touch/retest, zone sweep (liquidity grab), zone break (accepted), and the headline events: Bullish Reclaim, Bearish Reclaim, and Any Reclaim.
🎯 Why this is different
Bounce tools fade every touch and get run over on the break. Breakout tools buy the break and get trapped on the reclaim. Strong Pressure Zones measures the pressure behind each level first, ranks the heaviest pools, then waits for the market to show its hand — the stop-raid and the failed break — and only then frames the reversal. You react to the trap, at the level that had the weight to matter.
🎯 How To Trade It — Two Approaches
Everything hinges on one read: did a heavy, high-strength pool just get swept and reclaimed?
◾ 1) Fade the trap — trade the reclaim (the core thesis)
Use when a large, high-strength pool is swept and price closes back through it.
▪️ Mark the strong pools (7+) — big bubble, high number. These are the levels with the weight worth defending.
▪️ Wait for the sweep: price wicks clean through the pool, grabbing the liquidity resting beyond it (Zone Sweep alert).
▪️ Trigger: price closes back through the pool within the reclaim window (Bullish / Bearish Reclaim alert). The breakout failed.
▪️ Entry: on the reclaim, in the reclaim's direction — long when a long-pressure pool is swept low and reclaims, short when a short-pressure pool is swept high and reclaims.
▪️ Stop: beyond the sweep extreme; if price re-breaks and accepts there, it was real acceptance, not a trap — stand aside.
▪️ Target: the opposite side of the pool first, then the next pool / unswept level in your direction.
⚖️ The cleanest version: a heavy long-pressure pool (big bubble, 8/10, already carrying a defended sweep) gets raided — price spears below it and stops out the longs — then snaps back and closes above it within a couple of bars on a volume surge, RSI stretched oversold. Grab, fail, reverse. That is the exact event this tool is built to frame.
◾ 2) Stand down — the map says wait
▪️ Clean acceptance, not a reclaim — price closed and held beyond the border (Zone Break alert). The level genuinely broke; don't fade it.
▪️ Light, weak pools only — small bubbles and low numbers everywhere means nothing heavy worth defending. Let structure develop.
▪️ No sweep yet — a pool being approached is not a pool being reclaimed. Wait for the grab and the close back through.
Rule of thumb: heavy pool + strong number + sweep + reclaim in the same direction → fade the trap toward the pool's far side. Genuine break/acceptance, light/weak pools, or no reclaim yet → stand down until the map agrees.
🚀 Markets & Timeframes
Works on every market, on any timeframe — Gold (XAUUSD), Silver, Forex, Indices, Futures, stocks and Crypto. The pressure-and-reclaim logic is symbol-agnostic: each instrument is ranked on its own volume, so you get the same clean read on gold, the DAX, EURUSD or an equity that you get on BTC. Bitcoin pairs additionally benefit from multi-exchange (Binance + Coinbase + Bitstamp) aggregation for a deeper pressure picture — applied automatically, nothing to switch. Where a symbol carries little or no volume, magnitude leans on range and the sweep-and-reclaim engine still works in full.
💡 Cleanest Setup
Raise Min Sweep Depth and set Reclaim Confirmation to Midline or Far Border for fewer, cleaner traps; keep Max Level Age tight so only live pressure shows; nudge Magnitude Weight toward 0.8 if you want size to dominate the ranking, or down toward 0.5 to reward defended levels more; and keep the RSI filter on when you want strictly contrarian reclaims. 지표

Triple EMA MTF Supertrend ConfluenceTriple EMA & Multi-Timeframe Supertrend Confluence is a technical analysis indicator designed to help traders identify market direction, trend changes, and potential areas of alignment across multiple moving averages.
The indicator features three fully adjustable Exponential Moving Averages (EMAs), with default settings of 20, 50, and 200. Each EMA is displayed using a distinct colour and generates individual bullish and bearish flip labels when price moves across the respective EMA.
The indicator also includes a configurable Multi-Timeframe Supertrend, allowing traders to monitor higher-timeframe trend direction while analysing lower-timeframe price action. The Supertrend is displayed with colour-coded bullish and bearish lines, together with optional shaded areas extending between the Supertrend line and the candles.
A confluence dashboard provides a clear overview of each EMA's current direction, overall EMA alignment, and Supertrend status. When all three EMAs align bullishly or bearishly, the indicator displays a confluence label and provides corresponding alert conditions.
Individual EMA flip labels include an optional expiry feature, allowing traders to automatically remove older labels after a selectable number of candles. This helps maintain a cleaner and more organised chart.
Key Features:
• Three adjustable EMAs with individual colour coding
• Bullish and bearish EMA flip labels
• Configurable Multi-Timeframe Supertrend
• Bullish green and bearish red Supertrend shading
• EMA confluence detection
• Real-time trend status dashboard
• Optional Supertrend flip labels
• Selectable individual EMA label expiry
• Alert conditions for EMA flips, Supertrend flips, and EMA confluence
This indicator is intended as a visual decision-support tool. It does not guarantee trading results and should be used alongside appropriate risk management and independent market analysis. 지표

Monte Carlo Simulation BuilderMonte Carlo Simulation Introduction:
Monte Carlo simulation in the context of financial markets is an economic forecasting model that combines stochastics and probability theory to predict potential future price moves. The simulation uses price data that is already available to generate various future price paths. Once the price paths are generated, a probability distribution produces an interval containing the simulated price paths between the minimum and maximum future price returns and defines a mean price return as the most likely expected future price at the point in time defined by the time period utilized in the simulation.
Step-by-Step Guide on Applying the Monte Carlo Simulation Builder:
1. Choose an underlying symbol and timeframe to simulate: Every symbol that operates with price bars can be simulated. However, for a sufficient simulation, there should be enough bars in the historical period. A stock that just had its IPO some hours or days ago may not have the necessary number of historical bars for a sufficient simulation.
2. Define the Historical Bar Levels and Projected Bar Levels: For every simulation, the Historical Bar Levels and Projected Bar Levels can be chosen. A smaller amount of Historical Bar Levels would be sufficient for short-term and local trends (choosing a smaller amount of Historical Bar Levels would not be ideal for a long-term simulation). A higher amount of Historical Bar Levels would be more sufficient for middle-to-longer term analysis (Example: A 3-year simulation could be based on 10-year Historical Bar Levels).
3. Define the Number of Simulations and Path/Curves Display: In the Monte Carlo Simulation Builder, the Number of Simulations defines how many simulations will be calculated. The Path Transparency regulates how transparent the paths will appear in the simulation. A lower Path Transparency will show the simulated price paths in a higher color density. The Path Width regulates how thick the statistical interval curves of the Monte Carlo Simulation will be displayed. The Statistical Curves displayed can also be modified, including which curves should be shown and how thick the curves should be displayed.
4. Run the Simulation: Once the simulation is played, the visualization of the simulation defines a practical range of the most likely outcomes of the future price action considered for the underlying asset and time period. The Statistical Curves help to define possible outcomes. For example, the minimum curve can be used to calculate the maximum drawdown for the underlying period. You can efficiently modify the simulations and see if a similar range results from different assumptions.
4-Chart Split Screen Demonstration With 4 Selected Monte Carlo Simulations:
The Statistical Element Results Explained:
Current Price: Price from which the historical returns are calculated and from which the Monte Carlo Simulation will project the future return paths and statistical curves.
Timeframe: Current timeframe perspective for which the indicator uses the historical and predictive bar amounts. (Examples: Monthly timeframe = monthly bars used in simulation, Weekly timeframe = weekly bars used in simulation).
Historical Bar Levels = The number of historical returns represented as bars that are entered in the Monte Carlo Simulation Builder tab.
Projected Bar Levels = The number of future returns represented as bars that are projected in the Monte Carlo Simulation chart price action beginning from the current price.
Mean Return / Bar = The average historical logarithmic returns for all of the bar returns of the historical bar time period (Example: Daily average return of the historical bar time period when a daily timeframe is set).
Volatility / Bar = The historical sample standard deviation of log returns for all bars of the historical time period (Example: Total sample standard deviation of the historical weekly bars when weekly historical bar levels are set).
Historical Period Return = The actual price return of the historical period beginning set by the Historical Bar levels till the current price bar.
Maximum = Highest possible upper price return outcome implied by the Monte Carlo Simulation.
95th percentile = Price below which, on average, 95% of the expected upcoming price action predicted by the Monte Carlo Simulation will lie.
75th percentile = Price below which, on average, 75% of the expected upcoming price action predicted by the Monte Carlo Simulation will lie.
Mean = The most likely expected upcoming average price according to the Monte Carlo Simulation.
Median = Half of the expected upcoming prices will lie on or below this value according to the Monte Carlo Simulation.
25th percentile = Price below which, on average, 25% of the expected upcoming price action predicted by the Monte Carlo Simulation will lie.
5th percentile = Price below which, on average, 5% of the expected upcoming price action predicted by the Monte Carlo Simulation will lie.
Minimum = Lowest possible lower price return outcome implied by the Monte Carlo Simulation.
Mean Projected Return = The expected percentage return from the current price to the most likely expected upcoming average price (mean).
Probability > Current = The probability that the upcoming price return implied by the Monte Carlo Simulation will be higher than the current price.
Probability < Current = The probability that the upcoming price return implied by the Monte Carlo Simulation will be lower than the current price.
Summary
The Monte Carlo Simulation Builder is an ideal indicator to simulate future price returns by analyzing historical price returns. It helps traders and investors predict future price scenarios and set up a trading strategy that considers maximum drawdowns, average returns, and the highest possible profits based on historical price returns. By considering the probability of higher or lower prices in the future in comparison to the current underlying symbol price, traders and investors can set up their trading or investing strategy around the potential probabilities. 지표

지표

Advanced Support Resistance ZonesAdvanced Support Resistance Zone
www.tradingview.com
What This Indicator Is
Advanced Support Resistance Zones is an automatic support and resistance tool that finds the real swing highs and lows on any chart and turns them into live, self-updating price zones instead of plain single-price lines. Each zone is a shaded band with a clear label showing whether it is resistance or support, the exact price level, and how many times price has reacted to it. The single most significant zone on the chart is highlighted separately so the strongest level always stands out. A live dashboard in the corner of the chart summarizes the current structure at a glance, so a trader does not need to manually count zones or measure distances.
Why It Was Built
Manually drawing support and resistance is slow, inconsistent, and different from one trader to the next. Two traders looking at the same chart often mark completely different levels depending on mood and experience. This indicator removes that inconsistency by using a fixed, repeatable method every single time: it looks only at confirmed swing highs and lows, groups nearby ones together into a single zone instead of drawing dozens of overlapping lines, and keeps a running count of how many times each zone has actually mattered to price. The goal is a clean, objective map of the levels that price itself has already proven are important, updated automatically as new data comes in.
How It Works
The engine watches for confirmed swing highs and swing lows using a standard pivot detection method. Every time a new swing high forms, it is treated as a resistance candidate; every new swing low is treated as a support candidate. Instead of creating a brand new zone for every single pivot, the script first checks whether the new pivot is close enough in price to an existing zone of the same type. If it is close enough, the two are merged together using a running weighted average, so the zone's price slowly centers itself on the true average of every touch, and its touch counter goes up by one. If nothing close enough exists yet, a brand new zone is created. Each zone is drawn as a shaded rectangle so its thickness reflects normal market noise around that level rather than being an impossibly thin, unrealistic line.
Every zone also tracks whether price is currently sitting inside it. A touch is only counted the moment price freshly enters the zone after having been outside it, which stops a slow, grinding move through a zone from being counted as dozens of touches. When price fully closes beyond a zone in the opposite direction, the zone is understood to be broken, and because a broken resistance level frequently goes on to act as support afterwards (and the same in reverse for a broken support level), the zone flips its role, resets its touch count, and continues tracking from there rather than disappearing outright. To keep the chart readable, only a limited number of zones are kept active at once; if that limit is ever exceeded, the zone that currently sits farthest away from the live price is removed first, since it is the least relevant to what is happening right now.
How To Read The Chart
Every zone is labeled directly on its own band. A red label reading RES followed by a price and a touch count is a resistance zone; a green label reading SUP followed by a price and a touch count is a support zone. The number before the small x is simply how many separate times price has reacted to that exact level since the zone was formed, so a zone showing a higher number has been tested and respected more often than one showing a low number. Exactly one zone at a time, the one with the highest touch count among everything currently active, is drawn in a distinct highlight color and marked with a star symbol next to its label, making the single most important level on the chart impossible to miss.
How To Use It For Analysis
Start by identifying where price currently sits relative to the nearest zones above and below it; this alone tells you whether the market has room to move or is already pressing against a meaningful level. When price approaches a zone with a high touch count, treat it with more respect than a fresh, barely-tested one, since it represents a level the market has already agreed on multiple times. Watch for a reaction at the zone, a stall, a wick rejection, or a reversal, as confirmation that the level is holding; a clean close through the zone instead signals that it has broken, at which point the same level flips role and becomes worth watching in the opposite direction going forward. The starred strongest zone deserves the closest attention of all, since it represents the single level the market has interacted with the most. Used this way, the indicator is not a standalone buy or sell signal generator, but a structural map that should be combined with your own entry timing, trend reading, and risk management.
What The Dashboard Shows
The dashboard sits in the corner of the chart and updates on every new bar. The first row shows how many zones are currently active on the chart. The row labeled At Price tells you immediately whether the current price is sitting inside a resistance zone, inside a support zone, or simply between zones with open space on both sides. The Nearest Above row shows the closest resistance zone sitting above the current price, along with how far away it is measured in multiples of average recent volatility, so the same reading means roughly the same thing on a calm day as on a wild one. The Nearest Below row shows the same information for the closest support zone underneath price. The Strongest Shelf row always reports whichever single zone currently has the highest touch count anywhere on the chart, together with its price, so you never have to hunt for it visually. The final row, Structure State, gives a one line plain English summary of the current situation, such as sitting inside resistance, sitting inside support, or ranging between zones.
Settings Worth Knowing Before Use
The pivot detection sensitivity, the average volatility length used to size and measure zones, how thick each zone band is drawn, how close a new pivot needs to be to merge into an existing zone, how many zones are kept active at once, and every color used can all be adjusted from the indicator's settings panel to suit different instruments, timeframes, and personal preferences.
Disclaimer
This indicator is a technical analysis tool and does not constitute financial advice. Touch counts describe how many times price has historically reacted to a level, not a guarantee that it will do so again. All trading involves risk, and past reactions to a level do not guarantee future results. Always use proper risk management and combine this tool with your own analysis before entering any trade.
Original Script Declaration
Script Name: Advanced Support Resistance Zones
Author: Michael_Fx_Trader
Publisher: Michael_Fx_Trader
Rights: Copyright Michael_Fx_Trader. All rights reserved.
Originality Statement: This is an original work, designed and coded from scratch by Michael_Fx_Trader. The pivot clustering zone detection engine, which converges each zone's center using a running weighted average rather than ever expanding boundaries, the touch count based strength tracking, the automatic role reversal logic that flips a broken resistance zone into a support zone and a broken support zone into a resistance zone, the strongest zone highlighting system, and the live information dashboard were all independently conceived and implemented for this publication. No proprietary source code, private scripts, or copyrighted material belonging to any other author has been copied, mashed up, or reused in any part of this script.
Author Verification and Declaration: I, Michael_Fx_Trader, am the sole author and publisher of this script. I hold full authorship rights over its source code, its underlying logic, and its visual presentation. Support and resistance analysis using swing pivots is a well known, generic technical analysis concept not owned by any individual author; only the specific detection, clustering, scoring, and dashboard logic built around it here is original to this script.
www.tradingview.com 지표

RSI Signals EntriesRSI Signals Entries — Publish Description
What This Indicator Is
RSI Signals Entries is a four-level Relative Strength Index (RSI) tool built to turn the classic overbought/oversold RSI reading into a clear, actionable signal system. Instead of a plain single-line RSI, it plots a colour-coded RSI with four defined levels — Over Buy, Resistance, Support, and Over Sold — and automatically marks potential Sell and Buy opportunities both on the RSI pane itself and directly on the price candles, together with a fixed confidence "Strength %" label for every signal.
Why It Was Built
Reading raw RSI values and deciding when a reading is "extreme enough" to act on is subjective and inconsistent from one trader to another. This script removes that guesswork by defining four fixed levels up front and applying two distinct, repeatable rules on top of them: a pure RSI-extreme rule for the strongest, highest-confidence reversals, and a level-plus-candle-confirmation rule for slightly less extreme readings that still show real rejection at a key zone. Every signal is labelled with the same fixed strength value every time it appears, so the trader always knows which of the two rules produced it.
How It Works
The four RSI levels
Over Buy: 79.90
Resistance: 67.90
Support: 34.90
Over Sold: 19.90
The RSI line itself changes colour depending on which zone it is currently in (Over Buy, Resistance, neutral, Support, or Over Sold), so the current market condition is visible at a glance without reading the exact number.
The strong-candle filter
A candle only counts as "strong" when its body (the distance between open and close, not counting wicks) is at least a chosen multiple of the average candle body size over a recent lookback period. This stops the indicator from reacting to small, indecisive candles.
The two signal rules
Extreme rule (Over Buy / Over Sold): whenever RSI reaches the Over Buy or Over Sold level, a signal fires immediately with a fixed Strength of 80%. No candle confirmation is required, because the RSI reading itself is already at its most extreme.
Zone-confirmation rule (Resistance / Support): whenever RSI is sitting inside the Resistance zone (between Resistance and Over Buy) or the Support zone (between Over Sold and Support) and a strong candle closes in the reversal direction, a signal fires with a fixed Strength of 70%. This rule needs the extra candle confirmation because the RSI reading on its own is not yet at a true extreme.
Every signal is plotted twice: once on the RSI pane at the exact RSI value where it fired, and once on the price chart directly above or below the triggering candle, so the same event can be read from either view. Each chart-side signal also draws an Entry line, a Stop-Loss line, and a Take-Profit line at a configurable pip distance, so the trade plan is visible the moment the signal appears.
Step-by-Step: How to Take Each Entry
1. Over Buy entry (Sell, 80% strength)
Watch the RSI line rise into the Over Buy zone (79.90 and above).
The moment RSI reaches this level, a red downward triangle appears both on the RSI pane and above the corresponding candle on the price chart, labelled "80% Sell".
Enter a Sell position at or near the close of that candle.
Use the auto-plotted Entry / Stop-Loss / Take-Profit lines as your reference levels, or set your own stop just above the recent swing high and your target using your own risk-reward preference.
2. Resistance entry (Sell, 70% strength)
Watch the RSI line move up into the Resistance zone (between 67.90 and 79.90), without yet reaching Over Buy.
Wait for a strong bearish candle to close while RSI is still inside this zone — this is the rejection confirmation the rule requires.
Once that candle closes, a red downward triangle appears on both the RSI pane and the price chart, labelled "70% Sell".
Enter a Sell position at or near the close of that confirming candle, using the plotted Entry / Stop-Loss / Take-Profit lines as your reference.
3. Over Sold entry (Buy, 80% strength)
Watch the RSI line fall into the Over Sold zone (19.90 and below).
The moment RSI reaches this level, a green upward triangle appears both on the RSI pane and below the corresponding candle on the price chart, labelled "80% Buy".
Enter a Buy position at or near the close of that candle, using the plotted Entry / Stop-Loss / Take-Profit lines as your reference.
4. Support entry (Buy, 70% strength)
Watch the RSI line move down into the Support zone (between 19.90 and 34.90), without yet reaching Over Sold.
Wait for a strong bullish candle to close while RSI is still inside this zone — this is the rejection confirmation the rule requires.
Once that candle closes, a green upward triangle appears on both the RSI pane and the price chart, labelled "70% Buy".
Enter a Buy position at or near the close of that confirming candle, using the plotted Entry / Stop-Loss / Take-Profit lines as your reference.
Settings Worth Knowing Before Use
All four RSI levels, the RSI length and source, the strong-candle lookback and multiplier, the two fixed strength percentages, the pip size, and the Stop-Loss/Take-Profit pip distances are all adjustable from the indicator's settings panel to suit different instruments and trading styles.
The indicator calculates on any timeframe, but the default settings are tuned for fast, short-term signals on 1-minute and 5-minute charts. On higher timeframes, the pip-based Stop-Loss/Take-Profit distances should be widened accordingly.
"Wait for Candle Close" is enabled by default so that every signal shown is fully confirmed and will not repaint; disabling it produces faster but less reliable real-time signals.
Disclaimer
This indicator is a technical analysis tool and does not constitute financial advice. The Strength % values are fixed confidence labels describing which internal rule produced a given signal, not a statistical win-rate or a guarantee of outcome. All trading involves risk, and past performance of any signal or pattern does not guarantee future results. Always use proper risk management and combine this tool with your own analysis before entering any trade.
Original Script Declaration
Script Name: RSI Signals Entries
Author: Michael_Fx_Trader
Publisher: Michael_Fx_Trader
Rights: © Michael_Fx_Trader. All rights reserved.
Originality Statement: This is an original work, designed and coded from scratch by Michael_Fx_Trader. The 4-level colored RSI zone engine, the zone-entry armed/fired signal state machine, the fixed-confidence Strength % labeling system, the dual chart + RSI-pane signal display, and the pip-based Entry / Stop-Loss / Take-Profit level drawing engine were all independently conceived and implemented for this publication. No proprietary source code, private scripts, or copyrighted material belonging to any other author has been copied, mashed-up, or reused in any part of this script.
Author Verification / Declaration: I, Michael_Fx_Trader, am the sole author and publisher of this script. I hold full authorship rights over its source code, its underlying logic, and its visual presentation. The Relative Strength Index (RSI) itself is a well-known, generic public-domain technical indicator (J. Welles Wilder) and is not owned by any individual author; only the zone/signal/labeling logic built around it here is original to this script. 지표

Range Compression Z-Score ResearchSummary & Concept
Volatility is cyclical: prolonged compression inevitably precedes aggressive expansion.
Most traditional squeeze indicators (like Bollinger Band inside Keltner Channel squeezes) suffer from two fatal flaws:
They mistake quiet directional trends for consolidations (a stock grinding steadily higher with small candles often falsely looks like a squeeze).
They mistake erratic, single-day spike ranges for true bases (one volatile day followed by several inside days will distort traditional width calculations).
Range Compression Z-Score Research solves this quantitatively. It measures completed N-day price ranges against an extensive historical lookback (e.g., 252 trading days) using Percentile Ranking and Z-Scores, while enforcing strict mathematical sideways price action and daily range stability filters.
When all conditions align, it projects the exact consolidation box directly onto your price chart, identifies clear upper/lower trigger levels, and prints signals strictly on confirmed bar closes.
Key Features and How It Works
1. Statistical Volatility Rarity Engine
Percentile Rank: Measures where the current N-day high-low box ranks compared to all completed N-day windows over the historical sample (for example, a percentile of 5.0% or lower means the range is tighter than 95% of all prior windows).
Z-Score: Calculates how many standard deviations the current percentage range sits above or below the historical mean.
Dual Qualification Modes: Trigger on Percentile only, Z-Score only, or require both (AND / OR).
2. True Sideways Geometry Filter
Consolidations must actually be horizontal, not diagonal trends:
Net Drift / Box Ratio: Measures the absolute price change between the first close and last close divided by the total box height. If the market traveled directionally across the window, it is disqualified.
Linear Regression Slope %: Runs a least-squares linear regression line through closes within the window. Creeping uptrends or descending drift are eliminated.
3. Range Uniformity (Anti-Outlier Filter)
Coefficient of Variation (CV): Compares the standard deviation of individual daily ranges against the average daily range.
Single-Day Cap: Disqualifies fake bases where a single volatile session accounted for nearly the entire multi-day box height.
4. Confirmed Bar-Close Breakout Engine
Zero Wick Fakes: Breakouts and breakdowns require a confirmed candle close beyond the trigger level (close >= Upper Trigger or close <= Lower Trigger). Intraday wicks that poke beyond the line and reject will never trigger false signals.
Customizable Buffers: Add cushion to the breakout levels using an ATR fraction, fixed percentage, or tick count.
Volume Expansion Confirmation: Optional filter to require the breakout candle volume to exceed its 50-period SMA.
Chart and Visual Guide
Lower Oscillator Pane
Green Line / Background: Range is statistically extreme and passes all sideways and stability filters (Qualified Setup).
Teal Line / Background: Range is statistically tight, but failed either the drift, slope, or consistency test (Tight Only).
Gray Line: Market is in normal or expanding volatility (Wait / Inactive).
Orange Line: Your extreme threshold level (for example, 10th percentile or -1.0 Z-score).
"Q" Circles: Marks bars where price is fully qualified for an impending expansion.
Main Price Chart
Color-Coded Compression Boxes: Automatically drawn around qualifying consolidation zones. Boxes are shaded based on rarity:
Lime Green: Extreme tightness (bottom 2% rarity or lower).
Teal: High tightness (bottom 5% rarity or lower).
Blue: Standard qualifying tightness (bottom 10% rarity or lower).
Box Labels: Displays the exact percentile (p) and Z-score (z) directly on the box.
Orange Trigger Lines: Real-time upper and lower breakout levels including your chosen buffer.
BO Up (Green Triangle): Confirmed upside candle close breakout.
BO Dn (Red Triangle): Confirmed downside candle close breakdown.
Real-Time Status Table (Top Right)
Displays live metrics for the current active setup:
Status: QUALIFIED, TIGHT ONLY, or WAIT.
Live Stats: Box Range %, Percentile, Z-Score, Drift Ratio, Regression Slope %, Range CV, and Breakout Trigger Levels.
Recommended Trading Workflow
Higher-Timeframe Compression: Use the default Daily research timeframe (D) to find coiled multi-day bases (for example, 5-day or 6-day consolidation).
Lower-Timeframe Execution: Place the indicator on an intraday execution chart (for example, 5-minute or 15-minute on SPY, QQQ, or major equities).
Wait for Qualification: Look for the lower pane to turn Green and the status table to show QUALIFIED.
Execute on Confirmed Close: Wait for a full candle close beyond the orange trigger line with the BO Up or BO Dn marker.
지표

Delta Flow Ribbon [AlgoNorth]Delta Flow Ribbon
Picture two bars with the same heavy volume. In one, price travels the way that volume was leaning. In the other, it barely moves. A volume histogram draws them the same height. Delta Flow Ribbon is built to tell them apart.
It starts with which way the volume was leaning. Two 14‑strand ribbons, blue for upside flow and pink for downside, each measured against what is normal for that exact time of day. Whichever ribbon sits on top is in control, and the fan opening or closing shows whether that control is building or fading.
The flow behind the ribbons is estimated volume delta: volume with a direction. The script looks at the 1‑minute bars inside every chart bar. Each one's volume counts as upside if it closed up, and downside if it closed down.
Then it checks whether the push worked. Candles light up where flow surges (net flow at least 2.0× normal over three bars, with price travelling with it) and where a hard push stalls (at least 1.5× normal with price travelling 0.35× or less of what that flow would usually move it). Blue for upside, pink for downside, and a lighter shade where the flow was absorbed.
It is a context tool for your own setups. It shows who is in control and when that control is being tested. It does not say what price does next.
🔶 USAGE
🔸 Start with the ribbons. Blue on top means upside flow is running ahead of downside; pink on top means downside is ahead. The bright line on top of each ribbon is its core, the quickest strand. Where the two cores cross, control has changed hands. A ribbon spread wide is flow on the move; a ribbon pulled tight is flow that has settled.
🔸 Then look up at the candles. A solid ▲ above a blue candle marks the start of an upside surge, a solid ▼ below a pink candle, the start of a downside one. A hollow △ or ▽ on a lighter candle marks absorbed flow: a heavy push went in and price barely moved. One arrow per run keeps the chart clean, and the run continues for as long as the candles stay coloured.
🔸 The candles come first and the ribbon confirms. The ribbon is smoothed over 5 to 30 bars, so its peak lands a few bars after the last coloured candle. Read the candle as the event and the ribbon as how much flow has built up behind it (the smoothing can be lowered in the settings for a quicker reaction).
🔸 The sequence worth learning: pink surge candles into a low, a light‑pink absorbed candle at the bottom, then the blue core rising up through the pink. Heavy downside flow met size, then upside flow took over. Weigh it against your own levels. It is context, not a trigger.
🔸 Price climbing while the blue ribbon slides back towards 1.0 is a move running on less flow than it started with. Price flat while a ribbon stays high is flow being soaked up. Both ribbons near 1.0 means nobody is pushing.
🔸 The panel reads the most recent bar, not the part of the chart you have scrolled to: who is in control and for how long, net flow over the last three bars, and the last event. On a live bar it says "forming now" until the bar closes. Full mode adds the raw readings, the delta source and running counts.
🔸 One thing that surprises people: the 09:30 open often shows no coloured candles at all. That is deliberate. Every bar is compared with the average for that same time of day over the last 20 sessions, so heavy flow at the open is just average for the open. A candle only colours when its flow is well above the average for its time of day.
🔶 DETAILS
🔸 Estimated delta. Each chart bar is split into its 1‑minute bars (5‑minute on charts above an hour, hourly on daily). A 1‑minute bar that closed above the previous close puts its volume into upside flow, one that closed below puts it into downside, and an unchanged close keeps the previous direction. Add them up and that is the bar's estimated delta. Where that smaller data is not available, the script places volume by where the close sits in the bar's range instead, and the panel says so.
🔸 Normal for the time of day. Volume, upside flow, downside flow and close‑to‑close travel are each averaged per time slot over the previous 20 sessions. A 5‑minute chart has 288 slots a day, and each one only ever compares itself with its own history. On charts above four hours, or until a slot has enough history, a rolling 300‑bar average takes over and the panel header shows which is in use.
🔸 The ribbons. Upside flow divided by its normal feeds the blue ribbon, downside flow divided by its normal feeds the pink. 1.0 is normal, and each side is measured up to 5×. Every ribbon is the same reading drawn at 14 smoothing lengths spaced from 5 to 30 bars, each passed through three rounds of exponential smoothing, which is what makes the fan open and close. Bars trading under 0.6× normal volume are eased back towards 1.0 so thin trade cannot throw the ribbons around.
🔸 Surge. Net flow = the 3‑bar average of delta ÷ the average one‑way flow for that time of day. A surge is net flow of at least 2.0×, with price travelling in the flow's direction.
🔸 Absorbed flow. Net flow of at least 1.5×, but the 3‑bar price change ÷ the average price change for that time of day comes to 0.35× or less of what that much flow should produce. Expected travel grows with roughly the square root of flow (exponent 0.5): four times the flow is expected to move price about twice as far, not four times. The script measures only the mismatch. Resting size on the other side is one common reason for it, not something the script can see.
🔸 Colours adapt to the chart. Put it on a white or light‑grey background and the ribbons, candles, arrows and panel darken instead of fading out.
🔶 SETTINGS
🔸 Delta: intrabar (default) or bar shape, with the intrabar timeframe on Auto or fixed at 1, 5 or 15 minutes.
🔸 Calibration: time of day (20 sessions per slot) or recent bars (300), plus the quiet threshold (0.6× normal volume).
🔸 Look: fastest strand 5, strand span 25, three smoothing passes, 14 strands, and the two ribbon colours. The defaults are smoothed on purpose. Drop the fastest strand or the passes for a twitchier ribbon.
🔸 Candles: surge at 2.0×, absorbed at 1.5× with price response 0.35×, exponent 0.5, the two candle colours, absorbed shade, arrows once per run or on every candle, arrow size, optional glow.
🔸 Alerts: control change, flow surge and absorbed flow. Pick them as named conditions, or choose "Any alert() function call" to get all three in one alert with the symbol, timeframe and readings in the message.
🔸 Scale: soft (default), log or none, with a knee for how hard extremes are squeezed. Panel: compact or full, on the price chart or in the pane, any corner.
🔶 LIMITATIONS
🔸 The delta is an estimate. It comes from 1‑minute price direction and volume, not exchange‑reported bid and ask trades, and it will differ from a true trade‑by‑trade delta.
🔸 Intrabar history runs out. Older bars beyond it use the bar‑shape fallback, and the panel shows the date the intrabar data begins.
🔸 On a 1‑minute chart there is no smaller timeframe and too few sessions inside the 10,000‑bar window, so it runs on bar shape and the recent‑bars baseline. The panel says so.
🔸 On symbols whose feed reports tick counts rather than traded size (most spot forex and CFDs), the reading is a net tick count, not a volume delta, and the panel flags it.
🔸 The script calculates the most recent 10,000 bars. Readings above 5× normal are shown as 5×.
🔸 The forming bar updates until it closes. Everything on closed bars is fixed.
🔸 Time‑of‑day calibration needs an intraday chart of four hours or less. Daily and weekly charts use the recent‑bars window.
🔶 SUMMARY
Delta Flow Ribbon turns estimated volume delta into two things you can read at a glance. The ribbons show which side is pushing and how hard for that time of day. The candles show where that push surged or was absorbed. Blue for upside, pink for downside, lighter where the flow stalled. It marks conditions, not outcomes.
지표

ADX Compass [Quantum Algo]ADX Compass
═══════════════════════════════════════════════
🔶 OVERVIEW
ADX Compass turns the Average Directional Index into an instrument you can steer by. It answers the four questions the raw index never answers cleanly: how strong is this trend for THIS symbol, which side is driving it, how old is it compared with this market's typical trend, and is it about to fail — and then paints the answers onto the price chart as a strength aura and a directional ribbon, so the reading lives on the candles.
The central upgrade is adaptive strength. Fixed levels like 20 and 25 mean different things on every symbol and timeframe. This tool ranks the index against its own recent history, so "weak" and "strong" are defined by the market you are actually looking at. On top of that it measures trend age against the symbol's own average trend lifespan, filters directional crosses by strength, detects exhaustion as the index turns from a strong peak, and scores each signal family on your exact chart.
═══════════════════════════════════════════════
🔶 WHAT IS THE ADX?
The Average Directional Index, created by J. Welles Wilder Jr., measures the STRENGTH of a trend without regard to its direction. It is derived from Directional Movement: +DI measures upward pressure, −DI measures downward pressure, and the index smooths the spread between them. A rising index means a trend — up or down — is gaining force; a falling index means it is losing force. Direction comes from which directional line is on top.
═══════════════════════════════════════════════
🔶 WHY FIXED ADX LEVELS FAIL
The traditional rule — above 25 means trending — was calibrated on the markets of its era. A quiet index may spend years rarely reaching 25 while a volatile pair lives above it in what is effectively a range. ADX Compass replaces the constant with a percentile rank inside the symbol's recent history: weak below the 30th percentile, building in between, strong above the 70th. The classic fixed levels remain available as a toggle, and the dashboard always shows the live thresholds in use.
═══════════════════════════════════════════════
🔶 WHY IS THIS ORIGINAL?
1. Adaptive strength ranking. Weak, Building and Strong are defined by the symbol's own distribution, never by a hard-coded number, with the live thresholds displayed.
2. Trend Age. When strength enters the strong zone a trend clock starts. Its reading is compared against the average lifespan of this symbol's recent trends and labeled Early, Mature or Late — a maturity gauge that warns before the index visibly rolls over.
3. Strength-filtered directional signals. The T family fires on a directional cross only when strength is already present and rising, removing the whipsaw crosses that make raw Directional Movement unusable in ranges.
4. Ignition and Exhaustion as first-class events. B marks the index breaking into its strong zone with the dominant side; E marks the index turning down from a strong peak — the earliest measurable sign a trend is losing force.
5. The reading on the price chart. A strength aura tints the background in the dominant side's color, intensifying with strength; a directional ribbon through price whose opacity IS the index — bold in strong trends, ghosted in chop.
6. Per-family statistics. Each family's ten-bar outcomes are tracked on your chart, shrunk toward neutral at small samples with a Wilson lower bound, and quoted in every signal's tooltip and on the dashboard.
═══════════════════════════════════════════════
🔶 HOW IT WORKS
— Directional Movement and the index are computed with Wilder's smoothing at configurable lengths.
— The index is ranked inside its history window to derive adaptive thresholds and the current percentile.
— A trend clock runs while strength is strong; completed trend lengths feed the average lifespan used for the maturity label.
— Signals are evaluated on confirmed bars: T on filtered directional crosses, B on strength ignition, E on a confirmed peak-turn in the strong zone.
— Every family feeds its own first-in-first-out outcome samples; the E family is scored on whether the trend actually stalled.
Signals do not repaint. All drawings are capped for performance.
═══════════════════════════════════════════════
🔶 HOW TO USE IT
— Trade the ribbon's opacity: bold ribbon and a full aura mean trend strategies are in their habitat; a ghosted ribbon means range tactics.
— Respect Trend Age: Early trends favor entries on pullbacks, Late trends favor tightening risk and taking profit; the E signal is the confirmation that a Late trend is failing.
— Use B as the regime trigger: strength ignition with the dominant side tells you a range just ended and which way.
— Read the family records before trusting a letter — they tell you how this symbol has historically honored each event.
— Works on all markets and timeframes; the adaptive thresholds recalibrate wherever you load it.
═══════════════════════════════════════════════
🔶 SETTINGS
— Directional Index: directional length, index smoothing, adaptive toggle, fixed levels, history window.
— Signals: visibility, cooldown.
— Statistics: sample cap, minimum samples, shrinkage strength, Wilson z-score.
— Visuals and dashboard: aura and ribbon toggles, ribbon length, full color and position control.
═══════════════════════════════════════════════
🔶 ALERTS
— Directional Cross — the directional lines crossed with strength present and rising.
— Strength Ignition — the index broke into its strong zone.
— Trend Exhaustion — the index turned down from a strong peak.
— Strong Trend Began — adaptive strength entered the strong zone.
═══════════════════════════════════════════════
🔶 FAQ
Q: Does it repaint?
A: No. Signals are evaluated on confirmed bars and never change once printed. The adaptive thresholds move slowly as the history window rolls, but past signals are not re-evaluated.
Q: Does the ADX show direction?
A: The index itself does not — it measures strength only. Direction comes from the directional lines, which this tool reads for you as the Compass row, the aura color and the ribbon color.
Q: Why does the ribbon fade?
A: Its opacity is tied to strength. A faint ribbon is not a bug — it is the tool telling you the trend has no force behind it.
Q: What does "Late" mean in Trend Age?
A: The current trend has already lasted longer than this symbol's average trend. It is not a sell signal; it is a maturity reading that raises the value of the exhaustion signal when it comes.
Q: What do the family percentages mean?
A: The share of past signals in that family after which price had moved favorably ten bars later (for E, the share after which the trend stalled), on the current symbol and timeframe, shrunk toward fifty percent at small samples. They describe history — they are not predictions.
═══════════════════════════════════════════════
🔶 CREDITS
The Average Directional Index, the Directional Movement system and the Average True Range are by J. Welles Wilder Jr. (New Concepts in Technical Trading Systems, 1978). The Wilson score interval is by Edwin B. Wilson (1927). The adaptive strength ranking, trend-age model, signal families, per-symbol statistics, on-chart rendering and all code in this script are original work — no third-party or open-source script code was reused.
═══════════════════════════════════════════════
🔶 LIMITATIONS
— The index is a smoothed, lagging measure; adaptive ranking sharpens its reading but cannot remove the lag.
— Trend Age needs several completed trends on the chart before the average lifespan is meaningful.
— Statistics describe the current chart's history only; past frequencies never guarantee future outcomes.
═══════════════════════════════════════════════
🔶 DISCLAIMER
This indicator is a research and charting tool provided for educational purposes. It is not financial advice, and nothing it displays is a recommendation to buy or sell any asset. Trading involves substantial risk of loss. Always do your own analysis and manage risk responsibly. 지표

Trend My Friend🚀 Trend My Friend (TMF)
Dynamic Midrange Breakout & Multi-Candle Confirmation System
Trend My Friend (TMF) is a Pine Script® v6 trend and momentum indicator designed to identify bullish and bearish market regimes using a Dynamic Price Range, Equilibrium Midrange, and Multi-Candle Confirmation methodology.
Rather than relying on a single candle crossing the midrange, TMF evaluates consecutive candle closes relative to the dynamically calculated equilibrium level. This provides a structured framework for monitoring directional momentum, trend transitions, and dynamic market structure.
________________________________________
📊 Core Concept
TMF is built around three primary components:
Dynamic Range → Midrange Equilibrium → Multi-Candle Confirmation
The indicator continuously calculates the recent high and low of the selected lookback period, determines the midpoint between those extremes, and then evaluates consecutive candle closes around that midpoint.
This creates a simple framework for identifying whether the current market structure is developing above or below its dynamic equilibrium.
________________________________________
⚙️ How Trend My Friend Works
1. Dynamic Range Calculation
TMF first calculates the current market range using the Range Sensitivity Set.
With the default setting of 25, the indicator calculates:
• Upper Range = Highest High of the selected lookback period
• Lower Range = Lowest Low of the selected lookback period
These boundaries update dynamically as new candles are formed.
Upper Range
Represents the highest price recorded during the selected lookback period.
Lower Range
Represents the lowest price recorded during the selected lookback period.
Together, they form the indicator's dynamic structural range.
________________________________________
2. Equilibrium Midrange
After calculating the Upper Range and Lower Range, TMF calculates their midpoint:
Midrange = Lower Range + (Upper Range − Lower Range) ÷ 2
The midrange represents the central equilibrium level of the current range.
It provides the primary directional reference:
Price above Midrange → Bullish Zone
Price below Midrange → Bearish Zone
________________________________________
3. Multi-Candle Confirmation
The key feature of TMF is its Multi-Candle Confirmation mechanism.
The indicator does not confirm a directional regime simply because one candle crosses the midrange.
Instead, TMF checks the number of consecutive candles specified by the Signal Confirmation setting.
The default setting is 3 candles.
🟢 Bullish Confirmation
A bullish regime is confirmed when the required number of consecutive candles close strictly above the midrange.
For the default setting of 3:
Candle 1 → Above Midrange ✓
Candle 2 → Above Midrange ✓
Candle 3 → Above Midrange ✓
Once all required candles satisfy the condition, the bullish regime becomes active.
🔴 Bearish Confirmation
A bearish regime is confirmed when the required number of consecutive candles close strictly below the midrange.
For the default setting of 3:
Candle 1 → Below Midrange ✓
Candle 2 → Below Midrange ✓
Candle 3 → Below Midrange ✓
Once all required candles satisfy the condition, the bearish regime becomes active.
________________________________________
4. Directional Regime
Once the confirmation condition is satisfied, TMF establishes the corresponding market regime.
🟢 Bullish Regime
When the required consecutive closes are above the midrange:
• Trend state becomes Bullish
• Midrange is displayed in Green
• Lower Range becomes the active downside structural reference
• A new Buy signal can be generated
🔴 Bearish Regime
When the required consecutive closes are below the midrange:
• Trend state becomes Bearish
• Midrange is displayed in Red
• Upper Range becomes the active upside structural reference
• A new Sell signal can be generated
________________________________________
🎯 Buy & Sell Signal Generation
TMF is designed to generate signals when a new directional regime is established, rather than repeatedly printing the same signal while the regime remains active.
🟢 Buy Signal
A Buy signal is generated when the bullish regime changes from inactive to active.
Previous State → Not Bullish
Current State → Bullish
→ BUY
This means the Buy label represents the newly established bullish condition according to the indicator's confirmation rules.
🔴 Sell Signal
A Sell signal is generated when the bearish regime changes from inactive to active.
Previous State → Not Bearish
Current State → Bearish
→ SELL
Once the bearish regime remains active, TMF does not repeatedly print Sell labels on every candle.
________________________________________
📈 Visual Interpretation
TMF uses three primary structural lines:
Upper Range
Midrange — Directional Equilibrium
Lower Range
The Midrange changes color according to the confirmed directional state:
🟢 Green Midrange → Bullish Regime
🔴 Red Midrange → Bearish Regime
⚪ Gray Midrange → No Confirmed Directional Regime
The selected SL Line Color is used for the appropriate structural range boundary according to the active trend state.
________________________________________
🔄 TMF Logic — Complete Process
The complete methodology can be summarized as:
1. Highest High + Lowest Low
2. Dynamic Price Range
3. Calculate Equilibrium Midrange
4. Check Consecutive Candle Closes
5. Confirm Bullish or Bearish Regime
6. Detect New Directional Transition
7. Generate Buy / Sell Signal
8. Continue Monitoring the Dynamic Range
This creates a straightforward process for reading directional market structure.
________________________________________
🎛️ Input Parameters
Parameter Default Function
Range Sensitivity Set 25 Number of bars used to calculate the Upper and Lower Range.
Signal Confirmation 3 Number of consecutive candle closes required above or below the Midrange.
SL Line Color Gray Controls the color used for the structural range boundary.
Range Sensitivity Set
This controls the lookback period used to calculate the dynamic range.
Lower value
• More responsive to recent price movements
• Faster structural changes
• More sensitive to short-term market movement
Higher value
• Broader range
• Slower structural changes
• More focused on larger market movements
Signal Confirmation
This controls how many consecutive closes are required to establish a directional regime.
Lower value
• Earlier confirmation
• More responsive to price changes
Higher value
• Requires more sustained movement
• Later confirmation
The appropriate setting depends on the instrument, timeframe, volatility, and trading methodology.
________________________________________
🧭 Trading Framework
TMF can be incorporated into a broader trading methodology as a trend-confirmation and market-structure tool.
🟢 Bullish Framework
After a Buy signal, traders may evaluate:
• Price structure above the Midrange
• Higher highs and higher lows
• Momentum continuation
• Breakout or retest conditions
• Volume confirmation
• Broader market trend
🔴 Bearish Framework
After a Sell signal, traders may evaluate:
• Price structure below the Midrange
• Lower highs and lower lows
• Momentum continuation
• Breakdown or retest conditions
• Volume confirmation
• Broader market trend
TMF is therefore best understood as a technical confirmation tool, rather than a complete standalone trading system.
________________________________________
🛡️ Risk Management
The dynamic range boundaries can be monitored as structural reference levels when developing a risk-management plan.
Long Positions
The Lower Range can be monitored as a potential downside structural reference.
Short Positions
The Upper Range can be monitored as a potential upside structural reference.
Stop-loss placement should be determined according to the trader's individual strategy, volatility, position sizing, market structure, and risk tolerance.
________________________________________
🎯 Trade Management
TMF does not prescribe a mandatory profit-taking method.
Traders can combine TMF signals with their preferred trade-management techniques, such as:
• Fixed risk-to-reward targets
• Previous swing highs/lows
• Trailing stops
• Structural support/resistance
• Opposite TMF regime signals
• Volatility-based exits
An opposing TMF signal may also be monitored as an indication that the current directional regime has changed.
________________________________________
🌐 Suitable Markets
TMF can be applied across a variety of actively traded markets, including:
• Equities
• Index Futures
• Forex
• Cryptocurrencies
• Commodities
• Other liquid instruments
Signal behavior can vary depending on the instrument, timeframe, volatility, liquidity, and selected parameters.
________________________________________
⏱️ Timeframe Considerations
TMF can be used across multiple timeframes, including:
Intraday
• 5-Minute
• 15-Minute
• 1-Hour
Swing / Higher Timeframes
• 4-Hour
• Daily
• Weekly
There is no single parameter configuration that is optimal for every market. Traders should evaluate the settings according to their specific instrument, timeframe, and methodology.
________________________________________
🔔 TradingView Alerts
TMF includes built-in TradingView alert conditions for directional regime transitions.
TMF Long
Triggered when a new bullish regime is established.
TMF Short
Triggered when a new bearish regime is established.
These alerts can be used for chart monitoring and compatible TradingView automation workflows.
________________________________________
💡 Why Multi-Candle Confirmation?
A single candle can temporarily move above or below an important price level before quickly reversing.
TMF therefore requires consecutive candle closes for directional confirmation.
For example, with:
Signal Confirmation = 3
One isolated close above the Midrange is not enough to establish a bullish regime.
The required three consecutive closes must remain above the Midrange.
Likewise, three consecutive closes below the Midrange are required for bearish confirmation.
This makes the methodology focused on confirmed directional movement rather than a single-candle price crossing.
________________________________________
⚠️ Important Considerations
TMF is a technical-analysis and market-structure indicator. It does not predict future prices and does not guarantee profitable trades.
No indicator can completely eliminate market noise, false breakouts, or losing trades under all market conditions.
Signal behavior may differ during:
• Sideways markets
• Low-liquidity conditions
• High-volatility events
• Sharp reversals
• Gap movements
• Rapidly changing market regimes
Users should apply appropriate risk management and consider additional market-structure or confirmation techniques where appropriate.
________________________________________
🔥 Trend My Friend (TMF)
Dynamic Midrange. Multi-Candle Confirmation. Clear Market Structure.
Trend My Friend (TMF) transforms rolling price extremes into a structured visual framework for monitoring directional market regimes.
By combining a Dynamic Price Range, Equilibrium Midrange, and Multi-Candle Confirmation, TMF provides a clean way to monitor when price establishes sustained movement above or below its dynamic equilibrium.
Structured Confirmation — Dynamic Market Structure — Clear Directional Signals
________________________________________
📌 Disclaimer
This indicator is provided for analytical and educational purposes to assist with technical analysis. Past performance does not guarantee future results. Trading involves substantial risk, and users should manage risk appropriately.
지표

지표

C-PowerIndicator "C-Power" (candle buy/sell power) and is designed to dynamically measure and display the buying power (Buyers) and selling power (Sellers) over a specific period.
Simply put: the script analyzes recent candles and displays a small label on your chart showing who currently holds the upper hand in the market, along with their respective percentages.
How the Script Works (Step-by-Step)
1. Volume Filtering:
- The script retrieves market volume and smooths it using an ALMA (Arnaud Legoux Moving Average) over a selected period (5 candles by default).
- It protects the chart from anomalies – if an abrupt, massive volume spike occurs (over 3.5 times the average), the script "caps" it so that a single outlier does not distort the overall result.
2. Gap Protection:
- Instead of using just the raw highs and lows of the current candle, the script compares them with the closing price of the previous candle (prev_close). This ensures that price gaps are factored into the market's true momentum.
3. Garman-Klass Volatility Calculation (GK Volatility):
- This is the mathematical core of the script. It utilizes the advanced Garman-Klass formula, which measures market volatility based on the relationship between the open, high, low, and close prices.
- The result is further smoothed by the ALMA filter, delivering a highly stable representation of market volatility that is resilient against market noise.
4. Z-Score and Probability Estimation (Statistics):
- The script measures where the current price sits relative to the candle's midpoint and divides this by the calculated volatility. This creates a statistical value known as a Z-score.
- Using a built-in Cumulative Distribution Function for a normal distribution (normCDF via the error function erf), the script converts this score into a directional weight between 0 and 1. This weight represents the statistical probability of whether the move is inherently bullish or bearish.
5. Determining Final Power (Buy/Sell Power):
- If trading volume data is available for the asset, the script multiplies the volume by this calculated statistical weight.
- If volume data is unavailable (e.g., on certain indices or Forex pairs), the script relies entirely on the mathematical structure of the price action itself (hence the dynamic text update to GK Price).
- These accumulated values over the specified period (e.g., 5 candles) are then converted into percentages (e.g., BUY: 65.0% / SELL: 35.0%).
6. Chart Visualization:
- A text label is generated on the right side of the chart, shifted forward by a user-defined offset (3 candles by default).
- This label smoothly changes color (gradient) depending on who is dominating the market. If buyers have the upper hand, the label turns green (or your custom bullish color). If sellers take control, it turns red. It remains gray when the market is in balance.
Key Advantages of This Script:
- Versatility: It functions seamlessly both on markets with volume data (crypto, stocks) and markets without it (forex).
- Statistical Framework: Rather than guessing a trend based on simple logic like "the price is going up, so buy," it evaluates mathematical probability and volatility.
Conclusion – Overall, this is a dynamic indicator that utilizes mathematical estimations (Garman-Klass volatility, statistical Z-score, and probability distribution) to estimate the power of buyers and sellers over a selected candle lookback period.Typically, similar indicators fetch data from lower timeframes and rely on a simple logic: a red candle means a drop where sellers won, while a green candle means a rise where buyers won. They then simply aggregate the data and determine the buy/sell power based on the ratio of bullish to bearish candles.This indicator, however, attempts to reconstruct those same relationships mathematically on a single timeframe.Soon, I will release an oscillator that will serve as a historical complement to this indicator. 지표

Market Structure & Momentum [India Chart School]What this does
This indicator tracks the shape of price and reports whether the rest of the chart agrees with it. It finds confirmed swing highs and lows, marks the bar that closes through one of them, and names that break as either a break of structure or a change of character. Around that core it draws the zone the break originated from, shades the part of the NSE trading day you are in, and grades the break against momentum read on the same timeframe.
How the structure engine works
Swing points are confirmed pivots found with TradingView's built-in pivot functions. A pivot high is recognised only after Swing Length bars have closed beyond it, so nothing is drawn before confirmation. Two passes run at once: a major pass at Swing Length, and a minor pass at Internal Length that describes the smaller swings inside the major ones.
When price closes through a confirmed swing point, the script labels it BOS if the break continues the prevailing direction, or CHoCH if it goes against it. CHoCH is the more informative of the two, since it is the first structural sign of a turn.
Order blocks
Rather than taking the extreme candle of the displacement leg, this script walks backwards from the breakout bar to the swing point it broke and takes the most recent candle that closed against the direction of the break. That candle's full range becomes the zone. Zones are removed on invalidation, either on a wick through the level or on a close beyond it, depending on the setting.
Fair value gaps and equal highs/lows
Fair value gaps are three-candle imbalances computed on the chart timeframe, filtered by a minimum size expressed in ATR. Equal highs and lows are consecutive swing points within an ATR-scaled tolerance, joined by a dotted line.
NSE session engine
On intraday charts the background is shaded by IST clock time into six windows: pre-open 09:00–09:15, opening drive 09:15–09:45, morning trend 09:45–11:30, lunch drift 11:30–13:30, afternoon 13:30–14:30, and power hour 14:30–15:30. Most structure tools shade London and New York hours, which describe a trading day unrelated to the NSE. The opening range high and low from the first N minutes are plotted for the rest of the session, and the overnight gap between the previous close and today's open is drawn as a zone that turns grey once filled.
Why RSI, MACD and EMAs are included
These are not signal generators here. They grade structure breaks. A change of character that fires while the higher timeframe, the EMA stack and MACD all disagree is a weaker event than the same break with all three behind it. The dashboard makes that difference visible in one place instead of requiring three additional panes. RSI, MACD and the EMAs 5/20/50 are all computed on the chart timeframe.
Dashboard
A two-column panel reporting swing trend, internal trend, higher-timeframe bias, the last structure event, the current session, RSI value with overbought/oversold tags, MACD direction, whether price sits above or below each of the three EMAs, VWAP side, overnight gap status, opening range, live order block and fair value gap counts, and a confluence count.
The confluence count
The bottom row counts how many of eight conditions currently agree with the swing trend: higher-timeframe bias, internal structure, the EMA stack, RSI side of 50, MACD, VWAP side, a live order block in direction, and whether the bar falls outside the lunch-drift window. This is a count of conditions that are true at this moment. It is not a probability, a win rate, or a forecast, and it should not be read as one. A low count usually means the chart is conflicted and there is no clean read available.
Settings worth knowing
Swing Length is the main control. Raise it on noisy charts before changing anything else. Internal structure can be switched off entirely if the chart feels crowded. Session tints, the opening range and the gap box switch themselves off above intraday timeframes, so the same script works on a daily equity chart without clutter.
Limitations
Confirmed pivots are recognised late by construction. With Swing Length at 10, a swing high is confirmed ten bars after it prints. The structure line is drawn back to where the pivot actually was, which can look like hindsight but is not, since nothing is drawn before confirmation.
In ranging markets, BOS and CHoCH alternate without much meaning. The equal-high and equal-low labels are usually the more honest reading there.
VWAP requires volume. Spot indices carry no volume on most feeds, so that row reads "no volume" and the corresponding confluence condition scores zero. Use the futures chart if VWAP matters to you.
The higher-timeframe bias is offset by one bar and requested with lookahead off. This is what prevents repainting, and it means the reading updates only when the higher-timeframe bar closes. It is the only higher-timeframe request in the script; everything else is computed on the chart timeframe.
Order block definitions vary between tools. The one used here is the last opposing candle before the move. Tools that use the extreme candle of the leg will draw different zones from identical price action. Neither definition is the correct one.
Credits
The visual language of market-structure indicators on TradingView was popularised by LuxAlgo's open-source Smart Money Concepts publication, which served as the reference for how this class of tool is presented on a chart. No code from that script is reused here — the structure engine is written from scratch on TradingView's built-in pivot functions, and the order block definition differs from that publication's approach.
Published open-source under the Mozilla Public License 2.0.
This indicator is educational. It is not investment advice, not a research recommendation, and not a solicitation to buy or sell any security. 지표

Strong H4 Gold Reach Matrix | ProjectSyndicateStrong H4 Reach Matrix Gold answers the one question a discretionary gold trader asks before every H4 bar: where is the next candle likely to trade, and with what odds? It is not a restyled oscillator with an arrow bolted on. It projects the next H4 candle as eight distinct price levels — four above, four below — each carrying a calibrated touch probability, placed by a live volatility-scaled excursion model, cross-checked against the raw empirical behaviour of your own chart, and sharpened by a genuine neural network whose weights were trained offline on XAUUSD H4 and whose forward pass runs live on every bar. The whole network is drawn on the chart as an inspectable diagram, and the projection freezes at each close so it never repaints. You are shown the odds, the model that produced them, and the assumptions behind them — not a single line that quietly redraws as the bar plays out.
⚠️ Gold H4 Only!!! networks was trained on gold H4 data.
🎯 Reach Engine — the core idea. For each new H4 bar the script asks how far price is likely to stretch from the last close, up and down, and converts that into probabilities. The excursion of a bar beyond the prior close, measured in ATR, follows an approximately exponential survival law: the chance of reaching a distance of k·ATR is close to e^(−k/θ), where θ is the typical (mean) ATR-excursion estimated live from a rolling window. Invert it — k = −θ·ln(p) — and any target probability p maps to a precise distance. Four upside and four downside probability targets therefore become eight price levels, each an honest "odds of touching this in the next bar" rather than a round-number guess.
📊 Empirical Survival Cross-Check. A pure model can be elegant and still wrong for the instrument in front of you, so the engine never trusts the formula alone. On every bar it walks the last N completed bars and directly counts how often price actually reached each of the eight thresholds — the raw empirical survival curve of your chart — and blends that with the smooth exponential tail (55/45 by default, fully adjustable from pure-empirical to pure-model). The displayed percentage is this blended, calibrated figure, not the target you dialled in.
🧠 Neural Core. Sitting on top of the statistical engine is a real multi-layer perceptron — 10 inputs, three hidden layers of 14, 12 and 6 tanh neurons, and three linear outputs, for 398 trained weights and 35 biases. It was trained offline by backpropagation on XAUUSD H4 history; the learned matrices are embedded directly in the script, and the on-chart forward pass — weighted sums, biases and tanh activations, layer by layer — reproduces the trained model exactly. Nothing is trained on your chart, so the mapping is fixed and deterministic. Its lifecycle each bar is FEATURE ▸ STANDARDISE ▸ FORWARD ▸ APPLY: the network predicts the next bar's range, its up/down split and its direction, and those outputs feed straight back into the projection — the range forecast sharpens θ (and therefore the spacing of all eight levels and the expected-range box), the split skews the up-vs-down odds, and the direction feeds the secondary tilt.
🔢 Feature Anatomy. The fingerprint is ten causal, percentage-based ingredients read only from completed bars: 5-bar momentum, stochastic range position (14), RSI(14), 5-bar average range %, 5-bar average body %, a short-vs-medium momentum acceleration, ATR %, the ATR(14)/ATR(50) volatility-regime ratio, distance from the EMA(20) expressed in ATR units, and a volume ratio. Working in ratio and percentage space rather than raw price is what lets a single learned mapping run on a market that travelled from the 2,000s into the 4,000s without the price level itself swamping the signal.
📐 Fixed Standardisation — deliberately, not by accident. Each feature is standardised against baked-in training statistics rather than a rolling window. This is a considered choice: the forecastable part of next-bar behaviour lives in the level of volatility, and rolling z-scoring silently erases exactly that level. Standardising against the training distribution preserves it, so the network can actually respond to whether the market is calm or violent right now.
🧊 Frozen at the Close — non-repaint by default. Every input is read from candles that have already closed, and the projection is anchored to the last completed H4 close. The eight levels, their probabilities, the expected-range box and the network's outputs are computed once when the bar opens and stay fixed until it closes — no sliding lines, no intrabar drift, no numbers that quietly improve as the session plays out. A "Live price (intrabar)" anchor is available for those who explicitly want a conditional, moving read.
🧭 No-Lookahead. Every network feature is lagged to the last closed bar and every excursion statistic is causal, so the value printed on any historical bar is identical whether or not the bars after it exist. On-chart machine learning most often fails here; this is built to avoid it.
🧱 Structural Snap + Minimum Spacing. Levels can optionally seat themselves on nearby swing-pivot liquidity or round numbers when one lies within tolerance, so they sit where price actually reacts rather than at arbitrary decimals — and probabilities recompute from the snapped distance. A hard minimum-spacing floor then guarantees the eight levels never glue together near the anchor or after snapping; each is separated from its neighbour by a set fraction of ATR, so every level is distinct and every probability is meaningful.
🧭 Directional Tilt — secondary by design. A small continuation tilt from trend (EMA20/50), momentum (RSI), short-horizon velocity and the network's own direction output shifts the up-vs-down odds. It is deliberately mild and clearly labelled: next-bar direction on gold is close to a coin flip, and the tool treats it that way rather than dressing it up as a signal.
🕸️ Live Network Map. The model is not a black box. The full network is drawn on the chart — an input column tagged with each feature, three hidden columns and an output column carrying RANGE, UP-SHARE and DIRECTION — with every node shaded by its live activation and every connection coloured by weight sign and brightened by the signal actually passing through it. Placement is deterministic (a bars-back offset that drops it cleanly into view, or out past the projection), so it renders exactly where you put it and never wanders off-screen.
📋 Dashboard. A compact panel reports, in real time: symbol/timeframe and lock state, the anchor close, the full 4×4 ladder (price, distance %, distance in ATR, calibrated touch %, and a PRIME/LIKELY/COIN/REACH/TAIL rank per level), the projected High/Low/expected range, a regime read (trend, momentum, volatility state, ATR percentile, stretch, tilt), and a dedicated Neural Forecast block showing the network's range output, its θ contribution, its direction call and the blend weight — with a standing one-line note on where the edge actually is.
🎚️ Controls. The history window and volatility length, the four probability bands, the minimum spacing, the empirical/model blend, the tilt weights, the snap behaviour, the network blend weights, and every visual element — beams, labels, projected candle, the network map's placement, size, connector style and theme, and the dashboard — are all adjustable. None of them change the trained model; they change how you read it.
🎯 Why this is different. Most "AI" indicators restyle an oscillator; most that claim a neural network never show one. This runs an actual trained MLP, draws it live, standardises its inputs so there is no lookahead, freezes each projection at the close so it cannot repaint, cross-checks its probabilities against your own chart's realised behaviour, and states plainly where its edge is and is not.
🚀 Where to use it. The model and calibration were built specifically for XAUUSD on the H4 timeframe, and that is where it is designed to run; the dashboard flags any mismatch. The first bars of a chart are a warm-up while the causal windows fill, after which the projection and dashboard come alive.
🎯 How to trade it
Apply it to XAUUSD H4 and let the windows warm up until the dashboard reads a live projection.
At each new H4 candle, read the eight levels and their calibrated touch probabilities — locked at the open, they will not move. Treat the PRIME/LIKELY levels as high-odds reach zones and the COIN/REACH/TAIL levels as progressively lower-odds stretches.
Use the expected-range box and projected High/Low as context for where the bar may reach — a reference for targets, fades and stop placement — not as an automatic entry.
Glance at the network map and the Neural Forecast block to see whether the model reads the coming bar as expansion or contraction, and whether volatility is being sharpened up or down.
Combine it with your own structure, levels and risk. It describes a likely next-bar envelope with odds; it is not an entry-and-exit system on its own.
⚠️ Important. This is a decision-support tool, not a standalone buy/sell system, and it makes no performance guarantees. Its honest edges are reach probability and volatility, not direction. In leakage-free testing the calibrated bands held up out-of-sample — target reach rates of roughly 85 / 65 / 45 / 25 % realised at about 83–87 / 64–70 / 44–49 / 23–25 % — and next-bar range correlates with current volatility at around 0.57. That range signal is real but regime-dependent: it is strong in trending/clustered-volatility periods and can fall close to zero in quiet stretches (in recent-quarter testing it did exactly that), and the network's out-of-sample range correlation of roughly 0.44 reflects the same regime dependence. Next-bar direction is treated as a coin flip because that is what it is — the up/down split stays near-symmetric and the tilt is a small adjustment, never a signal. The model is fixed and pre-trained, so bars inside its training period are in-sample by nature; genuine out-of-sample behaviour is what you see going forward. It is deliberately a modest network — larger nets overfit this much H4 data and test worse. Always let the candle open so the projection is frozen, and test it on your own data before trading it live.
지표

지표

지표

MACD & RSI Long/Short IndicatorThis indicator generates momentum and trend-reversal alerts by combining standard MACD crossovers with RSI extreme zone breakouts. It relies on an internal state machine and an adjustable signal cooldown timer to filter out market noise and prevent rapid, repetitive entries on lower timeframes.
Core Logic & Indicators
RSI (Relative Strength Index): Triggers LE when crossing above the user-defined oversold line and Short signals when crossing below the overbought line.
MACD: Triggers LE and SE alerts based on the crossover of the MACD line and the Signal line.
EMAs: Plots customizable Moving Averages (9, 21, 50, 100, 200) strictly for visual trend context. EMAs do not dictate trade entries or exits.
Key Features
Modular Signal Routing: Independently toggle RSI or MACD Alerts. When both are enabled, the script executes based on whichever indicator fires first.
Signal Cooldown: A customizable bar delay limits how quickly a new signal can trigger after a previous execution, minimizing false Alerts in choppy conditions.
State Machine Guardrails: Enforces a strict 1-LE / 1-SE alternation rule to prevent multiple overlapping orders in the same direction.
Risk Management: Includes native percentage-based Stop Loss (SL) and Take Profit (TP) parameters.
Date Range Filter: Allows users to restrict execution to specific calendar periods.
How to Use
Select your preferred signal source (RSI, MACD, or both) in the settings panel. Adjust the "Signal Cooldown" parameter based on your specific chart timeframe to filter out immediate whipsaws (higher timeframes may require shorter cooldowns). Use the Enable LE/SE checkboxes to test directional bias independently, and calibrate the percentage inputs to establish your SL/TP risk framework. 지표

Geometry | Manifold LearningGeometry | Manifold Learning (GML) is an experimental market-structure indicator that analyzes price movement from a geometric perspective.
Traditional technical indicators often reduce market behavior to trend, momentum, volatility, or moving averages. GML takes a different approach: it treats recent price observations as points belonging to a locally evolving geometric structure, or "manifold."
The objective is not to predict future prices. Instead, the indicator attempts to describe the current structure of price movement by measuring:
• Geodesic path behavior
• Local price curvature
• Tangent projection
• Local neighborhood density using k-nearest-neighbor concepts
• Intrinsic dimensionality
• Normalized embedding direction
• Local geometric mean
These measurements are combined into a multi-component oscillator designed to help traders study whether recent price action is relatively directional, compressed, dispersed, curved, or undergoing a structural transition.
Core Concept
Financial prices do not always move efficiently from one level to another.
For example , price may begin at 100 and end at 105.
The direct displacement is only 5 points, but the actual path could have travelled:
100 → 103 → 101 → 106 → 102 → 105
The total distance travelled is substantially greater than the final displacement.
GML uses this distinction between direct displacement and travelled path as one way of describing the geometry of recent price action.
A relatively direct path may indicate more organized directional movement, while a large travelled path relative to displacement can indicate a more complex or inefficient local structure.
This concept forms the foundation of the indicator's Geodesic Ratio.
1. Geodesic Ratio
The indicator calculates two distances over the selected embedding window.
Euclidean Distance:
The absolute difference between the current price and the price at the opposite end of the observation window.
Geodesic Distance:
The cumulative absolute movement between consecutive observations within the same window.
The ratio is then calculated conceptually as:
Geodesic Ratio = Travelled Path / Direct Displacement
A larger ratio means price travelled a relatively complicated path to reach its current location.
A smaller ratio represents a more direct path.
The ratio is normalized using its historical mean and standard deviation to produce the displayed Geodesic Ratio Z-score.
Interpretation
Positive/high readings can indicate that the recent path is relatively complex or indirect.
Negative/low readings indicate that the path is relatively more linear compared with its recent behavior.
This measurement should not independently be interpreted as bullish or bearish. It describes the geometry of the path rather than its direction.
2. Local Curvature
GML estimates local curvature using first- and second-order changes in price.
The first difference measures local price movement, while the second difference measures how rapidly that movement itself is changing.
Conceptually, high curvature represents a sharper local bend in the price path.
The raw curvature measurement is normalized into a Z-score relative to its recent history.
Interpretation
Higher positive Curvature Z-scores indicate that the current local bend is unusually large compared with recent observations.
Lower readings indicate a relatively smoother local trajectory.
High curvature does NOT automatically indicate a market reversal.
It simply identifies an area where the local geometry of price has changed more sharply than normal.
The Curvature Threshold input controls how unusual curvature must become before it qualifies as a high-curvature condition within the signal logic.
3. Tangent Projection
The Tangent Projection measures the position of current price relative to a locally smoothed price structure.
The script calculates a local mean and standard deviation over the selected smoothing period and normalizes the current deviation from that local mean.
This creates a standardized representation of where price currently sits relative to its recent local structure.
General interpretation
Above zero:
Price is positioned above its local mean.
Below zero:
Price is positioned below its local mean.
Movement toward zero:
Price is returning toward its local center.
Movement away from zero:
Price is extending farther away from the local center.
The reversal logic additionally examines whether a negative tangent projection has begun recovering.
4. k-Nearest-Neighborhood Distance
The indicator compares the current price with observations inside the selected embedding window and identifies nearby observations based on absolute price distance.
The average distance of the nearest observations provides a local neighborhood-radius estimate.
This value is then normalized relative to its recent history.
Interpretation
Negative kNN Z-score:
The local neighborhood is relatively tight compared with recent conditions.
Positive kNN Z-score:
The local neighborhood is relatively dispersed.
This can be thought of as a geometric measure of local price concentration rather than a conventional volatility indicator.
The signal engine uses this information to distinguish between tighter and looser local structures.
5. Intrinsic Dimensionality
Intrinsic Dimensionality attempts to estimate how the local observations populate the surrounding price neighborhood.
The indicator compares the proportion of observations located inside:
Radius R and Radius 2R
The change in neighborhood occupancy as the radius expands provides a simplified estimate of local dimensional structure.
The result is bounded according to the configured k-nearest-neighbor setting and normalized for visualization.
Interpretation
Rather than giving a direct bullish/bearish signal, Intrinsic Dimensionality is intended as a structural diagnostic.
Changes in this value can indicate that the local organization of price observations is changing.
It is best interpreted together with the other geometric measurements rather than independently.
6. Embedding Coordinate
GML also calculates a directional coordinate from the signed movement of price relative to the total travelled geodesic distance.
The value is bounded between -1 and +1 and subsequently smoothed.
This produces the Embedding Coordinate displayed as an area plot.
General interpretation
Toward +1:
Recent movement is increasingly aligned in the positive direction.
Toward -1:
Recent movement is increasingly aligned in the negative direction.
Around zero:
Directional movement is more balanced relative to the travelled path.
The script specifically monitors transitions through -0.5 and +0.5 as components of its signal logic.
7. Geodesic Mean
The yellow Geodesic Mean displayed on the main price chart is the simple average of the selected price source across the embedding window.
It provides a price-level reference alongside the geometric measurements displayed in the oscillator pane.
It should not be interpreted as a standalone entry or exit signal.
Signal Logic
GML includes two types of visual signals.
R — Manifold Reversal
The green "R" marker represents a potential local structural reversal condition.
It requires several conditions to occur together:
• Local curvature is unusually high
• The embedding coordinate crosses upward through its lower structural region
• The local kNN neighborhood is relatively tight
• Tangent projection is still negative but recovering
The purpose of combining these conditions is to identify situations where price has experienced significant local bending while its embedded directional structure begins recovering from a negative region.
An R marker does not mean that price must reverse.
It indicates that the script's specific geometric reversal conditions have occurred simultaneously.
C — Manifold Continuation
The red "C" marker represents a potential directional continuation condition.
It requires:
• A relatively linear geodesic path
• The embedding coordinate crossing downward through its upper structural region
• A relatively loose kNN neighborhood
This combination is intended to identify a different geometric regime from the reversal condition.
The C marker should therefore be interpreted as a structural continuation condition generated by the model, not as a guaranteed short signal.
How to Read the Indicator
Instead of focusing on a single line, GML is designed to be interpreted as a collection of geometric measurements.
A practical workflow is:
Step 1 — Observe the Embedding Coordinate
Start with the green/red area plot.
Watch how the coordinate behaves around:
+0.5
0
-0.5
Movement from an extreme region toward the center can indicate a change in the directional organization of the recent path.
Step 2 — Check Curvature
Next, examine Local Curvature.
A curvature expansion indicates that price is bending more sharply than it normally has during the current observation period.
High curvature combined with a change in embedding direction can be more informative than curvature alone.
Step 3 — Examine Neighborhood Structure
Use kNN Tightness to determine whether recent observations are relatively concentrated or dispersed.
This helps distinguish different local geometric environments.
Step 4 — Check Tangent Projection
Tangent Projection helps determine where price sits relative to its recent local structure.
For example, a negative tangent projection that begins rising can indicate recovery toward the local center.
Step 5 — Examine Geodesic Behavior
Use the Geodesic Ratio Z-score to understand whether the current price path is relatively direct or unusually indirect.
This provides additional context regarding the efficiency and complexity of recent movement.
Step 6 — Use Signals as Confluence
R and C markers are intentionally generated from multiple conditions.
They are best treated as indications that a specific combination of geometric conditions has occurred rather than as automatic trade instructions.
Users can combine GML with their own analysis of:
• Market structure
• Support and resistance
• Trend direction
• Volume
• Volatility
• Risk management
How Traders Can Use GML
GML can be used in several ways.
Structural Reversal Analysis
Look for situations where curvature expands while the embedding coordinate begins recovering from an extreme region.
This can help identify areas where the geometry of recent price movement is changing.
Trend/Path Quality Analysis
The Geodesic Ratio can help distinguish relatively direct price movement from more complicated paths.
This can provide additional context when evaluating an existing trend.
Compression and Dispersion Analysis
kNN neighborhood measurements provide information about whether recent observations are relatively concentrated or dispersed.
This can help characterize the local market regime.
Confirmation Tool
GML can also be used as a secondary analytical layer alongside an existing trading methodology.
For example, a trader may first identify a setup using market structure and then examine whether GML shows a corresponding change in curvature, embedding direction, or neighborhood structure.
Inputs
Embedding Dimension (N)
Defines the number of recent observations used to construct the local geometric window.
Lower values make the measurements more sensitive to recent price changes.
Higher values analyze a broader local structure and generally produce slower-changing measurements.
Default: 20
k-Nearest Neighbors
Controls the dimensional normalization/reference used by the local-neighborhood calculations.
Default: 5
Smoothing Length
Controls smoothing of the embedding coordinate and the local window used by the tangent-related calculation.
Lower values respond more quickly.
Higher values produce smoother measurements.
Default: 5
Curvature Threshold
Controls the Z-score threshold required for curvature to qualify as unusually high within the reversal condition.
Higher values require more extreme curvature.
Default: 0.5
Price Source
Available sources include:
Close
Open
HL2
HLC3
OHLC4
Default: HLC3
Changing the source changes the price series used by the geometric calculations.
Display Controls
Individual components can be enabled or disabled from the settings:
Show Geodesic Distance
Show Local Curvature
Show Tangent Projection
Show Intrinsic Dimensionality
Show Geodesic Mean on Price Chart
Show Signals
This allows users to simplify the display and focus on the measurements relevant to their analysis.
Information Table
The table in the upper-right corner provides the current values of several important measurements:
Geo Ratio
Curvature Z-score
Tangent Projection
Intrinsic Dimension
Embedding Coordinate
kNN Average Distance
Geodesic Mean
The table is intended to provide a compact numerical view of the current geometric state.
Alerts
The indicator provides alert conditions for:
Manifold Reversal
and
Manifold Continuation
Users can create TradingView alerts from these conditions if they want to monitor when the corresponding geometric setup occurs.
An alert indicates that the defined conditions were satisfied; it does not guarantee that the subsequent market movement will follow any particular direction or magnitude.
Why This Indicator Is Different
GML is not intended to be another conventional oscillator created by combining RSI, MACD, or moving-average crossover conditions.
Its primary calculations are built around geometric characteristics of the recent price path:
• travelled path versus direct displacement
• local curvature
• local tangent/deviation
• nearest-neighborhood distances
• neighborhood scaling
• directional embedding
These measurements are combined to provide a different representation of local market structure.
The purpose is to explore how the geometry of recent price observations changes over time rather than attempting to directly forecast future prices.
Important Limitations
GML is a simplified application of geometric and manifold-inspired concepts to a one-dimensional market price series.
It should not be interpreted as a full academic manifold-learning implementation such as Isomap, locally linear embedding, diffusion maps, or another high-dimensional machine-learning algorithm.
The kNN, geodesic, curvature, dimensionality, and embedding calculations used here are purpose-built approximations designed for real-time chart analysis within Pine Script.
Market prices are noisy and non-stationary. Similar geometric conditions can lead to different outcomes under different market environments.
Signals may also occur during sideways markets, volatile periods, news events, gaps, or other abnormal conditions.
No geometric measurement can determine future market direction with certainty.
Recommended Usage
GML is best used as an analytical and confluence tool rather than as a standalone trading system.
Users should evaluate signals in the context of their own:
market structure analysis, risk tolerance, instrument, timeframe, execution method, and risk-management rules.
Different instruments and timeframes can produce substantially different geometric behavior, so users are encouraged to study the indicator across historical market conditions before incorporating it into their process.
Educational Purpose
Geometry | Manifold Learning is provided as an analytical and educational tool for studying price behavior.
It does not provide investment advice, does not guarantee trading performance, and does not predict future market outcomes.
The calculations describe mathematical properties of historical and current price observations. Any trading decision and associated risk remain the responsibility of the user. 지표

BTC Power-Law Ladder (Point-in-Time)WHAT IT DOES
Divides Bitcoin's daily close by a power-law trend line fitted to the lower edge
of its own price history, then sorts the result into five labelled rungs. The
reading answers one question: how far is price stretched above the floor that
has historically held it?
This is a risk-framing tool. It is not an entry signal and it is not advice.
THE TREND LINE
line(d) = 10^a * d^b d = days since the genesis block, 2009-01-03
The coefficients come from a quantile regression through the 1% lower quantile
of log price against log days — a line that tracks the bottom edge of the
distribution rather than its middle.
What makes this version different: the line is refit every January, and each
year is drawn with the coefficients that were available in that year. The 2016
fit uses only data through 2015-12-31. The 2020 fit uses only data through
2019-12-31. Thirteen vintages are stored, 2014 through 2026. Nothing on the
chart was fitted on the history it is being drawn over.
Most published power-law charts use a single set of constants fitted across the
entire history, then plot them back over that same history. Those charts show
you a line that knew how every cycle ended. This one does not.
Because a hard coefficient switch on January 1 would move the line — and
therefore the ratio — overnight with no price action behind it, each new vintage
is phased in over the first 21 bars of the year (adjustable). Both fits are
known on January 1, so the blend introduces no future information. The 2016
vintage sits 43% below the 2015 vintage; without the blend that single step
would jump the ratio by 77% and could trip a rung change on its own.
THE RUNGS
Fixed at 1.0x, 1.6x, 2.5x and 4.0x. These boundaries do not move when you change
the de-risk settings, because the statistics below were measured at these
specific values.
What followed each rung, 2014-01-01 to 2026-09-16 (4,642 daily closes, medians):
rung days 2-yr median positive next-yr drawdown P(dd < -50%)
below 1.0 445 9.77x 100% -30% 0%
1.0 - 1.6 1,544 4.31x 100% -30% 14%
1.6 - 2.5 1,162 2.05x 89% -49% 46%
2.5 - 4.0 764 1.60x 76% -62% 90%
above 4.0 727 0.74x 28% -72% 97%
Read the day counts as overlapping windows, not as independent observations. The
ratio's one-day autocorrelation is 0.997, so consecutive days in the same rung
are very nearly the same observation counted again.
THE DE-RISK STATE MACHINE
Optional markers for a hysteresis rule: reduce exposure when the ratio closes
above 2.5, restore when it closes below 1.6. The band between the two levels
prevents the state from flipping on noise. The machine only evaluates confirmed
closes, so what you see on the chart is what the rule would have done, not what
an intrabar wick briefly suggested.
Over the same window, with costs and exposure lagged one day:
buy and hold Sharpe 0.88 max drawdown -83.6% 101x
the rule Sharpe 1.16 max drawdown -55.9% 260x 6 round trips
Tested against 5,000 random vetoes of the same six durations at random dates:
p = 0.0022 (Sharpe), 0.0006 (drawdown), 0.0142 (terminal multiple).
WHAT THIS IS NOT — READ THIS PART
Six completed round trips is far below any reasonable evidence threshold. My assessment of this rule is "insufficient evidence — tracked, not
rejected." It is not a validated edge, and it is presented here as a framework
for thinking about risk, not as a system to trade.
One specific failure: the 2017 episode alone accounts for 57.9% of the rule's
entire gross profit. It also gave up a 67.6% rally between the cut at $2,258 and
the restore at $3,783. A track record resting on one event is a track record you
do not yet understand.
The threshold grid used for robustness testing is not independent evidence.
Adjacent thresholds fire within days of each other on a signal with 0.997
autocorrelation, so a cut at 2.4 and a cut at 2.6 trade the same six episodes.
The grid shows the result is not balanced on a knife edge; it does not multiply
the evidence.
The point-in-time refits remove coefficient hindsight, not specification
hindsight. The 2014 coefficients use only pre-2014 data — but the decision to
fit a power law to the 1% lower quantile of log-log Bitcoin history was made by
people who had already seen that history. That choice was not available in 2014.
Coefficients for 2027 and later fall back to the most recent fit and are flagged
"provisional" in the readout table. They will be replaced as new vintages become
available.
SETTINGS
Line — Real-time (the point-in-time vintages, default, starts 2014), Published
constants (the widely-quoted full-history fit, for comparison), or Custom.
January blend length — bars over which a new vintage phases in. Default 21. Set
to 1 for a hard switch.
De-risk above / Restore below — the operative rule levels. Moving them off
2.5 / 1.6 takes the rule off the tested configuration; the readout table flags
this. The rung boundaries stay fixed regardless.
Markers — rung tint, boundary lines, de-risk and restore triangles, trailing
one-year lows, halving shading, and a readout table (four corner positions).
Five alert conditions are available: crossing the de-risk level, crossing the
restore level, losing the trend line, reclaiming it, and a new trailing
one-year low.
REQUIREMENTS
Bitcoin, daily timeframe, log price scale. The trend line is defined on days
since the genesis block and is not meaningful on other timeframes or symbols;
the script will tell you so rather than silently drawing nothing.
DISCLAIMER
This indicator is a research and risk-framing tool. It is not financial advice,
not a recommendation to buy or sell any asset, and not a trading system.
Every statistic shown describes what has already happened across a single asset
over roughly twelve years containing four market cycles. Bitcoin's history is
short, its regime has changed repeatedly, and nothing about the past behaviour of
this ratio guarantees or implies anything about its future behaviour. A power-law
floor holds until it does not, and there is no mechanism that obliges it to hold
at all.
The de-risk rule shown here is explicitly rated as having insufficient evidence
by its own author. It is published so that its logic and its weaknesses are both
visible, not because it has been demonstrated to work.
Trading digital assets involves substantial risk of loss. You are responsible for
your own decisions and should consult a qualified professional regarding your
particular circumstances. 지표

THMATHMA MTF
This indicator plots the Triangular Hull Moving Average (THMA), a smooth and responsive moving average based on the Hull concept. The formula follows the standard THMA definition used across multiple public TradingView scripts and libraries:
THMA = WMA( 3*WMA(src, L/3) - WMA(src, L/2) - WMA(src, L), L )
The idea behind THMA comes from the broader Hull Moving Average family, adapted with a triangular weighting scheme to reduce lag while keeping the line smooth. This implementation is my own Pine Script version, built from publicly available documentation and open-source THMA scripts on TradingView.
Features:
- Source and length are configurable (default length: 21).
- Line color changes depending on price position:
- Green when close is above THMA.
- Red when close is below THMA.
- Optional higher timeframe mode: you can calculate THMA on a higher timeframe (e.g., 5 min, 15 min, 1h) and display it on your current chart.
Use it as a trend filter or dynamic support/resistance level. As with any indicator, it’s best combined with your own price action and risk management rules. 지표

HVN ZonesHVN Zones boxes the high-volume nodes of a multi-session volume profile, the way many traders do by hand from a zoomed-out chart with a fine visible-range profile: each prominent node above and below price becomes a zone you can trade against. It draws the zones, a dotted line at each node's point of control, and a small label.
HOW IT WORKS
1. A volume profile is built over the last N Globex sessions (default 63, about three months) or over the visible range, from 1-minute intrabars where your plan allows it, otherwise from chart bars. Row size is fixed in points or automatic (range divided by 1000).
2. The histogram is smoothed with a short centred moving average.
3. A node is a row that is the tallest within a window of rows on either side and at least a set share of the tallest row in the profile.
4. Each node's zone is grown from the peak while volume stays above a floor. The default floor is prominence-based: prominence is the peak minus the higher of the troughs on either side, and the zone ends where volume has fallen 60% of the way from the peak toward that trough. This keeps a node on top of a broad dome local instead of turning the whole value area into one zone. Nodes with little prominence are dropped and zones are capped in height. The older "% of peak" rule is still available as an option.
5. Overlapping or near zones merge, a price band keeps only nodes within 2 x daily ATR(14) of the current price (or a fixed number of points, or off), and the strongest N zones by peak volume are drawn.
SETTINGS THAT MATTER
Window > Sessions: how far back the profile looks. 63 matches a three-month composite; 20 gives a tighter, more recent read.
Node detection > Zone width (%), Min prominence, Max zone height: how tall a zone gets and which nodes qualify. Lower the width for thinner boxes.
Price band: widen or narrow the multiplier to show more or fewer zones.
Node detection > Recompute every (minutes): the profile changes little intra-day, so the default is hourly. Bar Replay recomputes on every step.
Drawing > Label indent: a fixed pixel push to the right so labels sit in the chart margin at any zoom.
LIMITS
1-minute intrabars need a plan with intrabar access, and TradingView serves at most 100k of them per request, which is about 60 sessions. Longer lookbacks use chart bars for the older part. Switch "Profile source" to Chart bars on any plan.
Volume is spread evenly across the rows each bar overlaps, the same approximation TradingView's own visible-range profile makes at the bar level. It is not a tick profile.
Zones are rebuilt on each recompute from the current window, so they show the current profile, not a history of past zones.
The profile method follows the open-source volume-profile family by PtGambler (MPL-2.0). This script is an original implementation. 지표

Rolling Beta Drift Monitor [Pineify]Rolling Beta Drift Monitor
Overview
Tracks an asset's changing return relationship with a benchmark through rolling beta, a prior beta corridor, correlation, residual volatility, and confirmed state. It diagnoses exposure rather than predicting returns.
Problem Definition
Beta is a sample estimate, not a stable property. A moving beta can change because of covariance, low benchmark variance, unmatched sessions, or asset-specific noise. Equal betas may have different correlations. The monitor must pair observations, expose coverage, compare beta with its history, and isolate unexplained variation. Otherwise a precise coefficient may describe a fragile relationship.
Design Rationale
Log returns are scale independent. Benchmark returns use the chart timeframe, preserve gaps, disable future access, and count only with a valid asset return. This prevents forward filling but reduces cross-session coverage. Weighted moments expose missing pairs. Current beta is compared with prior estimates, excluding itself. Correlation tests coherence and residual volatility measures unexplained variation. Confirmed states use lower release thresholds to reduce chatter at the cost of delay.
Key Features
Synchronized beta and coverage gate.
Prior-only mean and one-sigma corridor.
Correlation and residual shock.
Five hysteretic states.
Optional dashboard, markers, and alerts.
How It Works
Each bar supplies asset and benchmark log returns for the same timeframe. A weight is one only when both exist. Weighted sums, squares, and cross-products over the relationship window produce means, variances, and covariance. Beta equals covariance divided by benchmark variance. Correlation scales covariance by both standard deviations. Residual variance is what the beta projection leaves; its root is shown in basis points per bar.
Output is withheld below the coverage floor or when variance is effectively zero. A second window uses prior valid beta, correlation, and residual estimates. Beta Drift Z compares current beta with its prior distribution; residual volatility is standardized likewise. At close, extreme drift enters beta-up or beta-down. Weak correlation plus residual shock, or a qualified sign change, enters decoupling. Lower releases add hysteresis. Lines develop live; states and alerts wait for close.
How Multiple Indicators Work Together
One regression supplies every component: moments determine exposure, correlation tests coherence, and residual volatility measures what beta misses. Prior standardization makes change local, coverage requires enough evidence, and hysteresis confirms state. Without correlation, weak fit resembles exposure. Without residuals, specific disturbance is hidden. Without history, drift thresholds are not comparable.
Trading Ideas and Insights
Use the monitor for portfolio and hedge context, not entries. Beta-up with firm correlation means stronger sampled benchmark sensitivity; beta-down means reduced or inverted sensitivity. Decoupling flags that a prior hedge ratio deserves review because correlation changed sign or residual noise rose. On compatible 1H–1W charts, verify coverage and assess events, liquidity, execution, and sizing separately.
Unique Aspects
Typical studies stop at rolling beta or a fixed threshold. Here one synchronized moment set drives a relationship lifecycle. Beta is judged against prior estimates; sign change requires material correlation on both sides; residual shock can reveal weak-correlation decoupling; and coverage gates each stage. Corridor opacity reports evidence quality; state color stays consistent. The contribution is this decomposition and confirmed state model, not the beta formula.
How to Use
Choose a benchmark for the exposure under review and a standard chart with a compatible calendar. Wait for WARMUP to clear. The thick line is beta; the tunnel is prior mean plus or minus one sigma; gold is correlation. Violet columns show capped residual shock; exact values stay in the dashboard and Data Window. Read confirmed transitions only after checking paired and history coverage.
Customization
Relationship Window sets covariance history; Drift Reference sets coefficient history. Minimum Coverage handles session mismatch. Beta Drift Entry controls sensitivity, while Release must be lower for hysteresis. Correlation Floor rejects tiny sign changes. Residual thresholds govern weak-correlation decoupling. Short windows vary faster; long windows retain regimes. Visual switches do not alter calculations or alerts.
Assumptions and Limitations
The method assumes comparable synchronized returns and a useful local one-factor line. Calendars, stale prices, illiquidity, actions, rolls, and benchmark choice alter estimates. Gaps are not filled. Near-zero benchmark variance is blocked, but economic relevance is not proven. Z-scores are empirical, not probabilities; references lag breaks. Residual risk is per bar, not annualized. Live visuals change; states wait for close, while inputs or loaded history can recalculate values. Causality, extra factors, costs, sizing, profitability, and execution are outside scope.
Conclusion
The monitor turns one changing coefficient into a coverage-aware diagnosis. The layers separate coherent repricing from decoupling. Review confirmed changes with independent portfolio and risk analysis.
지표
