Setup Scanner [GBB]SETUP SCANNER
Most scanners tell you a setup fired and stop there. This one attaches a full trade plan to every signal: ATR stop, three R-multiple targets, an expiry and then tracks the outcome and keeps score per setup. New strategies can also be easily added to the scanner, so you do not have 20 different chart tabs open anymore at the same time.
How does it work?
On every confirmed bar the script evaluates six independent setups. Each one reports a state in the panel: off, dormant, forming, LONG or SHORT.
When a setup fires, a simulated trade opens at the close of the signal bar with:
- a stop at ATR(14) × 1.2 (configurable)
- TP1 / TP2 / TP3 at 1R / 2R / 3R
- an expiry after 60 bars
The trade is drawn as a risk box, a reward box, an entry line and a three-rung target ladder. As targets fill, their rungs promote from dashed to solid, so you can read how far a trade got at a glance. When it resolves, the whole drawing fades and gets an outcome tag: stop, TP3, or expired.
The panel counts, per setup, how many trades it opened and what share of them reached TP1.
Included Strategies in v1.0:
1. VWAP RECLAIM
Price must spend at least N consecutive closes (default 6) on one side of session VWAP, then close back across it. Volume filter applies. Forming state triggers when the run is mature and price is drifting back within 0.4 ATR of VWAP.
2. EMA PULLBACK (9/21)
Trend is defined by EMA21 vs EMA50 with EMA50 sloping in the same direction over three bars. Price must have touched EMA21 within the last N bars (default 3), then close back beyond EMA9 on a directional bar that takes out the previous bar's extreme. Volume filter applies.
3. BREAK AND RETEST
A confirmed swing pivot (length 5 either side) is broken on a close. Within the retest window (default 20 bars), price returns to within 0.3 ATR of the broken level and closes back beyond it on a directional bar. Pivots that form while a break is still live are queued rather than overwriting the level — the retest gets to finish before the reference moves. No volume filter.
4. LIQUIDITY SWEEP REVERSAL
A wick takes out the highest high or lowest low of the last 20 bars, the body closes back inside, and the rejection wick is larger than the opposite wick. Volume filter applies.
5. RSI DIVERGENCE
Consecutive confirmed pivots with a lower price low against a higher RSI low (or the inverse for shorts), within a maximum pivot gap of 60 bars. This confirms five bars after the pivot by construction. It is late, on purpose, and it has no forming state.
6. OPENING RANGE BREAK
The range is built from the session open for N minutes (default 15) in your chosen session and timezone, then the first close beyond either edge fires. One break per session, in either direction. The range levels plot once the range closes. For 24h crypto, set the timezone to UTC and pick your own anchor session.
TRADE COUNTING
Entry is the close of the signal bar. Risk is one ATR unit × the stop multiple, and the ladder is measured in multiples of that risk.
Exit accounting is deliberately conservative. If a bar touches both the stop and a target, the stop wins — intrabar sequence is unknowable from OHLC, so the outcome is on purpose counted as pessimistic. A trade that reaches TP1 or TP2 marks the rung and keeps running, only TP3 or the stop or the expiry closes it.
Three controls decide which signals become trades:
- Max concurrent trades (default 1)
- Block opposite-direction entries (default on)
- Re-entry cooldown in bars (default 0)
With the default of one concurrent trade, setups are evaluated in a fixed order — VWAP, EMA, break and retest, sweep, divergence, opening range — so when two fire on the same bar, the earlier one in that order takes the slot. Turn on "Mark blocked signals too" if you want to see the ones the limit swallowed.
The cooldown defaults to 0, which keeps every signal. That is why stops sometimes cluster back to back on an impulse bar. Raising it changes the record, so reset your counts when you change it.
READING THE SCOREBOARD — AND WHAT IT IS NOT
The "fired" column counts trades the engine actually opened, not raw setup fires. Signals blocked by the concurrency limit, the direction lock or the cooldown are not counted.
The "→TP1" column is trades that reached TP1 divided by trades fired. Reached, not captured: a trade that touches TP1 and later stops out still counts in the numerator. Read it as "how often does this setup get moving in my favour", not as a win rate and definitely not as an expectancy.
IMPORTANT
This is not a backtest. Counts accumulate forward over the bars loaded on your chart, they reset on every settings change and chart reload, and they include no commission, no spread, no slippage and no partial fills.
DEFAULTS AND TUNING
The defaults are not optimised. They are round numbers chosen to be readable and to avoid fitting a parameter set to whatever symbol happened to be on the chart during development. The ATR stop, the R ladder, the pivot length and the setup-specific windows are all exposed so you can adapt them to your instrument and timeframe, but every change invalidates the counts already on the panel.
If you tune, tune on one instrument at a time, and treat any improvement that does not survive on data you did not tune on as noise.
DISPLAY
- Trade zones can be turned off entirely if you only want the panel.
- Signal labels come in Full, Short, Arrow only, or Off.
- Closed trades fade by an adjustable amount; filled targets always fade less than unfilled ones, so a resolved trade still shows how far it ran.
- Keep last N drawings caps the chart clutter without affecting the counts.
- Panel position and text size are configurable; colours default to a dark-chart palette and should be dimmed for white backgrounds.
ALERTS
Every trade the engine opens fires an alert() call carrying the setup name, direction and price, once per bar close. Two alertcondition entries are also available for any long setup and any short setup. Note that those fire on the raw signal, whether or not the engine had room to take it.
LIMITATIONS
- Signals evaluate on confirmed bars only. Nothing is drawn or counted on an unclosed bar.
- Break and retest and divergence depend on pivots, which confirm five bars after the fact.
- The VWAP setup requires volume data and stays dormant on symbols that have none. The volume filter also passes automatically where volume is unavailable.
- The opening range setup depends on your session and timezone inputs being correct for the instrument.
- Designed for intraday timeframes. It will run on higher timeframes but the trade model and expiry are not calibrated for them.
مؤشر

Fibonacci Trend Continuation Signals [AlgoAlpha]🟠 OVERVIEW
Fibonacci Trend Continuation Signals maps Fibonacci retracement levels inside an adaptive trend structure. It combines a smoothed price midline, volatility-based outer bands, and Fibonacci ratios to show where price is trading within the current bullish or bearish trend range.
The trend changes only when price moves beyond a volatility-adjusted outer band. Once a direction is active, the script projects 0.236, 0.382, 0.500, 0.618, and 0.786 levels between the active outer band and the midline. This creates a moving Fibonacci framework that adjusts as price and volatility change.
Continuation signals appear when price closes back through an enabled Fibonacci level in the direction of the active trend. This lets traders use retracements within an established trend instead of treating each Fibonacci level as a fixed reversal point.
🟠 CONCEPTS
Trend Midline — An exponential moving average of closing price. It forms the central reference for the trend structure and the endpoint of the Fibonacci range.
Volatility Bands — Outer boundaries placed above and below the midline using a smoothed measure of the high-to-low price range. Price crossing an outer band changes the active trend direction.
Fibonacci Trend Range — The distance between the active outer band and the midline. In bullish trends, levels are measured upward from the lower band. In bearish trends, they are measured downward from the upper band.
Fibonacci Levels — The 0.236, 0.382, 0.500, 0.618, and 0.786 ratios divide the active trend range into retracement zones that move with the underlying trend structure.
Continuation Signal — A bullish signal occurs when price closes upward through an enabled Fibonacci level during a bullish trend. A bearish signal occurs when price closes downward through an enabled Fibonacci level during a bearish trend.
🟠 FEATURES
Adaptive Fibonacci Profile — Displays five configurable Fibonacci levels between the active volatility band and trend midline.
Trend Continuation Signals — Shows bullish and bearish markers when price closes through an enabled Fibonacci level in the direction of the active trend.
Current Level Labels — Shows the current price value of each enabled Fibonacci level at the latest bar.
Trend Change Markers — Marks the Fibonacci structure when a new bullish or bearish trend begins.
🟠 HOW TO USE
Identify the active trend structure — A bullish structure projects Fibonacci levels from the lower band toward the midline, while a bearish structure projects them from the upper band toward the midline.
Watch price during a retracement — Use the displayed Fibonacci zones to see how far price has moved through the active trend range.
Look for continuation signals — An upward triangle shows that price crossed above an enabled Fibonacci level during a bullish trend. A downward triangle shows the equivalent bearish close below a level.
Compare signals with price structure — Use nearby swing points, support, resistance, or your existing confirmation method before acting on a continuation signal.
Adjust Midline Length, Pivot Length, and Band Width to control how quickly the trend framework responds to price and how wide its outer boundaries are.
Enable or disable individual Fibonacci levels to keep only the retracement levels relevant to your method.
🟠 CONCLUSION
Fibonacci Trend Continuation Signals combines volatility-based trend detection with adaptive Fibonacci retracement levels and directional continuation signals. It gives traders a moving reference for measuring pullbacks and identifying closes that resume movement in the active trend direction. مؤشر

Gaussian Filter Trend [QuantAlgo]🟢 Overview
The Gaussian Filter Trend passes price through a multi-pole Gaussian filter and holds the result inside an adaptive volatility deadband, producing a stepped trend path that advances only once a move has cleared the band. That band is sized by an Efficiency Ratio, tightening when price travels directionally and widening through chop, so the line tracks sustained moves and sits still through noise. Around that path, a star field orbits at two volatility-scaled radii that fade with distance, echoing the decay of the filter's own weighting and making the current trend distinctly recognizable at a glance on any instrument or timeframe.
🟢 How It Works
The indicator's core methodology combines two mechanisms: a cascaded Gaussian filter that smooths the source series, and an efficiency-driven deadband that governs when that smoothed value is permitted to move the trend line.
First, the selected source is passed through one to four cascaded single-pole stages. A beta term derived from the filter length and the pole count sets the smoothing coefficient. Because pole count enters that calculation directly, adding poles rescales the filter response rather than layering more averaging onto the same curve:
beta = (1 - math.cos(2 * math.pi / length)) / (math.pow(1.414, 2.0 / poleCount) - 1)
alpha = -beta + math.sqrt(beta * beta + 2 * beta)
Next, efficiency is measured by comparing net directional movement against the total distance traveled over the efficiency window. The ratio moves toward one when travel is more directional and toward zero when price covers ground without net progress. It is then smoothed, so the deadband width is less likely to shift sharply from one bar to the next:
efficiency_ratio = path_length == 0 ? 0.0 : net_move / path_length
smoothed_efficiency = ta.ema(efficiency_ratio, efficiency_smooth)
The smoothed reading blends between a wider chop multiplier and a tighter trend multiplier, and that result scales Average True Range into the deadband width. Higher readings pull the envelope in, so the line can follow a move more closely. Lower readings push it out, which is intended to reduce flips in conditions where they are more likely. Disabling Adaptive Width bypasses the blend and applies a single fixed multiplier:
width_multiplier = adaptive_width ? chop_multiplier + (trend_multiplier - chop_multiplier) * smoothed_efficiency : fixed_multiplier
trend_width = ta.atr(atr_length) * width_multiplier
Finally, the trend line carries its previous value forward and steps only when the envelope has moved past it. It drops when the upper band falls below the current level and rises when the lower band climbs above it, producing a stepped path rather than a continuous curve:
if upper_band < trend_line
trend_line := upper_band
if lower_band > trend_line
trend_line := lower_band
A persistent direction state records the last step and carries it through flat segments, so the line color, star field, bar coloring and alerts all read from the same value rather than diverging while the line is stationary. The star field orbits that path at a distance scaled to recent average bar range, spreading as ranges expand and drawing in as they compress, so the trend and the volatility it is being measured against are visible in one read.
🟢 Signal Interpretation
▶ Bullish Trend (Long/Buy): When the lower band climbs above the trend line, the line steps higher and the indicator enters bullish state. The trend line and star field switch to the bullish color. This condition identifies potential long or buy opportunities and remains active until the upper band falls below the line and confirms a bearish step.
▶ Bearish Trend (Short/Sell): When the upper band falls below the trend line, the line steps lower and the indicator enters bearish state. The visual elements switch to the bearish color. This condition identifies potential short or sell opportunities and holds until the lower band climbs above the line and confirms a bullish step.
▶ Flat Path (Hold): When price stays inside the deadband, neither band displaces the line and it holds level. Color does not change, so the prior state is carried rather than reconfirmed. Extended flat runs indicate the efficiency reading has widened the band against choppier conditions, and the state resolves only when one side of the envelope clears the line.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover a range of trading styles and timeframes. "Default" uses four poles over a fourteen bar window for a balanced configuration aimed at swing trading on 1-hour and daily charts. "Fast Response" shortens the filter length and drops to two poles for a tighter path on 5-minute to 1-hour charts, which may suit intraday work at the cost of more frequent steps in choppier conditions. "Smooth Trend" lengthens the filter and widens the chop multiplier for a steadier baseline on daily and weekly charts, aimed at position trading. Selecting any preset other than Default overrides every Gaussian Filter and Trend Width input beneath it.
▶ Built-in Alerts: Three alert conditions support automated monitoring of trend transitions. "Bullish Trend Signal" fires on the bar the direction state flips to bullish. "Bearish Trend Signal" fires on the bar it flips to bearish. "Any Trend Change" triggers on either transition for traders who want a single unified alert regardless of direction. All alerts include the exchange, ticker, and timeframe in the message for immediate context.
▶ Visual Customization: Six color presets, Custom, Classic, Aqua, Cosmic, Cyber, and Neon, provide coordinated bullish and bearish color pairings suited to different chart themes and personal preferences. Selecting Custom exposes independent color pickers for both states, alongside an adjustable neutral color used during the initial warmup before the first directional step. Line width is configurable from one for a minimal look up to eight for a heavier path, and the star field toggles separately from the line so either element can be displayed on its own. Optional bar coloring and background shading tint the candles and chart field with the active trend color at configurable transparency levels, reflecting the current state without reading the line directly.
مؤشر

TrendShift | Supertrend + ADX Regime-Adaptive StrategyOverview
Most Supertrend strategies use one fixed ATR multiplier for every market condition — which means it's either too tight (whipsawed in chop) or too wide (late to catch real trends). TrendShift fixes this by reading market regime in real time with ADX and automatically shifting the Supertrend multiplier to match: tight and responsive when the market is trending, wide and defensive (or disabled entirely) when it's choppy. The strategy essentially "changes gears" as conditions change, and shows you exactly which gear it's in.
Features
ADX-based regime detection — classifies the market as Trending, Choppy, or Neutral, with a built-in hysteresis zone so the regime doesn't flicker back and forth near the threshold.
Dynamic Supertrend multiplier — automatically tightens (fast entries) in trends and widens (fewer false signals) in chop, recalculated live every bar.
Signal gating — Supertrend flips during choppy conditions are suppressed by default; no trades fire on noise.
Risk-based position sizing — every trade risks a fixed % of equity, sized off the actual stop distance (the Supertrend line), so trade size adapts to current volatility automatically.
Trailing stop + optional R-multiple take profit — the Supertrend line itself trails the stop; an optional fixed reward-to-risk target can close the trade early.
Optional chop-flatten & max-bars-in-trade exits — extra safety nets for getting out of dead trades.
Clean, glowing trend line with gradient fill — colored green/red by direction, turns gray and flat in chop, with minimal arrow labels only on actual signal flips (no clutter).
Live dashboard — a small on-chart table showing current Regime, ADX value, Active Multiplier, and Position status, so you can literally watch the strategy shift gears.
How it works
ADX is calculated each bar and compared against two thresholds (default: 25 trending / 20 choppy).
Based on that regime, the strategy picks a tight multiplier (trending) or a wide one (choppy) for the Supertrend calculation — held steady in the neutral zone to avoid jitter.
Supertrend is recalculated using this adaptive multiplier, and a flip in trend direction becomes a trade signal only if the current regime allows new entries.
Position size is calculated from your risk % input and the distance from price to the Supertrend line, so every trade risks roughly the same account %, regardless of how wide the current band is.
The Supertrend line trails your stop; an optional R-multiple limit order banks profit early if enabled.
Tips
Start with the default ADX thresholds (20/25) and multipliers (1.75 tight / 4.5 wide) — they're tuned to be reasonable across timeframes, but always re-check on your specific instrument.
On lower timeframes or noisier symbols, consider raising the choppy threshold or widening the "wide" multiplier further — chop is more common intraday.
Leave "Disable new entries in choppy regime" ON for cleaner equity curves; turn it off if you want to see how the strategy performs without the filter (useful for comparison).
The dashboard's ADX/Multiplier readout is the fastest way to sanity-check whether the strategy is behaving as expected on a given chart — if it feels like it's not trading, check whether it's stuck in "CHOPPY."
Combine with your own higher-timeframe bias filter if you want extra confluence; the strategy doesn't currently check higher-timeframe trend.
This is a strategy script (has backtest results), not just a visual indicator — use the Strategy Tester tab to evaluate performance before live use.
استراتيجية

Previous Day, Week & Month Levels [ITA]🟠 OVERVIEW
Previous Day, Week & Month Levels plots the high and low of each completed higher timeframe period and keeps them on the chart until price trades through them. Once a level is taken, it fades to grey instead of disappearing, so the chart separates liquidity that is still resting from liquidity that has already been collected.
The indicator covers daily, weekly and monthly periods independently, with optional midpoints for each range. This lets an intraday trader run daily levels alone, or stack all three groups to see how short-term and higher timeframe references line up.
🟠 CONCEPTS
* Previous Level - The high or low of the last completed daily, weekly or monthly candle, pulled from the higher timeframe regardless of the chart timeframe in use.
* Untaken Level - A level that price has not traded through since its period closed. Drawn at full opacity because the orders resting behind it are still there.
* Taken Level - A level that price has traded through during the current period. Recolored grey to show the liquidity has been collected and the level has lost its role as a target.
* Level Reset - Each group tracks its own taken state and resets when a new period begins. Daily flags clear every session while weekly and monthly flags run on their own cycles.
* Midpoint - The 50% level of a previous range, marking the equilibrium of that period rather than its extremes.
🟠 FEATURES
* Multi-Period Levels - Plots previous day, week and month highs and lows, each group toggleable on its own.
* Taken Level Fading - Automatically recolors any level that price trades through, leaving untouched levels highlighted.
* Optional Midpoints - Adds the 50% level of each enabled range for equilibrium reference.
* Level Labels - Tags each line with its name on the right edge of the chart, with configurable size.
* Level Alerts - Fires when price trades above a previous high or below a previous low.
🟠 HOW TO USE
* Run daily levels alone for intraday work, or enable weekly and monthly for a broader structural view.
* Treat bright levels as unfinished business and faded levels as history. What stays highlighted is where liquidity has not yet been taken.
* Watch for clusters where a daily level sits close to a weekly one. A single move that clears both tends to produce a sharper reaction than clearing either alone.
* Use midpoints as a filter. Price rotating around the midpoint of the previous day often points to balance rather than direction.
* Adjust Extend Right if the levels project too far past the current candle or stop short of it.
🟠 CONCLUSION
Previous Day, Week & Month Levels combines multi-period reference levels with automatic tracking of which levels have already been traded through. Instead of showing every level identically, it separates active liquidity from collected liquidity, giving traders a clear view of which reference points are still relevant to the current session. مؤشر

Square Bar/Calendar Count Verticals (Gann)█ OVERVIEW
Square Bar/Calendar Count Verticals plots vertical time lines on the chart at squared counts measured from user-selected pivot anchors, in two independent units: trading bars and calendar days. The thesis, drawn from W.D. Gann's time-counting methods, is that elapsed time from a significant price extreme reaching a perfect square (81, 100, 121, 144, 289, 361) marks a date of elevated probability for a trend pause, inflection, or termination, and that the strongest of these dates occur where a bar-count square and a calendar-day square coincide.
█ HISTORY / BACKGROUND
Counting time in squares from major highs and lows originates with W.D. Gann, who treated time and price as interchangeable quantities and used the squares of small integers as recurring measures of trend duration. Constance Brown's published work on Gann analysis demonstrates the method in modern markets: bar counts of 9², 10², 11², and 12² projected from a swing extreme, a 17² calendar-day count from a significant low, repeats of the 144 count monitored from key pivots, and the square of 19 tracked as a separate helix cycle. This indicator implements that specific working set as a chart tool.
The conceptual basis is that these verticals are time factors only. They carry no directional information. Their value is realized when a squared count expires while price is simultaneously at a level identified by independent price-based methods.
█ HOW IT WORKS
1 — The user supplies a comma-separated list of roots (default 9,10,11,12,17,19). At the first bar the script parses the list and computes the square of each root.
2 — Each of up to three anchors is a timestamp selected on the chart. The anchor is resolved to a bar by containment: the anchor bar is the first bar whose closing time exceeds the anchor timestamp. This makes resolution independent of exchange timezone and safe when the timestamp falls on a weekend or holiday.
3 — For every anchor and every square s, the script computes two targets:
- a trading-bar target at anchor bar index + s (bar unit follows the chart timeframe), and
- a calendar-day target at anchor time + s days (independent of timeframe).
With inclusive counting enabled (default) the anchor bar or anchor day is counted as 1, so targets land at s minus 1 units after the anchor.
4 — When the root 12 is present and the repeat setting exceeds 1, additional verticals are drawn at 288, 432, and further multiples of 144, in both units, up to the chosen repeat count.
5 — On the last bar the script draws the verticals once: solid lines in bar-index coordinates for bar squares (projected up to roughly 490 bars into the future) and dashed lines in time coordinates for calendar squares (projectable to any future date). Each line carries a label naming the root, the square, and the unit. The anchor itself is marked with a heavier line and a date label.
6 — A status table reports, per active anchor, the elapsed count in both units and the next upcoming square in each unit, with the bars remaining and the calendar date.
7 — Three alert conditions fire on the bar that completes a bar-count square, the bar that contains a calendar-day square date, and the bar on which both occur together.
█ HOW TO USE
The verticals are appointments in time, not signals. The intended workflow:
- Anchor each slot on a significant swing extreme. Significance is an analytical judgment; the script deliberately performs no automatic pivot detection.
- Validate an anchor by inspecting the verticals already in the past. If historical squared counts from that anchor align with real pivots, the anchor is worth keeping. If they align with nothing, move or disable it.
- When price approaches an upcoming vertical, consult independent price analysis. A squared count expiring while price sits at a level derived from other methods is the condition of interest. A squared count expiring in open space warns at most of a pause or stall.
- The highest-weight event this tool can flag is the third alert: a bar square and a calendar square completing on the same bar.
Bar counts are timeframe-relative by design: the same anchor produces different bar-square dates on daily and weekly charts, and both are legitimate counts on their own timeframe. Calendar-day counts are identical on every timeframe. The tool is designed for daily and weekly swing analysis, where Gann's counts were applied; on intraday charts the calendar counts remain valid but bar counts become session-dependent.
Visual elements: solid vertical lines are trading-bar squares, dashed vertical lines are calendar-day squares, the heavy line with a date label is the anchor, labels above price name bar counts, labels below price name calendar counts, and the top-right table summarizes elapsed and upcoming counts.
█ SETTINGS
- Square roots: comma-separated integer roots to square. Default 9,10,11,12,17,19.
- Inclusive count: anchor bar or day counts as 1 when enabled. Default on.
- Trading-bar squares: show or hide bar-count verticals. Default on.
- Calendar-day squares: show or hide calendar-count verticals. Default on.
- 144-cycle repeats: number of 144 multiples to project; 1 disables repeats. Default 3.
- Anchor 1, 2, 3: enable flag, pivot timestamp (Anchor 1 prompts for a chart click on load), and line color per anchor. Defaults: Anchor 1 enabled, Anchors 2 and 3 disabled.
- Status table: show or hide the summary table. Default on.
- Label size: tiny, small, or normal. Default small.
█ WHAT MAKES IT ORIGINAL
Most Gann-count scripts plot a single count series in a single unit. This implementation differs in three specific ways. First, it runs trading-bar and calendar-day counts in parallel from the same anchor and explicitly detects their coincidence, which is the confluence condition emphasized in the source methodology rather than an afterthought. Second, anchor resolution uses closing-time containment instead of naive date equality, so anchors survive timezone differences, weekends, and holidays without silently shifting by one bar. Third, projection is handled correctly per unit: calendar squares are drawn in time coordinates and can therefore mark dates arbitrarily far in the future, while bar squares are drawn in bar coordinates and are projected only within the platform's future-bar range, keeping both unit systems accurate to their own definition.
█ NOTES / LIMITATIONS
- Drawings are created once per script load on the last bar. As new realtime bars form, elapsed counts in the table and newly reachable verticals refresh only when the script recalculates, for example after a settings change or chart reload.
- Bar-count verticals can be projected at most about 490 bars beyond the current bar, a platform ceiling on future bar-index coordinates. Calendar-day verticals have no such ceiling.
- The script draws up to 500 lines and 500 labels. Many roots combined with three anchors, both units, and repeats can reach this ceiling, at which point the oldest objects are removed.
- If an anchor timestamp predates the symbol's available history, the anchor resolves to the first available bar and every count measures from there, which is unlikely to be the intended pivot.
- Bar counts depend on the chart timeframe and on the symbol's session definition. Symbols with irregular sessions or many holidays will show bar squares and calendar squares diverging substantially, which is expected behavior, not an error.
- The indicator plots time factors only. It produces no directional forecast, and no claim is made about the outcome of price at any vertical. مؤشر

Index Peak Dispersion█ OVERVIEW
Index Peak Dispersion plots, in a separate pane, two normalized series computed across a configurable universe of up to twelve equity indexes: the calendar-day dispersion of their all-time-high dates, expressed as a percent of a topping window, and the share of indexes that printed a fresh all-time high within a short recent window. The thesis is that healthy advances register all-time highs across indexes nearly simultaneously, while major distributive tops fragment, spreading index peak dates across weeks or months.
█ HISTORY / BACKGROUND
The concept descends from the non-confirmation principle of Dow Theory as developed by Charles Dow, William Hamilton and Robert Rhea, in which a new high in one average unaccompanied by a new high in another warns that the trend is losing sponsorship. Classic non-confirmation is measured in the price domain: one index fails to exceed its prior peak while another does.
Market historians and technicians, including Robert Prechter, have documented a related phenomenon in the time domain: at major tops, the final all-time highs of the major indexes scatter across the calendar rather than clustering. At the 2000 top, the Dow Industrials peaked in January, the S&P 500 and NASDAQ Composite in March, and the NYSE Composite in September. At the 2007 top, the Dow Jones Composite peaked in July while the Dow Industrials and S&P 500 peaked in October. This script converts that qualitative observation into a mechanical, reproducible statistic.
█ HOW IT WORKS
The script performs the following steps on each bar:
• For each of up to twelve enabled symbols, one same-timeframe request.security() call evaluates a function inside the requested symbol's context. The function maintains a running maximum of closing prices over the symbol's loaded history and records the timestamp of the bar on which that maximum was last exceeded. This running maximum is point-in-time by construction: no future data enters the calculation, and lookahead is off.
• On the chart symbol, each recorded timestamp is converted to an age in calendar days: current bar time minus the all-time-high time, divided by the number of milliseconds in a day.
• Each enabled index with data is classified. An age at or below the fresh window makes it Fresh. An age at or below the topping window makes it part of the in-window set. An age beyond the topping window makes it Stale.
• When the in-window set contains at least the minimum required count of indexes, the dispersion span equals the maximum in-window age minus the minimum in-window age, in calendar days. The plotted dispersion value is that span divided by the topping window length, times 100. When the in-window count is below the minimum, the dispersion plot returns na.
• The participation value equals the count of Fresh indexes divided by the count of enabled indexes with data, times 100, plotted as columns.
• The fractured top condition is true when the dispersion value is at or above the warning threshold while at least one index is Fresh. The pane background is shaded on those bars, and an alert fires on the first bar of each new occurrence. A second alert fires when every enabled index with data is simultaneously Fresh, which marks a synchronized advance, the opposite condition.
• On the last bar, an optional table lists each index with its all-time-high date, age in days and classification, plus summary counts and the raw span in days.
█ HOW TO USE
The script is designed for the 1D timeframe. The running all-time high is intended to operate on daily closes, and both windows are specified in calendar days, so daily resolution matches the granularity of the logic.
In plain terms, the blue columns answer one question: how many of the enabled indexes hit a record high this week? The red line answers another: how spread out in time are everyone's record highs? In a strong market, the indexes peak together, so the columns are tall and the line stays low. At major tops, the market tends to fall apart in slow motion: one index peaks, then months later another, and by the time the last index prints its final record, several others stopped making records long ago. Each new high is carried by fewer indexes, so the columns thin out while the line climbs. The shaded background marks the combination of both: the market is still printing record highs, but the set of indexes confirming them has been shrinking for months. That is the structure documented at the 2000 and 2007 tops. The same combination also appears during rotation phases that resolve higher, so treat it as a statement that conditions resemble past major tops, not as an instruction to act.
Read the two plotted series together. Low dispersion with high participation describes a synchronized advance in which the enabled indexes are registering highs together. Rising dispersion while some indexes continue to print fresh highs describes fragmentation: leadership is narrowing and earlier leaders have stopped confirming. The shaded background marks bars on which the dispersion value is at or above the dashed threshold line while at least one fresh high exists, the specific combination in which fragmentation is present at a live high rather than in an established downtrend.
The table gives the attribution behind the numbers: which indexes are Fresh, which remain inside the topping window, and which have gone Stale, along with each all-time-high date. Stale entries are non-confirmations older than the topping window and are deliberately excluded from the span so that a single long-dormant index does not saturate the statistic.
The condition is a warning context, not a timing trigger. It identifies an environment consistent with historical distributive tops. It does not predict the date or the existence of a decline.
█ SETTINGS
• Index universe, twelve slots, each with an enable checkbox and a symbol field. Defaults: DJI, DJT, DJU, DJA, SPX, NDX, IXIC, NYA, RUT, SOX, MID, SPXEW. All twelve are enabled by default. Any slot can be repointed to another symbol or disabled.
• Fresh high window, calendar days. Default 7. An index whose all-time high printed within this many days counts as Fresh.
• Topping window, calendar days. Default 378. An index whose all-time high printed within this many days participates in the dispersion span. Older highs are classified Stale.
• Dispersion warning threshold, percent of topping window. Default 25. The dashed reference line and the threshold for the fractured top condition.
• Minimum in-window index count for a valid span. Default 4. Below this count the dispersion plot returns na, which prevents a span computed from too few indexes.
• Show status table. Default on.
• Table position. Default Top right.
█ WHAT MAKES IT ORIGINAL
Breadth and non-confirmation tools on this platform generally measure the price domain: divergences between an index and an internal line, counts of components above a moving average, or new-high and new-low tallies within one exchange universe. This script instead measures the time domain across whole indexes. It reduces the peak-date scatter of a user-defined index universe to a single bounded statistic, the in-window span of all-time-high ages, and pairs it with a participation series so that fragmentation is only flagged while a high is live. The classification into Fresh, in-window and Stale, with the Stale exclusion and the minimum-count validity gate, is what allows the scatter of a historical topping process to be plotted as one continuous, comparable series across eras.
█ NOTES / LIMITATIONS
• The running all-time high is computed only over the bars loaded for each requested symbol. Symbols with short available history, and the early portion of any chart, understate the true age of the all-time high. Treat the plot as reliable only after all enabled symbols have substantial loaded history.
• The logic is designed for the 1D timeframe. On intraday charts the running maximum operates on intraday closes and the calendar-day windows lose their intended granularity. On weekly or monthly charts a fresh window shorter than one bar cannot register.
• All request.security() calls run on the chart timeframe with lookahead off. Values on the developing bar update until the bar closes and do not repaint afterward.
• The script issues twelve security calls. A symbol slot that fails to resolve or returns no data is excluded from every count and appears in the table as No data.
• Ages and spans are measured in calendar days, not trading days, so weekends and holidays are included in the counts.
• The warning threshold is expressed as a percent of the topping window. Changing the topping window changes the day-equivalent of the same percent threshold.
• The dispersion plot returns na whenever fewer than the minimum required indexes have an all-time high inside the topping window.
• The status table renders on the last bar only. مؤشر

Confirmed Structure Transition Map [Pineify]Confirmed Structure Transition Map
Overview
This Pine Script v6 indicator separates confirmed swings, break-of-structure events, and direction candidates. A finite state appears as a stepped price corridor.
Problem Definition
A common baseline finds fractal highs and lows, then labels any crossing BOS or CHoCH. It hides the pivot bar, the later confirmation bar, and the still later break. One level may emit repeated labels, while one counter-break may be called a reversal. Label density replaces a distinction between swing formation, continuation, and transition. This script separates those events and never triggers an earlier break with future information.
Design Rationale
Confirmed pivots provide stable levels; a moving extreme has no fixed identity. Each high and low becomes a one-use rail. A break with the bias is BOS; the first qualified counter-break is only a potential CHoCH. Bias changes after a fresh rail breaks again in that direction. Crossing the frozen opposite rail or age limit cancels the candidate. This rejects immediate reversal on one counter-break. The tradeoff is lag for explicit evidence. ATR scaling filters tiny overruns but does not estimate probability.
Key Features
Optional confirmed HH, LH, HL, and LL labels.
One-use rails that suppress duplicate breaks.
BOS, potential CHoCH, shift, invalidation, and expiry states.
ATR displacement, state corridor, alerts, and dashboard.
How It Works
The script reads chart OHLC and a symmetric pivot window. A pivot is accepted after its right-side bars close. Its price and index are stored, compared with the prior same-type pivot, and armed as a rail. If price already exceeded the required displacement when it became knowable, that rail is consumed without a hindsight event.
Each confirmed bar compares the Close or Wick probe with both rails. Distance beyond a rail is divided by ATR and must meet Minimum Break Displacement. On a two-sided outside bar, the larger normalized wick defines one event. The first event sets bias; a same-direction event is BOS. A counter-event freezes break rail, invalidation rail, displacement, and start bar. Confirmation needs a fresh rail and second break in the candidate direction. Invalidation or expiry ends the candidate. The corridor shows bullish, bearish, pending, or neutral state; early bars stay neutral.
How Multiple Indicators Work Together
This is one dependent state model, not a mashup. Pivot confirmation supplies stable rails; otherwise levels move while tested. ATR displacement separates a tiny overrun from a range-scaled break. The ordered state machine consumes those qualified breaks; otherwise crossings remain a label stream. The corridor encodes the resulting state instead of adding an unrelated signal.
Trading Ideas and Insights
Read BOS as evidence that price cleared a rail with the established bias, not as an entry command. Violet marks a candidate; amber shows why it ended. A wide corridor requires a larger absolute move. Apply separate risk, liquidity, and execution rules: the map does not select stops, size positions, or forecast events.
Unique Aspects
The contribution is an ordered lifecycle. Rails arm only when knowable, each fires once, a counter-break stays provisional, and a second newly armed break is required before bias changes. Invalidation level and age limit freeze at candidate start, so later pivots cannot rewrite the test. One corridor carries bias and transition while labels, wash, bar colors, and table remain optional. This is more than a renamed fractal plot.
How to Use
Begin with Close and default pivots, then check swing density for the market and timeframe. Read rails first: BOS continues state, P-CH opens a candidate, and SHIFT completes the two-break transition. HH/HL locations are revealed after the right-bar delay, not known on their historical bars. Use BOS and shift alerts only within an existing process.
Customization
Pivot Left/Right Bars control granularity and delay: smaller values add noise; larger values add lag. Close requires settlement beyond a rail. Wick uses extremes and resolves outside bars by larger excursion. Minimum Break Displacement sets ATR clearance; Candidate Expiry limits age. Corridor, labels, wash, bar colors, and dashboard are independently configurable.
Assumptions and Limitations
Pivots need future bars for confirmation, so markers appear on pivot bars only after the right-side delay; breaks and shifts remain on confirmation bars. Probes move live, but state and alerts require bar close. ATR and pivot settings are market-sensitive. Gaps can jump rails, Wick mode reduces an outside bar to one event, and chop can repeat candidates. The model reads chart prices, not order flow, news, higher timeframes, or execution quality. A shift is an ordered event, not a guaranteed reversal or profitable trade.
Conclusion
The map turns delayed pivots and breaks into an auditable sequence: location, one-use break, provisional counter-break, then confirmation or invalidation. It provides structural context; interpretation and risk remain with the user.
مؤشر

Momentum Bands | BreakoutThis strategy hunts for N-bar breakouts confirmed by volume expansion — but instead of trading every breakout blindly (like a standard Opening Range or Donchian breakout), it runs price through a trend filter and an RSI momentum check first. Breakouts that align with the EMA trend and show accelerating RSI get traded as genuine continuation moves. Breakouts that fire against the prevailing trend, with RSI already rolling over, get treated as exhaustion — and faded instead of chased. Built-in ATR-based position sizing and a trailing stop round it out into a complete, risk-managed system rather than just a signal generator.
Key Features
Trend-gated entries — EMA fast/slow cross defines regime; longs only trade with the trend, fades only trade against it
Volume-confirmed breakouts — requires expansion above the rolling volume average, not just a price poke
RSI momentum-exhaustion filter — distinguishes accelerating momentum (real breakout) from divergence (fakeout)
ATR-based risk sizing — position size auto-scales to a fixed % of equity risked, using ATR-derived stop distance
ATR trailing stop — lets winners run instead of capping them at a fixed target
Glowing ATR bands — layered, fading visual bands around trend basis for at-a-glance regime read
Breakout candle highlighting — candles color-shift on signal and while a position is open
Live + archived trailing-stop path — see the stop while a trade is open, and its full trail once closed
How It Works
Price breaks above the highest high of the last N bars with volume above its rolling average — that's the breakout trigger.
EMA fast vs. slow defines trend direction.
RSI and its rate of change are checked at the breakout bar: still climbing and near its own recent peak = momentum confirms. Already fading or below its recent peak = momentum diverges.
Confirmed + with-trend → long. Diverging + against-trend → short (fade).
Every entry is sized off account risk %, not a fixed share count, and exits on an ATR stop plus ATR trailing stop.
Tips
Backtest across multiple symbols and volatility regimes before trusting the defaults — breakout/fade systems behave very differently in trending vs. choppy markets
Widen nLen (breakout lookback) on lower timeframes to reduce noise-driven false breakouts
If fades are underperforming, try disabling allowShorts and running long-only to isolate performance
Tighten rsiConfirmLvl for higher-conviction (fewer, cleaner) long signals
Use the glowing bands as a quick visual regime check even when not actively watching signals
استراتيجية

Divergence + RS Multi-Ticker Scanner 30 (FX + Global Indices)Divergence + RS Multi‑Ticker Scanner 30 (FX & Global Indices)
A multi‑asset scanner designed for macro traders, currency analysts and global index watchers.
It combines divergence detection (RSI / MACD / Price) with Relative Strength (RS) analysis across
30 instruments covering major FX pairs, crosses, EM currencies and global equity indices.
This tool allows you to quickly identify trend strength, weakness, momentum shifts and divergence signals
across the world’s most important markets — all in one place.
Section 1 — Major FX
EURUSD
GBPUSD
USDJPY
USDCHF
USDCAD
AUDUSD
NZDUSD
Section 2 — FX Crosses
EURJPY
EURGBP
GBPJPY
AUDJPY
CHFJPY
Section 3 — Emerging Markets FX
USDZAR
USDMXN
USDTRY
USDPLN
Section 4 — US Indices
S&P 500 (SPX)
Nasdaq 100 (NDX)
Dow Jones (DJI)
Russell 2000 (RUT)
Section 5 — Europe Indices
DAX (DEU40)
FTSE 100
CAC 40
EuroStoxx 50
Section 6 — Asia Indices
Nikkei 225
Hang Seng
Shanghai (SSE)
ASX 200
Section 7 — Volatility
VIX
VXN
Features
Multi‑ticker divergence detection (RSI / MACD / Price)
Relative Strength vs SPX benchmark
Trend and momentum scoring
Color‑coded strength/weakness visualization
Multi‑asset macro overview in one panel
Use cases
Macro trend analysis
FX strength/weakness rotation
Global index comparison
Volatility monitoring
Divergence‑based trade setups
Tags: forex, fx, currencies, indices, globalindices, macro, scanner, divergence, rs, relativeresearch, trendanalysis, spx, nasdaq, dax, nikkei, eurusd, usdjpy, gbpusd, volatility, vix, multiasset, technicalanalysis, tradingstrategy
Categories:
Indicators
Technical Analysis
Forex
Indices
Macro & Economy
مؤشر

Divergence + RS Multi-Ticker Scanner 30 (Metals & Commodities)Commodities Macro Scanner
A complete multi‑sector commodity scanner covering 30 instruments across metals, energy, agriculture, softs, ETFs and industrial materials. Includes continuous futures (1!), CFDs and ETFs for stable data and broad macro coverage.
Section 1 — Precious Metals
Gold (XAUUSD)
Silver (XAGUSD)
Platinum (XPTUSD)
Palladium (XPDUSD)
Section 2 — Industrial Metals
Copper (HG1!)
Aluminium (ALUMINIUM1!)
Nickel
Zinc
Lead
Section 3 — Energy
Crude Oil WTI (USOIL)
Crude Oil Brent (UKOIL)
Natural Gas (NG1!)
Section 4 — Agriculture
Wheat
Corn
Soybeans
Section 5 — Soft Commodities
Cocoa
Coffee
Sugar
Cotton
Orange Juice
Section 6 — Commodity ETFs
URA
LIT
DBC
GSG
GLD
SLV
USO
UNG
Section 7 — Industrial Materials
Steel Index
Lumber (LBR1!)
Purpose
Broad commodity market monitoring
Macro trend identification
Sector rotation analysis
Relative Strength workflows
ETF‑based commodity strategies
Multi‑asset portfolio context
Features
Clear sector grouping
Verified TradingView‑compatible tickers
Continuous futures for stable backtesting
Modular structure for easy expansion
Ready for RS, alerts, heatmaps, dashboards
Notes
All tickers verified for availability.
Continuous futures (1!) used for consistency.
Scanner can be expanded with RS ranking, alerts or auto‑sorting.
Tags: commodities, futures, macro, scanner, ETF, energy, metals, agriculture, softs, lumber, naturalgas, crudeoil, gold, silver, technicalanalysis, tradingstrategy
Categories:
Indicators
Technical Analysis
Commodities
Futures
Macro & Economy
مؤشر

Uptrick: Adaptive Trend TrailIntroduction
Uptrick: Adaptive Trend Trail is a trend-following overlay indicator that holds one of three states, bullish, bearish or neutral, where neutral applies only before the first confirmed flip on the chart. That state is visualized through a layered ATR trail or volatility bands, colored candles, and reversal labels. Rather than deriving direction from a single crossover, the indicator builds a composite regime score from nine weighted measurements, requires agreement from three internally calculated adaptive Supertrends, and then applies confirmation, cooldown and hysteresis rules whose strictness changes with measured market conditions. It also includes a valuation meter and a set of internal simulation statistics displayed in the Data Window.
The design intent is to require more evidence before accepting a state change when measured directional efficiency is low, rather than to detect every turn as early as possible.
Originality
A trend state can be derived from a single measurement: a moving average cross, one Supertrend, or one oscillator threshold. Each responds to a different aspect of price and each has conditions where it carries less information. A long moving average responds slowly. A single volatility-stop line can change direction repeatedly when price oscillates within its band width. An oscillator carries no information about price structure or volatility state. This script combines measurements that are informative under different conditions, so that no single one can force a state change on its own, and it makes the strictness of the decision depend on measured market conditions rather than holding it fixed.
Why these specific components were chosen :
Directional efficiency (net movement over total path traveled over 10 bars) is used because it distinguishes directional movement from back-and-forth movement covering the same ground. Its inverse, chop, is the central control variable of the script. Chop is not only an input to the score; it directly changes how many Supertrends must agree, how many bars a signal must persist, how wide the hysteresis gate is, and how long the cooldown lasts. This is the mechanism that lets one configuration behave differently in high-efficiency and low-efficiency conditions without the user changing settings.
Three Supertrends at different ATR lengths (fast 9, medium 14, slow 21) are used instead of one because a single Supertrend returns a binary direction with no measure of agreement. Three produce a vote count, which serves both as a gate (how many must agree) and as a continuous input to the composite score (vote difference divided by three). Their ATR multipliers are not fixed: chop and volatility expansion are added on top of the user's base factor, so all three widen as efficiency falls or volatility expands.
Distance from the EMA baseline and momentum are both normalized by ATR rather than used raw. This expresses them relative to recent volatility and reduces their dependence on the instrument's absolute price scale, so the same threshold values remain meaningful on instruments with very different nominal prices.
Baseline slope and a slower HL2 baseline slope are included because distance alone does not distinguish a market moving away from its mean from one moving back toward it. Two slopes at different speeds mean a short-term push against a flat longer-term structure contributes less to the score than an aligned move.
RSI is included with a small weight (0.08) as a momentum cross-check rather than as a signal generator. At that weight it cannot on its own carry the score past the gate.
Candle pressure (body direction and close location within the bar) and structure breaks (close beyond the prior N-bar high or low) are included with small weights (0.05 each) because they respond on the current bar, adding a small amount of immediacy to a score otherwise built from lagging averages.
How they work together : the nine fields are blended into one regime value smoothed by a 3-period EMA. That value must exceed a dynamic gate whose size grows with selectivity, chop and volatility deviation. Price must also be displaced from the baseline. Momentum must have the correct sign. The Supertrend vote must be confirmed and persistent. Only then does a candidate exist, and the candidate must persist for one to three consecutive bars depending on chop, with a cooldown of six to ten bars since the last flip. A separate strong-move path can bypass the candidate persistence requirement and the cooldown when all three Supertrends agree unanimously, the score exceeds the gate by an additional margin, momentum is strong and efficiency is above 0.42. It does not bypass the underlying Supertrend persistence requirement. Finally, a takeover rule requires the fast Supertrend plus at least one slower one to agree with the new direction, so a flip cannot occur against the shorter-term Supertrend structure.
The valuation meter and the internal simulation exist to provide context on the same chart rather than requiring separate indicators: one shows where smoothed RSI currently sits on a segmented scale, the other reports how the script's own state changes would have resolved under a simple trailing-stop assumption.
Features
Single trend state driving all visuals, bullish or bearish once the first flip occurs, neutral before that point
Composite regime score built from nine weighted fields, blended and smoothed with a 3-period EMA
Weighting: baseline distance 0.22, Supertrend consensus 0.20, momentum 0.19, baseline slope 0.14, slow baseline slope 0.10, directional efficiency 0.09, RSI 0.08, candle pressure 0.05, structure break 0.05
Directional efficiency engine measuring net movement against total path over 10 bars, producing a chop value used throughout the script
Volatility regime measurement comparing current ATR to its 50-period EMA, producing expansion and deviation values
Three internally calculated Supertrends (fast, medium, slow) used for logic only and not plotted on the chart
Adaptive Supertrend factors, where chop and volatility expansion are added on top of each user-set base multiplier, with the slow Supertrend receiving the largest adjustment
Vote-based Supertrend consensus requiring two of three in normal conditions and three of three when chop exceeds 0.70
Supertrend persistence requirement of one confirmed bar normally and two when chop exceeds 0.72
Dynamic hysteresis gate that widens with the selectivity input, with chop, and with volatility deviation
Price displacement filter requiring close to be above or below the baseline by an ATR-scaled amount
Momentum sign filter requiring directional momentum beyond a small deadband
Adaptive confirmation requiring one, two or three consecutive candidate bars depending on measured chop
Strong-move path that can bypass the candidate confirmation requirement and the cooldown when all three Supertrends agree, the score clears the gate by an additional 0.26, momentum exceeds 0.16 and efficiency exceeds 0.42, while still requiring Supertrend persistence
Takeover rule requiring the fast Supertrend plus one slower Supertrend to align with the new direction before any flip
Adaptive cooldown of six to ten bars between state changes, scaled by chop
All state changes evaluated on confirmed bars only, so the state does not flip on an unclosed bar
Trail overlay mode with three layers constructed at 0.55, 1.15 and 1.60 ATR multiples from the smoothed baseline, placed below it in bullish states and above it in bearish states, scaled by the width input
Bands overlay mode with three levels on each side of the baseline at 1.30, 2.00 and 2.90 ATR multiples, scaled by the width input, using an additional smoothing stage applied to the already-smoothed baseline and ATR
Overlay None mode that hides the Trail and Bands while leaving the other independently controlled outputs available
Smoothness control applied to the baseline and ATR used for the overlay geometry
Trend candles that recolor the price bars to the active state
Reversal labels printed on the bar where the state changes, placed relative to the outer trail layer
Valuation meter drawn as a table with a segmented scale and a pointer showing where 3-period smoothed RSI(14) currently sits
Four meter sizes: Off, Compact (11 segments), Normal (17 segments) and Large (25 segments)
Six meter positions covering top and bottom, left, center and right
Internal historical trade simulation driven by the script's own state changes, reported in the Data Window
Simulation outputs: return percent, win rate percent, profit factor, maximum drawdown percent and closed trade count
Simulation uses a fixed 10000 starting equity and full-equity sizing, with a fee equal to 0.1 percent of entry equity deducted at entry and a further amount equal to 0.1 percent of that same entry equity applied at exit
Simulation stop is set from the outer trail on the entry bar, constrained to at least one minimum tick beyond the entry close, and thereafter can only move in the position's favorable direction using the previous bar's outer trail value
Simulation return figure includes unrealized profit or loss on any position still open, so it is not a closed-trade-only figure
Two alert conditions, one for the bullish flip and one for the bearish flip, each carrying the ticker in the message
Inputs
Group 01, Trend Engine
Trend Length, default 34, range 10 to 200. Sets the primary EMA baseline used for the overlay, the distance field and the baseline slope field. It also determines two internally derived lengths: the slower HL2 baseline is calculated at approximately 70 percent of this value with a floor of 10, and the structure-break lookback is approximately 12 percent of this value with a floor of 3.
Momentum Length, default 12, range 3 to 100. Lookback used to measure directional momentum before ATR normalization.
Signal Selectivity, default 0.35, range 0.10 to 1.25. Raises both the hysteresis gate and the required price displacement. Higher values produce fewer state changes.
Group 02, Supertrend Confirmation
Fast Length, default 9, range 2 to 100. ATR length of the fast internal Supertrend.
Fast Factor, default 1.45, range 0.25 to 10.0. Base ATR multiplier of the fast internal Supertrend before adaptive widening.
Medium Length, default 14, range 2 to 150. ATR length of the medium internal Supertrend.
Medium Factor, default 1.95, range 0.25 to 10.0. Base ATR multiplier of the medium internal Supertrend.
Slow Length, default 21, range 2 to 200. ATR length of the slow internal Supertrend, acting as the broader continuation confirmation.
Slow Factor, default 2.55, range 0.25 to 10.0. Base ATR multiplier of the slow internal Supertrend.
Group 03, Overlay
Overlay, default Trail, options Trail, Bands, None. Selects which overlay geometry is drawn, or hides both.
Width, default 1.00, range 0.40 to 2.50. Scales the distance of all trail layers and all band levels from the baseline. Because the internal simulation uses the outer trail layer as its stop, this input also changes the Data Window statistics. It does not affect the trend engine.
Smoothness, default 5, range 1 to 20. Smooths the baseline and ATR used to build the overlay geometry, and is applied a second time to those already-smoothed values when Bands mode is selected. Because the outer trail layer is built from these smoothed values, this input also changes the Data Window statistics. It does not affect the trend engine.
Group 04, Valuation
Meter Size, default Normal, options Off, Compact, Normal, Large. Controls whether the meter is shown and how many segments it uses.
Position, default Top Center, options Top Left, Top Center, Top Right, Bottom Left, Bottom Center, Bottom Right.
How It Works
The baseline is an EMA of close over the Trend Length. ATR(14) is the volatility unit and is floored at one tick to avoid division problems on illiquid data.
Directional efficiency is the absolute 10-bar net price change divided by the sum of the absolute bar-to-bar changes over the same window, clamped between 0 and 1. Chop is one minus that value. Efficiency is signed by the 10-bar direction to form the efficiency field.
Volatility regime compares current ATR to its 50-period EMA. Expansion is the amount above one, clamped to 1.25. Deviation is the absolute distance from one, clamped to 1.50.
The three Supertrend factors are the user's base values plus a chop term and a volatility expansion term. Their directions become bullish or bearish votes. The vote requirement is two of three normally and three of three when chop exceeds 0.70, and the confirmed vote must persist for one confirmed bar, or two when chop exceeds 0.72.
Nine fields are then blended. Distance from baseline and momentum are divided by ATR and clamped. Baseline slope and slow baseline slope are three-bar changes divided by ATR and clamped. RSI(14) is centered on 50 and clamped. The Supertrend field is the vote difference divided by three. Candle pressure combines body direction and close location within the bar. Structure is plus one when close breaks the prior N-bar high and minus one when it breaks the prior N-bar low. The weighted sum is smoothed with a 3-period EMA to produce the regime value.
The gate is 0.22 plus selectivity times 0.12, plus chop times 0.085, plus a volatility deviation term capped at 0.06. A bullish candidate exists when the regime exceeds the gate, close is above the baseline by the required ATR displacement, momentum is positive beyond its deadband, and the bullish Supertrend consensus is persistent. The bearish candidate is the mirror.
A candidate must persist for one bar in high-efficiency conditions, two when chop exceeds 0.40, and three when chop exceeds 0.72. The strong-move path can bypass that candidate persistence requirement and the cooldown, but only when all three Supertrends agree, the regime clears the gate by an additional 0.26, momentum exceeds 0.16 in absolute terms and efficiency is above 0.42. Because the strong-move path is itself built on the candidate condition, it does not bypass the Supertrend persistence requirement. It is intended to provide a faster response when directional evidence is unusually strong under the script's own measurements.
Before any flip is accepted, the takeover rule requires the fast Supertrend and at least one of the medium or slow Supertrends to be aligned with the new direction. A cooldown of six bars plus up to four additional bars scaled by chop must also have elapsed since the last flip, unless the strong-move path is active. All of this is evaluated on confirmed bars only.
When the state flips, the counters reset, the label prints, the candles recolor and the overlay switches sides. Before the first flip on a chart the state is neutral, candles are yellow, and the trail layers sit flat on the baseline.
The valuation meter takes RSI(14), smooths it with a 3-period EMA, and maps it onto the selected number of segments with a pointer. It is a positioning display for smoothed RSI and nothing more; it does not measure fair value and is not part of the trend decision.
The Data Window values come from a simplified internal historical trade simulation implemented inside the indicator. The script is an indicator, not a TradingView strategy, so these are not Strategy Tester results and no Strategy Tester properties apply. The simulation opens a position at the close of each flip bar and closes it on either an opposite flip or a stop. The stop is set on the entry bar from the outer trail, constrained to at least one minimum tick beyond the entry close, and thereafter can only move in the position's favorable direction using the previous bar's outer trail value. Starting equity is 10000, the full equity is used on every position, a fee equal to 0.1 percent of entry equity is deducted at entry, and a further amount equal to 0.1 percent of that same entry equity is applied at exit. Win rate and profit factor are classified on the fee-inclusive result of each position. The return figure is calculated from equity including unrealized profit or loss on any position still open, so it is not a closed-trade-only figure.
These assumptions are deliberately simplified. The purpose is to compare the effect of different settings against one another on the same symbol, not to model a tradable account. Full-equity sizing is used so the figures are not dependent on an arbitrary position size choice, and no sizing shown here is being recommended. No slippage, spread, funding cost or gap-through-stop execution is modelled, so the simulation does not reproduce actual execution conditions and may differ materially from live trading. There is no take profit and positions are never partially closed. These values describe the script's own historical state changes under those assumptions and are not evidence about future behavior.
How to Use
Add the indicator to a clean chart and read the current state from the candle color and the overlay side. In Trail mode the layers are constructed below the smoothed baseline while the state is bullish and above it while the state is bearish. In Bands mode the three levels on each side show how far price has extended from the baseline in ATR terms.
Increase Signal Selectivity if you are getting more state changes than you want, or increase Trend Length for a slower baseline. Increase the Supertrend factors to require larger moves before the internal confirmation layer will agree. Reduce the factors and lengths for faster and noisier behavior on lower timeframes.
Width and Smoothness do not affect the trend engine, so flips and alerts are identical regardless of their values. Both do change the Data Window statistics, because the stop used by the internal simulation is drawn from the outer trail layer.
The two alerts fire on confirmed bars when the state changes. Treat the Data Window values as a rough comparison tool between settings on the loaded symbol and history, subject to the assumptions listed above.
Limitations to be aware of: because confirmation, persistence, takeover and cooldown conditions must all be satisfied before a state change is accepted, a flip can occur after price has already moved some distance from where the previous state ended. During lower-efficiency conditions the script requires additional Supertrend agreement and additional confirmation bars, which increases that distance further. These mechanisms intentionally prioritize confirmation over earliest possible detection, and that trade-off cannot be removed by settings, only shifted. Values on the current unclosed bar can change until that bar closes, since state changes are only committed on confirmed bars. The chart begins in a neutral state until the first flip is accepted. Behavior varies substantially between symbols and timeframes, and the defaults are a starting point rather than an optimized configuration.
Conclusion
Uptrick: Adaptive Trend Trail derives a trend state from nine weighted measurements rather than a single crossing, and makes the strictness of that decision a function of measured directional efficiency and volatility through the chop and volatility terms. The overlay, the trend candles, the valuation meter and the internal simulation are there to make that state and its context readable on one chart. It is a decision-support tool for discretionary trend reading and is intended to be used alongside your own analysis and risk management rather than as a standalone system.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice and does not constitute a recommendation to buy or sell any instrument. All trading involves risk and can result in substantial losses. Leveraged products can involve additional risks that depend on the instrument, broker and account structure. Past behavior of this indicator, including any statistics it displays, does not predict or guarantee future results. Signals, statistics and visuals vary across symbols, timeframes and market conditions. You are solely responsible for your own trading decisions and should test any tool thoroughly and apply your own risk management before using it with real capital. مؤشر

مؤشر

Advanced Swing Structure - Pips, Candles & SLAdvanced Swing Structure – Pips, Candles & SL
Advanced Swing Structure is an enhanced ZigZag-based market structure indicator designed to provide a clearer view of price swings, market structure, swing distance, duration, and potential stop-loss positioning.
The indicator identifies key structural swing points and classifies them as Higher High (HH), Higher Low (HL), Lower High (LH), or Lower Low (LL). This makes it easier to visually follow bullish and bearish market structure as price develops.
Each swing displays two additional measurements:
Pips – the distance travelled between swing points.
Candles – the number of candles between swing points.
The indicator also includes a swing-based Stop Loss (SL) feature. The SL level uses the previous opposite swing as its reference and applies a configurable pip offset. In bullish conditions, the SL is positioned below the reference swing; in bearish conditions, it is positioned above the reference swing.
Depth, Deviation and Backstep can be adjusted to control the sensitivity of the swing detection. ZigZag lines, bullish and bearish colours, label size, transparency, background highlighting and SL appearance can also be customised.
Features include:
HH, HL, LH and LL market structure
ZigZag swing detection
Pip distance between swings
Candle count between swings
Swing-based Stop Loss level
Adjustable SL offset
Customisable bullish and bearish colours
Configurable Depth, Deviation and Backstep
Optional repainting of developing swings
Optional ZigZag line extension
Pine Script v6
Repainting: When Repaint Levels is enabled, the current developing swing can move as price creates new highs or lows. This is normal ZigZag behaviour and should be considered when analysing live market conditions.
Acknowledgement: Based on the original ZigZag++ by DevLucem, with additional functionality and modifications added to this version. مؤشر

VWAP Rope Band by ByblloVWAP Rope Band plots a smoothed trend line (the "rope") that only moves once price has traveled beyond a VWAP-deviation threshold from its last position - small back-and-forth noise around VWAP is absorbed, and the line only steps when a move is statistically meaningful.
The threshold is the standard deviation of (close - VWAP) over a lookback period, scaled by a multiplier, so the surrounding band automatically widens or narrows with how far price is currently dispersing from VWAP - no manual adjustment needed as volatility changes.
A genuine trend reversal is only registered once the rope actually reverses direction (not on every VWAP wiggle). That short transition window gets its own color, an optional gradient cloud, and an optional Buy/Sell badge at the exact bar the reversal is confirmed.
INTENDED USE
Works well for short-term futures scalping - Nasdaq futures, KOSPI200 futures, and similar instruments. Built and tested primarily on the 1-minute chart, but the underlying VWAP/rope/band logic is timeframe-agnostic and holds up well on 2, 3, and 5-minute charts and other intraday timeframes too. The StdDev Length and Band Multiplier adapt to volatility automatically, but it's worth rechecking them when you switch timeframe or instrument.
FEATURES
- Threshold-based "rope" trend line that ignores VWAP noise, only stepping on statistically meaningful deviations
- Volatility-adaptive band (self-widening/narrowing standard-deviation envelope around the rope)
- True-gradient cloud fill between rope and band, with adjustable steepness
- Confirmed-reversal transition detection with its own color/cloud, auto-expiring after 5 bars if unresolved
- Optional Buy/Sell badge plotted at the exact bar a reversal is confirmed
- Two alert families: simple rope crossover/crossunder, and confirmed Buy/Sell signal alerts
- Works on any chart type (candlestick, Heikin Ashi, Renko, etc.) since prices are pulled via request.security() from the underlying ticker
This is a visual/alerting tool only - it does not place real orders. For educational and informational purposes only, not financial advice. Always verify how the rope and bands behave on your specific symbol and timeframe before relying on them for live trading. مؤشر

Adaptive Trend Direction Indicator [ATR Trail + Regime]Adaptive Trend Direction
WHAT IT DOES
Adaptive Trend Direction is a trend-following state indicator. It answers three questions on every bar: which way is the trend pointing, is the market currently orderly enough for a trend signal to be worth taking, and where is the level that would invalidate that view.
The core is an ATR trailing stop that flips between a bullish and a bearish state. On its own a trailing stop flips constantly in choppy conditions, which is the well-known failure mode of every trend follower. This script's purpose is to gate those flips behind a two-factor regime test, so that the flips which occur inside directionless price action are marked as such instead of being presented as trend signals.
HOW IT WORKS
ATR trailing stop. A stop is placed one ATR-multiple away from the close (default ATR 23, multiplier 3.0). While the state is bullish the stop only ratchets upward; while bearish it only ratchets downward. A close beyond the stop flips the state and the stop jumps to the opposite side of price. The state flip is the raw directional signal.
Regime detection — ADX plus Efficiency Ratio. Two independent measures must agree before the market counts as trending. ADX (default period 10) must exceed its threshold (default 21), measuring directional strength. Kaufman's Efficiency Ratio must exceed its threshold (default 0.15), calculated as the absolute net move over N bars divided by the sum of the absolute bar-to-bar moves over the same window — a value near 1 means price travelled in a straight line, a value near 0 means it covered the same ground repeatedly. ADX can rise on volatile chop; the Efficiency Ratio cannot. Requiring both is what filters out that case.
Hysteresis. The regime does not flip the moment the two tests agree. It requires N consecutive confirming bars (default 3) before switching, in either direction. This stops the regime label from oscillating bar to bar around the thresholds, which would otherwise reintroduce the exact noise the filter is meant to remove.
RSI momentum filter. A directional flip is only accepted if RSI confirms it — above the long threshold for longs, below the short threshold for shorts. The defaults (48 long, 43 short) sit close to the midline, so this rejects flips that occur against prevailing momentum rather than demanding an extreme reading.
Signal end conditions. An open directional signal is marked as finished on whichever comes first: an opposing trailing-stop flip, an EMA slope reversal against the signal (optional, off by default), or a maximum bar count (default 140) that retires a signal which has gone nowhere.
Optional mean-reversion mode. When the regime is ranging, the default behaviour is to stand aside — no signals are generated. Setting "Ranging Mode" to 1 instead generates counter-trend signals from RSI extremes (default below 30 / above 70) with ATR-based take-profit and stop levels drawn on the chart. This is opt-in because it is a different premise from the rest of the script and should be evaluated separately.
WHAT YOU SEE ON THE CHART
Trailing stop line, green in the bullish state and red in the bearish state.
Background tint: green while the regime is trending, amber while ranging.
Triangles mark trend signals, circles mark mean-reversion signals, crosses mark where a signal ends.
Bars are tinted while a signal is active, so the held periods are visible at a glance.
A label at the end of each signal shows the percentage move over that leg, with a tooltip giving entry, exit, end reason and bars held. This is a measurement of the price move between two chart events. It is not a return, and it accounts for no costs.
A dashboard reports ATR, stop level, direction, RSI, EMA slope, regime with live ADX/ER values, current signal state, and which components are switched on.
SIZING READ-OUT
The dashboard also reports a volatility-normalised exposure figure: leverage that scales inversely with recent ATR so that a fixed percentage of a reference account is at risk regardless of how volatile the market currently is, clamped between a floor and a ceiling. Setting the vol target to 0 switches to a stop-distance-based calculation instead. This is informational only. It gates no signal, and the reference account size affects only the displayed units — the leverage figure itself is independent of it.
WHY THIS IS AN INDICATOR AND NOT A STRATEGY
The script tracks an internal long/short/flat state so the chart can colour bars and measure each leg, but it submits no orders and produces no Strategy Tester report. That is intentional. Fill assumptions, funding and leverage modelling on a leveraged instrument dominate any backtest of a system like this, and a tester report would imply a precision the model does not have. What is shown here is the signal logic and the price move between signals, which is what can be verified directly on the chart.
SETTINGS AND USAGE NOTES
The defaults were fitted by a parameter search on a single market and timeframe (BTC on a 6-hour chart). They are a starting point for that context, not universal values, and there is no reason to expect them to transfer unchanged to other symbols or timeframes — the ATR multiplier and the regime thresholds in particular are the ones to revisit first. The volatility estimate used by the sizing read-out assumes roughly a 6-hour bar; on other timeframes it should be recalibrated.
Every component has an independent toggle, so the contribution of each can be isolated: turn the regime filter off to see the raw trailing-stop flips, then turn it back on to see which ones it removed. Signals are evaluated on bar close.
Alerts are available for signal start and signal end, in plain text or as a JSON body for programmatic consumers.
LIMITATIONS
This is a trend-following model. It will give back open gains at every reversal, because the exit is a trailing stop rather than a target. It will produce clustered false flips at regime boundaries, since the confirmation delay lags a genuine turn by design. The mean-reversion mode takes positions against the prevailing move and behaves very differently from the trend mode. Signal-leg percentages shown on the chart exclude commission, slippage and funding.
Published open-source. Not financial advice, not a recommendation to trade any instrument, and nothing here is a forecast. Test it yourself before relying on it. مؤشر

استراتيجية

مؤشر

مؤشر

مؤشر

Kinetic MTF Trend & Structure RibbonsKinetic Trend & Structure Ribbons is a multi-layer trend framework designed to make market structure visible across multiple time horizons on a single chart.
Instead of treating moving averages as isolated crossover signals, Kinetic organizes them into a visual hierarchy: Execution → Trend → Structure → Long-Term Regime
The goal is simple: quickly identify whether price is trending, pulling back, compressing, transitioning, or undergoing a deeper structural change.
The framework is primarily designed around stocks and swing trading , while retaining enough short-term information to assist with lower-timeframe execution.
Core Concept
Markets operate across multiple time horizons simultaneously.
A short-term selloff can occur inside a strong intermediate uptrend. An intermediate downtrend can occur while long-term structure remains bullish. Likewise, a short-term breakout means much more when the larger structural layers are aligned behind it.
Kinetic separates these horizons visually rather than compressing everything into a single bullish/bearish signal.
The framework is designed to answer four questions:
1. What is price doing right now?
2. What direction is the active trend?
3. Where is deeper market structure?
4. What is the long-term regime?
The relationship between these layers is often more important than any individual moving average.
Visual Hierarchy
1. Execution Ribbon
The fastest group of averages follows price closely and represents short-term market behavior.
Use it to observe:
*Short-term momentum
* Expansion and contraction
* Trend rotation
* Pullbacks
* Reclaims
* Early changes in direction
When the ribbon is tightly compressed, the market may be entering equilibrium.
When it expands cleanly in one direction, short-term trend strength is increasing.
2. Gaussian Trend Line
The Gaussian filter acts as a smooth trend spine between short-term price action and the broader structural ribbons.
Its purpose is to reduce short-term noise while remaining responsive enough to identify meaningful changes in direction.
Watch for:
* Price reclaiming or losing the Gaussian
* Changes in Gaussian slope
* Interaction between the Gaussian and execution ribbon
* Compression between the Gaussian and larger trend structure
The Gaussian should be interpreted in context rather than as a standalone buy or sell signal.
3. Blue Trend Ribbon
The blue ribbon represents the primary trend layer.
This is the area where normal pullbacks within an established trend can often be distinguished from more meaningful structural deterioration.
Key characteristics include:
* Rising + expanding: strengthening bullish trend
* Falling + expanding: strengthening bearish trend
* Flattening: trend momentum is weakening
* Compressing: equilibrium or transition
* Price repeatedly respecting the ribbon: established trend behavior
The location of the execution layer and Gaussian relative to the blue ribbon provides additional context.
4. Gold Structure Ribbon
The gold ribbon represents slower, deeper market structure.
Because this layer reacts more slowly than the blue trend ribbon, interaction with gold generally represents a more significant event than an ordinary short-term pullback.
The gold ribbon can help distinguish between:
* Routine trend retracement
* Intermediate correction
* Structural reset
* Major trend transition
A market can lose its short-term trend while its deeper structure remains intact.
This distinction is one of the central ideas behind Kinetic.
5. Red Long-Term Regime
The red layer represents the slowest structural reference within the framework.
It is intended to provide long-term regime context rather than short-term entries.
Think of the hierarchy as:
Fast price behavior
↓
Execution
↓
Gaussian
↓
Blue Trend
↓
Gold Structure
↓
Red Long-Term Regime
As price penetrates progressively deeper layers, the significance of the move generally increases.
Reading the Framework
Bullish Alignment
The cleanest bullish environments occur when the layers become progressively ordered beneath price.
Typical characteristics:
* Price above the execution ribbon
* Execution ribbon expanding upward
* Gaussian rising
* Blue trend ribbon rising
* Gold structure ribbon rising
* Faster layers positioned above slower layers
This creates a visual hierarchy in which shorter-term momentum is supported by progressively deeper structure.
Bearish Alignment
The opposite configuration represents bearish alignment.
Typical characteristics:
* Price below the execution ribbon
* Execution ribbon expanding downward
* Gaussian falling
* Blue trend ribbon declining
* Gold structure deteriorating
* Faster layers positioned beneath slower layers
The more completely the hierarchy becomes inverted, the more significant the bearish regime.
Compression → Expansion
One of the most important concepts in Kinetic is compression and expansion.
During compression, multiple layers begin moving closer together. Trend separation decreases and the market approaches equilibrium.
Compression itself does not predict direction.
Instead, it identifies an environment where the existing trend structure has weakened and a new directional move may eventually develop.
The subsequent expansion provides the directional information.
Compression
Look for:
* Narrowing ribbons
* Flattening slopes
* Gaussian convergence
* Price repeatedly crossing the same structural area
* Reduced separation between fast and slow layers
Expansion
Look for:
* Ribbon separation increasing
* Consistent slope developing
* Price holding one side of the framework
* Faster layers leading slower layers
* Structural ordering becoming increasingly clean
Compression represents potential energy. Expansion reveals direction.
Pullbacks vs. Structural Breaks
Not every decline is bearish.
This framework was specifically designed to preserve the distinction between short-term weakness and long-term structural weakness.
For example, price may:
1. Lose the execution ribbon while remaining above blue.
2. Enter the blue trend ribbon while gold remains intact.
3. Lose blue and test deeper gold structure.
4. Lose both trend and structure and begin approaching the long-term regime layer.
These events should not be treated as equivalent.
The deeper price moves through the hierarchy, the more meaningful the structural deterioration becomes.
The same concept applies in reverse during recovery from a bearish regime.
Trend Transitions
Markets rarely move instantly from fully bullish to fully bearish structure.
Transitions frequently occur progressively:
Expansion → Deceleration → Compression → Rotation → Reordering → Expansion
Kinetic is designed to make this process visible.
Rather than attempting to predict every turning point, the framework allows the trader to observe the market reorganizing itself across multiple time horizons.
Practical Use
Kinetic is best used as a context and structure framework, not as a mechanical buy/sell system.
Potential applications include:
* Trend identification
* Swing-trade filtering
* Pullback evaluation
* Structural support/resistance
* Compression identification
* Breakout context
* Trend continuation
* Regime identification
* Multi-timeframe alignment
* Risk management context
A trader may combine the framework with independent tools such as price action, volume, relative strength, volume profile, or anchored VWAP depending on their methodology.
These external tools are not required for the framework itself.
Signals
Where enabled, Kinetic includes visual signals designed to highlight changes within the faster components of the framework.
Signals should not be interpreted as automatic entries or exits.
Their significance depends heavily on surrounding structure.
For example, a bullish short-term signal occurring above rising blue and gold ribbons represents a very different environment from the same signal occurring beneath declining structural layers.
Context comes first. Signal comes second.
Timeframe Philosophy
Kinetic uses multiple structural horizons so that a lower-timeframe chart can retain awareness of the larger trend.
This makes it particularly useful for traders who execute on shorter charts while making decisions based on higher-timeframe structure.
The objective is not to make every timeframe look identical.
It is to maintain a consistent structural framework while allowing price behavior to be examined at different levels of detail.
What Kinetic Is — and Isn’t
Kinetic is designed to visualize trend architecture.
It is not intended to:
* Predict exact tops or bottoms
* Generate guaranteed trade entries
* Replace risk management
* Eliminate false breakouts
* Function as a standalone trading strategy
The framework organizes information that already exists in price into a more intuitive structural hierarchy.
Its value comes from interpreting the relationships, slopes, ordering, compression, and expansion of those layers.
Quick Reference
Execution Ribbon → Short-term behavior and rotation
Gaussian → Smoothed trend spine
Blue Ribbon → Primary trend
Gold Ribbon → Deeper market structure
Red Layer → Long-term regime
The basic visual rule:
Ordered + expanding = trend
Compressed + intertwined = equilibrium / transition
Reordered + expanding = new trend structure
Final Notes
Kinetic was built around a simple premise: Price should not be viewed against one moving average or one timeframe in isolation.
Trend exists as a hierarchy.
Short-term momentum moves first. Intermediate trend follows. Deeper structure moves more slowly. Long-term regime changes slowest of all.
Kinetic brings those layers together so that their relationship can be read visually on a single chart.
Execution → Trend → Structure → Regime
The goal is not to predict what the market must do next.
The goal is to make it easier to see what the market is doing now.
مؤشر

Hanif BB + Inside Bar + 3 EMA + Overbought/OversoldDeskripsi:
Indikator gabungan ini mengintegrasikan beberapa alat analisis teknikal populer dalam satu skrip Pine Script v6:
Bollinger Bands: menampilkan basis, upper, dan lower band dengan warna basis berubah kuning jika upper band ≥ 5% di atas harga.
Inside Bar Boxes: otomatis menggambar kotak pada pola inside bar, dengan opsi highlight candle, hanya tampilkan box terakhir, dan sinyal breakout (triangle up/down).
3 EMA Fleksibel: tiga garis EMA dengan panjang dan warna yang bisa diatur sesuai kebutuhan (default 50, 100, 200).
Overbought/Oversold: panel tambahan dengan histogram, sinyal Buy/Sell, serta pewarnaan candle utama sesuai kondisi indikator.
Fitur Utama:
Semua indikator dalam satu file, praktis dan efisien.
Input fleksibel untuk panjang dan warna EMA.
Candle otomatis berubah warna sesuai kondisi Overbought/Oversold.
Alert bawaan untuk sinyal Buy/Sell dari indikator Overbought/Oversold.
Tujuan:
Membantu trader mengidentifikasi tren, momentum, dan potensi breakout dengan kombinasi visual yang lengkap dan mudah dibaca. مؤشر

Supertrend Confirmed Close | forexs# Supertrend Confirmed Close
Supertrend Confirmed Close is an open source modification of the classic ATR based Supertrend indicator. Its main purpose is to confirm trend reversals only after the current bar has closed, so temporary intrabar crossings do not create confirmed Buy or Sell signals.
## How it works
The indicator builds trailing volatility bands from Average True Range and a user selected price source.
Default settings:
ATR Period: 10
ATR Multiplier: 3.0
Source: HL2
ATR Method: Wilder ATR
An SMA of True Range can also be selected as an alternative ATR calculation.
During a bullish state, the lower Supertrend band trails price. During a bearish state, the upper Supertrend band trails price.
A bullish reversal is confirmed when the previous trend state is bearish and a completed bar closes above the previous bearish Supertrend band.
A bearish reversal is confirmed when the previous trend state is bullish and a completed bar closes below the previous bullish Supertrend band.
## What is different in this version
This implementation adds explicit closed bar confirmation to the reversal logic. The trend state, Buy signal, Sell signal, and direction change alerts are not confirmed until the bar is complete.
It also includes an optional "Freeze Supertrend Line Until Candle Close" setting. When enabled, the displayed active Supertrend line remains at its previous confirmed value while the realtime bar is forming, then updates when the bar closes.
Other additions include Pine Script v6 compatibility, organized inputs, optional trend change circles, trend highlighting, and separate alert conditions for bullish, bearish, and any confirmed direction change.
## Signals and alerts
BUY marks a confirmed change from a bearish Supertrend state to a bullish Supertrend state.
SELL marks a confirmed change from a bullish Supertrend state to a bearish Supertrend state.
These labels describe the indicator's trend state. They are not forecasts or guarantees of future price direction.
Alert conditions are provided for confirmed Buy, confirmed Sell, and confirmed direction changes. Users may also select TradingView's Once Per Bar Close frequency when creating an alert.
## Settings
Users can adjust the ATR period, ATR multiplier, source, and ATR calculation method. Buy and Sell labels, trend change circles, trend highlighting, and realtime line freezing can also be enabled or disabled.
## Limitations
Supertrend is a trend following method. In sideways or choppy markets it can change direction frequently and produce false or late signals.
Closed bar confirmation intentionally waits until the bar is complete. This avoids treating temporary intrabar crossings as confirmed reversals, but it can also make signals occur later than an intrabar implementation.
ATR settings materially affect sensitivity. Different symbols, market conditions, and timeframes can produce different behavior.
This indicator does not include position sizing, stop loss rules, profit targets, trade management, or performance guarantees. It should not be treated as a complete trading system.
For signal based use, apply it to standard price charts such as regular candles or bars rather than synthetic chart types whose prices do not represent directly traded market prices.
## Credits and open source reuse
This script reuses and modifies the open source SuperTrend implementation published by TradingView author KivancOzbilgic. That publication also credits everget, Alex Orekhov, for inspiration related to highlighting, signals, and alerts.
The reused Supertrend logic is credited here in accordance with TradingView's open source reuse requirements. This modified publication should remain open source unless the necessary permission for another publication mode has been obtained from the original author.
## Disclaimer
This indicator is provided for technical analysis and educational purposes only. It is not financial or investment advice. No signal or indicator can guarantee a profitable outcome.
مؤشر
