Indicador

Indicador

ICT SMC H4 FVG Retest M15 Scalping KillzonesICT SMC H4 FVG Retest — M15 Scalping Killzones
Overview
ICT SMC H4 FVG Retest — M15 Scalping Killzones is a multi-timeframe trading indicator designed to identify structured intraday setups based on:
* Confirmed higher-timeframe Fair Value Gaps
* M15 execution Fair Value Gaps
* ICT-style killzones
* Session highs and lows
* H4 buy-side and sell-side liquidity
* Market or limit-entry models
* Liquidity-based profit targets
The indicator is intended to be used on a 15-minute chart.
Its purpose is not to generate a large number of signals. It is designed to wait for a higher-timeframe imbalance, a valid departure from that zone, and a later retest during an active trading session.
⸻
Core strategy
The standard short setup follows this sequence:
1. A bearish H4 Fair Value Gap is confirmed.
2. Price moves below the H4 FVG.
3. Price later returns to the H4 FVG during an enabled killzone.
4. A bearish M15 FVG forms and overlaps the H4 zone.
5. The M15 candle closes and confirms the setup.
6. The indicator displays the proposed entry, stop-loss and target.
The bullish setup uses the opposite sequence:
1. A bullish H4 FVG is confirmed.
2. Price moves above the H4 FVG.
3. Price later returns to the H4 FVG during an enabled killzone.
4. A bullish M15 FVG forms inside or overlapping the H4 zone.
5. The M15 candle closes and confirms the setup.
6. The indicator displays the proposed entry, stop-loss and target.
The H4 FVG that is created during the initial market displacement is treated as a future retest zone. The indicator does not use the M15 FVGs that formed before the H4 candle was confirmed.
⸻
Non-repainting higher-timeframe logic
The indicator only uses confirmed higher-timeframe candles.
A new H4 FVG is therefore displayed only after the third H4 candle in the three-candle FVG sequence has closed.
This avoids using an H4 imbalance that may appear intrabar and disappear before the H4 candle closes.
The trade-off is intentional:
* the FVG is not shown as confirmed while the H4 candle is still forming;
* once the H4 candle closes, the confirmed zone appears on the M15 chart;
* the indicator then waits for a future retest.
The confirmed HTF FVG is used for signals and alerts. No unconfirmed HTF data is used for trade validation.
⸻
Fair Value Gap definition
Bullish FVG
A bullish FVG exists when the low of the third candle is above the high of the first candle.
The imbalance is the price range between:
* the high of the first candle;
* the low of the third candle.
Bearish FVG
A bearish FVG exists when the high of the third candle is below the low of the first candle.
The imbalance is the price range between:
* the high of the third candle;
* the low of the first candle.
The large middle candle is usually the displacement candle, but its full body is not the FVG. The FVG is only the untraded space between the first and third candles.
⸻
Entry modes
The indicator includes three HTF retest models.
A — Strict retest
Price must first close outside the HTF FVG, then return to the zone.
For a bearish FVG:
* price must close below the FVG;
* price must later return into it.
For a bullish FVG:
* price must close above the FVG;
* price must later return into it.
This is the most selective mode and is the default setting.
A′ — Tolerant retest
A wick outside the HTF FVG is sufficient to validate the departure.
This mode produces more opportunities than the strict model but may accept less decisive departures.
B — Direct tap in killzone
No prior departure from the HTF FVG is required.
A direct touch of the HTF zone during an enabled killzone can become eligible if the remaining entry conditions are satisfied.
This is the least selective mode.
⸻
M15 confirmation
By default, the indicator requires an M15 Fair Value Gap in the same direction as the HTF FVG.
For a short:
* the HTF FVG must be bearish;
* the M15 FVG must also be bearish;
* the M15 FVG must overlap the HTF FVG.
For a long:
* the HTF FVG must be bullish;
* the M15 FVG must also be bullish;
* the M15 FVG must overlap the HTF FVG.
The M15 FVG size filter can be used to ignore very small imbalances.
When Require an M15 FVG is disabled, the indicator can generate a setup from a simple HTF FVG retest during a killzone.
⸻
Candle-close confirmation
The setting:
Validate signals only at M15 close
should normally remain enabled.
When enabled:
* an intrabar M15 FVG is not enough;
* the setup must still be valid when the M15 candle closes;
* triangles and alerts are produced only from confirmed M15 conditions.
This prevents signals from appearing during a candle and disappearing before its close.
⸻
Killzones
Killzones are anchored to the native timezone of each market. They automatically follow daylight-saving changes where applicable.
Asia killzone
Default timezone:
Asia/Tokyo
Default window:
09:00–13:00 Tokyo time
London killzone
Default timezone:
Europe/London
Default window:
07:00–10:00 London time
New York AM killzone
Default timezone:
America/New_York
Default window:
09:30–11:00 New York time
New York PM killzone
Default timezone:
America/New_York
Default window:
13:30–16:00 New York time
Each killzone can be enabled, disabled or adjusted independently.
The background colors only indicate an active trading window. They do not indicate bullish or bearish direction.
⸻
Entry types
Market at close
The proposed entry is the closing price of the confirmed signal candle.
The setup becomes visually active immediately after confirmation.
Limit at FVG edge
The indicator places a theoretical limit entry at the relevant edge of the M15 FVG.
For a bearish setup, the entry is placed at the lower boundary of the bearish M15 FVG.
For a bullish setup, the entry is placed at the upper boundary of the bullish M15 FVG.
If M15 confirmation is disabled, the relevant HTF FVG boundary is used instead.
The limit order remains pending for the selected number of M15 candles. If it is not filled before expiration, the order is cancelled and the HTF zone may become available for a later setup.
⸻
Stop-loss placement
For a bearish setup, the stop-loss is placed:
* above the opposite side of the M15 FVG;
* plus the selected tick buffer.
For a bullish setup, the stop-loss is placed:
* below the opposite side of the M15 FVG;
* minus the selected tick buffer.
When M15 FVG confirmation is disabled, the stop is placed beyond the opposite side of the HTF FVG.
The Stop buffer in ticks setting adds a small safety margin beyond the imbalance boundary.
⸻
Profit targets
The indicator supports two target models.
Liquidity target
When enabled, the indicator searches for the nearest eligible liquidity level in the direction of the trade.
Possible targets include:
* previous Asia session high or low;
* previous London session high or low;
* previous New York session high or low;
* H4 buy-side liquidity;
* H4 sell-side liquidity;
* the current session high or low.
A target must offer at least the selected minimum reward-to-risk ratio.
Fixed R:R fallback
If no eligible liquidity target is available, the indicator uses the selected fixed reward-to-risk ratio.
The default fallback is:
2.0R
⸻
Swept liquidity handling
Two modes are available.
Legacy v3.3
Previously swept session levels and H4 liquidity levels may still be used as targets.
This mode preserves the original behavior of the earlier indicator.
Untouched liquidity only
Once a liquidity occurrence has been swept, it is no longer eligible as a target.
A new pivot or a new completed session may later create a new active liquidity occurrence at the same or a similar price.
This mode is generally more selective because it targets liquidity that has not yet been consumed.
⸻
Session levels
The indicator tracks the highs and lows of:
* Asia
* London
* New York
Each session is calculated in its native timezone, which prevents the levels from drifting when the United Kingdom or the United States changes between standard time and daylight-saving time.
At the end of a session:
* the high and low are frozen;
* their labels remain anchored to the session close;
* the levels can be used as potential liquidity targets.
The number of stored sessions can be adjusted in the settings.
⸻
H4 SSL and BSL levels
The indicator also plots confirmed H4 pivot liquidity.
BSL
Buy-Side Liquidity
Displayed above confirmed H4 swing highs.
SSL
Sell-Side Liquidity
Displayed below confirmed H4 swing lows.
The pivot lookback determines the significance and confirmation delay of these levels.
A larger lookback produces more structurally significant levels, but they are confirmed later.
⸻
Dashboard
The dashboard shows the current state of the setup for both long and short directions.
Three display sizes are available:
* Small
* Medium
* Large
HTF active
A confirmed HTF FVG is currently active in that direction.
HTF departure
Price has moved outside the HTF FVG according to the selected A or A′ departure logic.
In Mode B, a prior departure is not required for the final signal.
HTF retest
The current candle is touching or overlapping the active HTF FVG.
Killzone
The current candle is inside at least one enabled killzone.
M15 FVG
A valid M15 FVG exists in that direction and passes the minimum-size filter.
HTF overlap
The M15 FVG overlaps the active HTF FVG.
M15 close
The current M15 candle is confirmed.
While the live M15 candle is still forming, this field may display No.
Available
No previous trade or pending limit order is currently blocking a new setup.
Raw signal
The structural conditions are satisfied before final trade-availability and candle-close validation.
Signal
All required conditions are satisfied and a valid setup has been produced.
⸻
Signal markers
A confirmed short setup is displayed as:
* a red downward triangle;
* the letter S.
A confirmed long setup is displayed as:
* a green upward triangle;
* the letter L.
The indicator also creates a label containing:
* entry price;
* stop-loss;
* target;
* expected reward-to-risk ratio.
The risk and reward areas are displayed directly on the chart.
⸻
Near-miss labels
The optional Show near misses setting helps diagnose why an otherwise valid-looking setup was rejected.
Possible reasons include:
* LEFT — price has not yet departed from the HTF FVG;
* KZ — the setup is outside an enabled killzone;
* CLOSE — the M15 candle has not yet closed;
* BUSY — a trade or limit order is already active.
Near-miss labels are primarily intended for testing and configuration. They may create visual clutter during normal use.
⸻
Alerts
The indicator provides separate alert conditions for:
* LONG setup detected;
* SHORT setup detected;
* LONG limit order filled;
* SHORT limit order filled;
* target reached;
* stop-loss reached.
For confirmed signals, alerts should be configured to trigger once per bar close.
⸻
Recommended starting configuration
For index futures such as NQ or MNQ:
* Chart timeframe: 15 minutes
* HTF FVG timeframe: 240 minutes
* Entry logic: A — Strict retest
* Require M15 FVG: Enabled
* Validate only at M15 close: Enabled
* Entry type: Limit at FVG edge or Market at close
* Minimum M15 FVG size: adjust to the instrument
* Liquidity mode: Untouched liquidity only
* Minimum target R:R: 1.0–1.5
* Fallback R:R: 2.0
* London killzone: Enabled
* New York AM killzone: Enabled
The Asia and New York PM killzones can be enabled according to the instrument and the trader’s preferred session.
⸻
Practical workflow
1. Apply the indicator to an M15 chart.
2. Confirm that an HTF FVG is active in the dashboard.
3. Wait for price to move away from the HTF FVG.
4. Wait for price to return to the zone during an enabled killzone.
5. Look for a same-direction M15 FVG inside or overlapping the HTF FVG.
6. Wait for the M15 candle to close.
7. Review the proposed entry, stop and target.
8. Confirm the broader market context before placing a trade.
The indicator is best used as a structured decision-support tool rather than as a fully autonomous trading system.
⸻
Important limitations
* A confirmed H4 FVG appears only after the relevant H4 candle closes.
* The indicator will not retrospectively use an M15 FVG that formed before the H4 FVG became confirmed.
* H4 pivot liquidity is confirmed with delay because pivots require candles on both sides.
* If both the stop and target are touched during the same M15 candle, the visual trade logic uses the stop-loss as the conservative outcome.
* The script is an indicator, not a broker emulator or complete backtesting strategy.
* No indicator can guarantee profitability.
⸻
Disclaimer
This indicator is provided for educational and analytical purposes only. It does not constitute financial advice, investment advice or a recommendation to buy or sell any financial instrument.
Trading futures, leveraged products and other financial markets involves substantial risk. Users are responsible for testing the indicator, defining their own risk-management rules and determining whether the methodology is suitable for their trading plan. Indicador

1st Presented Fvg's [M1D]OVERVIEW
1st Presented Fvg's (M1D) isolates the very first Fair Value Gap each hourly window prints —
the one everything else in that hour reacts to — and tracks its full lifecycle: does it
hold, does it fail, does it invert, and does the inversion validate on a retest. Instead of
marking every FVG on the chart, it keeps only the one gap the model cares about per hour and
reports what happened to it.
It is a single-timeframe, event-tracking tool rather than a signal generator. It tags one
gap per hourly window, runs a strict hold / fail / invert / validate state machine on it, and
rolls a running Hold %, Inverted count and Valid IFVG count into a small dashboard so you can
see how the current session is actually behaving.
Detection and every state transition evaluate on confirmed bars only — nothing is decided
intrabar, and the chart requires an intraday timeframe of 60 minutes or less.
WHAT IT PLOTS
- 1st Presented FVG zone — a coloured box drawn from the exact three-candle gap, labelled
with its hourly window (e.g. "1st - 2pm") and an optional macro-window time suffix (e.g.
"1st - 2pm 1:50-2:10"). Zone colour cycles through your chosen palette by hour.
- NY Open tag — inside the 9:30-10:00 NY session specifically, the gap is labelled "1st -
NY Open" instead of the generic hour label, and only appears once price has swept a recent
pivot high or low first (see Key Definitions below).
- Inversion (IFVG) tag — a gap that held, then closed through, turns orange and is
relabelled IFVG.
- Valid IFVG tag (✔) — once an inverted gap is retested (price trades back into it), it
gains a check mark and a brighter fill, so a live, usable IFVG stands out from one still
forming.
- Failed gap (optional) — a gap that closed through without ever holding can be kept on
chart dimmed for context, or deleted outright; either way it is counted in the stats.
- Dashboard (M1D) — a small monospace table showing the current session, current time, and
a Today vs. Total read of gaps tagged, gaps held, Hold %, gaps inverted, and validated
IFVGs.
KEY DEFINITIONS
- Held — the point at which a 1st Presented FVG is considered to have defended its zone,
rather than just being tagged. Governed by the Hold Definition setting below.
- Reject & Close Away (default Hold Definition) — price must trade into the gap and then
close back outside its proximal edge before it counts as held. A tap that closes through
without that rejection is scored as a fail, not a hold — so Hold % reflects confirmed
rejections, not every incidental touch.
- Touch & Hold (alternate Hold Definition) — any trade into the gap that doesn't close
through it counts as held immediately, no rejection required.
- Inversion (IFVG) — a gap that held first, then later closed through it. This sequence is
mandatory: a gap that runs straight through without ever holding is a fail, never an
inversion.
- Valid IFVG — an inverted gap that price has subsequently traded back into.
- Hold % — held gaps ÷ gaps tagged, shown separately for Today and All-Time.
- NY Open liquidity sweep — inside the 9:30-10:00 New York session, the 1st Presented tag
runs on its own daily slot, separate from the normal hourly one, so an earlier random gap
in the same clock hour can't use up the slot before the open range even happens. That slot
only fills once price has swept a recent confirmed swing pivot — a low for a bullish gap,
a high for a bearish gap — immediately before the gap forms, so the tag reflects a genuine
liquidity grab rather than the first random three-candle gap after 9:30.
HOW TO USE IT
Reading the state of the current gap
- A live-coloured zone with no orange means the 1st Presented FVG is still fresh or holding
— treat it as an active zone.
- Orange means it has inverted — price closed through it after holding, so it now has the
opposite role.
- Orange with a ✔ means the inversion has been retested and validated — the strongest read
of the three, since price has both flipped the gap and come back to confirm it.
- A dimmed zone (if you keep failed gaps) means it closed through without ever holding —
context only, not a level to lean on.
Reading the dashboard
- Hold % (Today vs. All-Time) tells you how respected first-hour gaps have been — a low
reading suggests today's imbalances are being run through rather than defended.
- Inverted vs. Valid IFVG counts show how often a failed gap actually resolves into a
confirmed continuation level (✔) rather than just failing outright.
- Session tells you which killzone you're in without leaving the chart.
Choosing your settings
- Use Reject & Close Away when you only want gaps that show a confirmed rejection —
Touch & Hold is looser and counts the first touch, useful for comparing how often price
even reaches the gap versus how often it truly holds.
- Switch Mode to First Of Each Direction if you want to track a bullish and a bearish 1st
gap side-by-side within the same hour, instead of only the first of either.
- Turn on the Displacement Filter if you want the tag to skip small, low-conviction gaps in
favour of the next one that clears your ATR multiple.
- Leave NY Open: Require Liquidity Sweep on if you specifically want the opening-range gap
isolated from the generic hourly noise; adjust Pivot Lookback to make the swing-pivot
reference tighter (fewer bars, more sensitive) or wider (more bars, more established swings).
SETTINGS
- Detection — 1st FVG Mode (First Of Either / First Of Each Direction), Hourly Window
Timezone, Displacement Filter (ATR × multiple), Restrict To Time Window, NY Open (9:30-
10:00): Require Liquidity Sweep, Pivot Lookback.
- Inversion (IFVG) — Track Inversions toggle, Hold Definition (Touch & Hold / Reject &
Close Away).
- Labels — Show Labels, Label Text prefix, Show Macro Window Time, Label Size, Label
Colour.
- Colours — Colours In Cycle (2 or 3), the cycle colours, Inversion Colour, Zone
Transparency.
- Display — Gap Lifetime (Until Invalidated / End Of Hour / End Of Day), Keep Failed Gaps
(Dimmed), Max Gaps On Chart.
- Stats Table — Show Stats Table, Position, Text Size.
This is a decision-support and context tool for discretionary ICT trading. It does not
generate buy or sell signals and does not place trades. This is not financial advice, and no
market's past behaviour is indicative of future results.
Indicador

Luxy UT God Mode - UT-Bot Forecast, Signals, Zones and RiskLuxy UT God Mode turns the classic UT Bot ATR trailing-stop into a complete, self-contained trading cockpit: momentum-adaptive buy/sell signals, a forward-looking Trend Duration Forecast, auto support/resistance zones, a 0-100 Confidence Score, a built-in multi-currency Risk Calculator, and automatic Stop Loss / Take Profit levels - all on one overlay, all non-repainting.
Note: Every forecast, probability, and statistic in this tool is a calculation based on the chart's own historical behavior. They describe past patterns, not guaranteed future results.
WHAT MAKES THIS DIFFERENT
A normal UT Bot only tells you the trend flipped. Luxy UT God Mode answers the three questions a trader actually asks at the moment of a signal:
1. Should I trust this flip? - a Confidence Score (0-100) blends seven engines into one number.
2. How long might this trend run? - a Trend Duration Forecast projects the expected remaining life of the current trend, drawn as a fading strip with survival-probability milestones.
3. What do I risk and how big do I trade? - automatic Stop Loss, R-based Take Profits, and a position-size calculator in your own account currency.
Everything is layered so you can run it bare-bones (just clean signals) or switch on the full "God Mode" stack.
METHODOLOGY AND CREDITS
This indicator implements proven concepts using entirely original code.
- UT Bot ATR trailing logic - original concept by @QuantNomad . This implementation is a significant rework: it adds volume weighting, momentum-adaptive sensitivity, a composite multi-method stop loss, a full multi-filter confirmation stack, multi-timeframe confluence, and the statistical trend-duration engine described below.
Important: this is an educational analysis tool. It does not guarantee any trading result. Always do your own analysis and manage risk.
THE SEVEN ENGINES (and the Confidence Score that fuses them)
Each bar, the script scores how well the current setup aligns and sums it into a single 0-100 Confidence Score with a visual progress bar:
UT Bot direction - is price above/below the momentum-adaptive trailing stop
SuperTrend - direction plus a distance-from-line strength bonus
Market Structure - position inside the recent swing range and structure breaks
ADX Regime - is the market trending (signals allowed) or choppy (blocked)
Multi-Timeframe - does a higher timeframe agree with the signal direction
Volume - is conviction backed by above-average volume
RSI Divergence - is a recent divergence supporting or opposing the signal
Read it at a glance: 80+ = strong, 60+ = good, 40+ = weak, under 40 = very weak. Hover the Confidence cell for the full per-engine breakdown.
1. TREND DURATION FORECAST - the headline feature
When the trend flips, the script projects how many more bars the new trend may last, based on the chart's own past trends.
How it works:
Every completed trend's duration is recorded, kept separately for bullish and bearish trends.
On each new flip the script estimates the expected duration using an exponentially-weighted average and standard deviation (recent trends weighted more heavily).
The estimate is drawn as a fading gradient strip that projects forward from the flip, with a "Trend Analysis" label and survival-probability milestones at 25% / 50% / 75% / 90% / 100% of the projection.
The percentages are empirical - they show the share of past same-direction trends on THIS chart that actually lasted at least that long. Not a fixed textbook curve.
Three forecast modes:
Simple - median duration only. Clean and fast.
Standard - exponentially-weighted average plus spread (recommended default).
Advanced - Standard plus five adaptive multipliers: Structure (proximity to S/R), Asset Type (volatility profile), Flip Strength (volume + filters passed), Error Learning (self-correction from its own past misses), and Regime (trending vs choppy).
When history is thin, the forecast honestly falls back to a combined estimate and flags it, rather than showing false precision.
2. MOMENTUM-ADAPTIVE UT BOT CORE
The trailing stop is not a fixed ATR multiple. The effective sensitivity adapts each bar to:
Momentum - faster momentum widens the trail to stay in strong moves
Relative volume - conviction adjusts the distance
Asset type - auto-detected (crypto, forex, futures, index, fund, CFD, bond, stock) with a per-class multiplier, or set it manually
Volatility mode - Fixed, Dynamic, or Aggressive auto-adjustment to the current volatility regime
The result is a trailing engine that behaves differently on a calm blue-chip than on a volatile small-cap or crypto pair - without you re-tuning it.
3. ANTI-WHIPSAW AND SIGNAL FILTER STACK
Signals only fire when they survive the filters you enable, so you control the trade-off between frequency and quality:
ADX Regime - block signals in choppy, non-trending conditions
Cooldown and Confirmation - minimum bars between signals and N-bar direction confirmation
Swing - only trade aligned with recent swing structure
Full Candle - require the whole candle beyond the trailing line (no straddles)
Volume, RSI, Hull MA, SuperTrend - optional confirmation layers
High-Volatility and % Change - only trade meaningful moves
2-Bar Confirm - extra confirmation for volatile markets
Every active filter appears as a row in the table with a live pass/fail state, so you always know why a flip did or did not become a signal.
4. SUPPORT / RESISTANCE ZONES
The script clusters significant swing pivots into persistent price zones and draws only the two that matter right now: the nearest resistance above price and the nearest support below price. Each zone shows its price and touch count (e.g. "S 4.19 (3x)" = a support tested three times). A level that price has broken through drops off automatically, and an optional Zone Filter can block buys into resistance and sells into support. Pivot strength is adjustable so you can show only major levels.
5. AUTOMATIC STOP LOSS, TAKE PROFIT AND RISK CALCULATOR
On every signal the script draws a complete trade plan:
Stop Loss - choose from seven methods: ATR, % based, tick based, swing, scaled ATR, Smart Adaptive (auto-scales to volatility), or Safer (widest of several).
Take Profit - TP1 / TP1.5 / TP2 / TP3 as R multiples of the stop distance, with optional price and % labels, and a freeze-on-touch check mark for journaling.
Entry line - marks the signal price; all lines can auto-limit to 10 bars for a clean chart.
Risk Calculator - enter account size and risk (% or fixed amount) and it returns the position size in shares/contracts, in your own currency, with live FX conversion (USD, EUR, GBP, JPY, CAD, AUD, CHF) or a manual rate.
6. MULTI-TIMEFRAME CONFLUENCE AND RSI DIVERGENCE
The table shows the trend of up to seven higher timeframes (5m, 15m, 30m, 1H, 4H, D, W) via an EMA 9/21 cross, so you can see whether the bigger picture agrees before you act. An optional MTF filter blocks counter-trend signals. Separately, RSI divergence (regular bullish and bearish) is detected, labeled on the chart, and fed into the Confidence Score.
7. LIVE STATUS TABLE
A configurable dashboard (position and size adjustable) summarizes everything: asset type, Confidence Score, adaptive mode, current signal, win-rate / average-bars statistics, multi-timeframe row, divergence, forecast, position size, and one row per active filter - each with a detailed tooltip.
HOW TO USE IT - QUICK START
Step 1 - Add it and pick your sensitivity. Defaults suit intraday (5-15m). For scalping lower the Sensitivity/ATR; for swing raise them (see the Sensitivity tooltip for presets).
Step 2 - Read a signal. A Buy (aqua, below bar) or Sell (orange, above bar) appears only after the bar closes and all enabled filters pass. Check the Confidence Score and the Multi-TF row for context.
Step 3 - Use the trade plan. The Entry, Stop Loss and Take Profit lines draw automatically. Read the Position row for size. Use the Trend Duration Forecast strip as a realistic hold-time expectation - scale out near the median, reassess if price runs past the projection.
Step 4 - Set alerts. Use "Any alert() function call" to receive BUY/SELL and trend-flip alerts on bar close, or pick the specific "Momentum Buy/Sell Signal" conditions. All alerts fire on confirmed bars only.
TUNING FOR MORE OR FEWER SIGNALS
Too few signals: turn off MTF, then Full Candle, then lower the ADX threshold or the Anti-Whipsaw filter. Too many / choppy: raise the ADX threshold, enable Volume and Full Candle, increase Cooldown, or add 2-Bar Confirm. Every filter is independent and shown live in the table.
TECHNICAL NOTES
Pine Script v6, overlay, max bars back 5000.
No repaint: signals, lines, forecast and alerts are committed on bar close (barstate.isconfirmed); all higher-timeframe data uses lookahead_off.
Works on stocks, crypto, forex, futures and indices, on any timeframe.
Higher timeframes and longer history produce more reliable forecasts; a new symbol needs a number of completed trends before the duration model is meaningful.
LIMITATIONS
Trend-following by nature: signals arrive after a trend establishes, not at exact tops/bottoms.
Best in trending conditions; use the ADX regime and filters to avoid chop.
The duration forecast needs history to become meaningful and is a statistical estimate, never a guarantee.
DISCLAIMER
This script is an educational analysis tool, not financial advice. Trading stocks, crypto, forex and futures involves substantial risk of loss - you can lose all invested capital. Forecasts, probabilities and win-rate statistics are calculated from historical chart data and do not guarantee future performance. Test on paper first, and you are solely responsible for your own trading decisions.
Feedback and suggestions are welcome in the comments. Happy trading.
Indicador

Execution Signals Breakout Strategy MTFA mechanical price action breakout strategy for intraday futures (built on NQ/MNQ/ES/MES). Signals form on a higher timeframe; execution happens on the chart timeframe. Designed to run on a 1-minute chart with a 13-minute signal timeframe (both configurable — chart TF must be below signal TF).
SIGNALS (detected on signal-TF bar close)
- Failure to Go High — price exceeds the prior bar's high but closes back at or below it, leaving an upper wick (a trapped breakout)
- Failure to Go Low — the mirror on the downside
- Inside Bar — the full range held within the prior bar (compression)
Each pattern can be toggled independently. Failures can be filtered by minimum range.
ENTRY
The signal bar's high and low form a bracket. Within the next signal-TF window only, the first chart-TF close beyond either side enters in that direction — long above, short below. The market picks the side: a failure high that then breaks higher is traded long on the logic that clearing a level that just rejected shows strength.
One shot per setup: if the window expires without a confirming close, the setup is void. Once one side triggers, the other side is dead — no flipping. A newer signal replaces an older pending one.
RISK & SIZING
Stop rests at the signal bar's opposite wick (touch fill). Target is an R-multiple of the entry-to-stop distance (default 2R, adjustable). Sizing: 1 contract on failures, 2 on inside bars. One position at a time.
OPTIONAL TRADE MANAGEMENT (mutually exclusive, off by default)
- Break Even Mode — after price moves a set number of points in favor, exit if a chart-TF close returns to entry
- Close At Target Mode — bank the trade on the first chart-TF close beyond the point threshold
SESSION
Entries allowed from 6:00 PM ET; no signals or entries 4:00–6:00 PM ET; all positions force-closed 4:09 PM ET. Never holds overnight.
ON-CHART TOOLS
- Position boxes — every trade is marked with its risk (red) and reward (green) zones, frozen on chart after the trade closes
- Day-Set Levels — each evening at 6 PM the script deploys that day's context like pivots: previous RTH session high/low (yellow) plus Hourly Flip Engine levels (blue) — prices where RTH 1-hour candles flipped color, invalidated when a later RTH 1-hour body closes through them, filtered to within 2× daily ATR of the RTH close. Each set spans one full session and stays on chart as history. Levels are visual context only — they do not gate trades.
- Session VWAP (purple)
ALERTS
Two conditions: Entry (position opened) and Exit (position closed).
BACKTESTING NOTES
Fills use process_orders_on_close — entries fill at the confirming chart-TF close. Test on a 1-minute chart for execution precision. Results depend on the session template; use extended hours data so evening and pre-market signals are included. Estrategia

Macro Panel - Risk-On 0-8 [Galin]Macro Panel - Risk-On 0-8
What it does
Turns "how's the market feeling?" into a number, computed the same way every single day: eight binary rules, one point each. 8/8 = everything supports risk. 0/8 = nothing does. The panel shows the full checklist with a pass/fail mark per rule and a color-coded header; the score is also plotted as a stepline - a historical regime curve, so you can scroll back and see every transition of the past years. The indicator is symbol-independent: add it to any chart (a daily SPY chart is the natural home) and it reads the market, not the chart.
Why it matters
Setups don't fail because they were bad setups - they fail because they were taken in the wrong market. Position sizing needs a systematic input, and "feel" drifts exactly when it matters most: after a winning streak and during a scary tape. A fixed eight-rule score can't drift. It also can't be argued with at 9:31 AM.
The eight rules - one point each
1. SPY above its 20-day SMA - tactical trend
2. SPY above its 50-day SMA - intermediate trend
3. QQQ above its 20-day SMA - growth participating
4. IWM above its 50-day SMA - small-cap risk appetite
5. RSP beating SPY over 1 month - breadth beneath the megacaps
6. VIX below a threshold (default 20, adjustable) - volatility calm
7. HYG above its 50-day SMA - credit not stressed
8. SPY 1-month return positive - momentum
Four trend rules, one breadth, one volatility, one credit, one momentum - each catches a different way markets break. Oil, gold, the dollar and rates are deliberately NOT in the score: they are context, not gates. A real macro shock shows up through VIX and SPY anyway - counting it twice double-weights fear.
Reading it
The total is the throttle; the composition is the story. A 6/8 missing its trend points (SPY, QQQ) is a different market from a 6/8 missing its insurance points (VIX, HYG): the first says the tape is broken, the second says the tape is fine and the nerves haven't signed off yet. The panel shows you which mark is missing - that's why it displays all eight rows instead of just the sum.
Suggested bands: 7-8 full risk | 5-6 selective | 3-4 half size | 0-2 no new longs. One rule overrides the total: rule 1 off (SPY below its 20-day) = no new entries, whatever the sum says.
Alerts
Three built in: Kill switch - SPY lost its 20-day | Score dropped to 4 or below | Score entered the 7-8 band. The regime calls you; you don't have to check it.
Settings
VIX calm threshold (default 20) | checklist panel on/off | panel position.
Notes
Chart indicator, designed for daily charts. The score plots with dotted band lines at the 7-8 / 5-6 / 3-4 boundaries. Not intended for the Pine Screener - it needs six data requests and the screener allows five. Indicador

Indicador

Indicador

Indicador

Indicador

Indicador

Major Historical S&R ZonesMajor Historical Support & Resistance Zones
Major Historical Support & Resistance Zones is designed to objectively identify and rank the most significant historical support and resistance areas on any market or timeframe. Rather than relying on manually drawn horizontal lines, the indicator automatically analyses historical price action, groups significant reactions into zones, and scores each zone based on its historical importance.
The indicator looks for meaningful pivot highs and lows, measures the strength of the subsequent price reaction using ATR (Average True Range), evaluates rejection quality through wick analysis, and clusters nearby reactions into a single support or resistance zone. When multiple significant reactions occur around the same price level, the zone becomes stronger and receives a higher score.
Unlike traditional support and resistance indicators that simply draw every swing high and low, this indicator attempts to filter out market noise and highlight only the price areas that have repeatedly influenced market direction.
Features
* Automatically detects major historical support and resistance zones.
* Clusters multiple historical reactions into a single zone.
* Scores each zone based on reaction quality and historical significance.
* Counts the number of independent reactions ("Hits") at each level.
* Identifies Support/Resistance Flip zones where price has historically acted as both support and resistance.
* Adjustable ATR sensitivity and clustering distance.
* Built-in colour and scoring guide that can be enabled or disabled from the settings.
Colour Guide
🟩 Green Zone
* Price is currently above the zone.
* The zone is acting as historical support.
🟥 Red Zone
* Price is currently below the zone.
* The zone is acting as historical resistance.
🟨 Orange Zone
* Price is currently trading inside the historical zone.
* This represents a decision area where the market is testing historical support or resistance.
Understanding the Score
Each zone receives a strength score based on:
* Size of the historical reaction.
* Quality of price rejection (wick analysis).
* Number of independent reactions.
* Support/Resistance Flip bonus.
General interpretation:
* 0–3 = Weak
* 3–5 = Minor
* 5–7 = Good
* 7–10 = Strong
* 10–15 = Very Strong
* 15+ = Exceptional
Higher scores indicate areas where price has historically shown stronger reactions.
Understanding Hits
Hits represent the number of separate significant reactions that occurred within the zone.
General guide:
* 1 = Single historical reaction
* 2 = Confirmed level
* 3 = Strong level
* 4–5 = Very strong level
* 6+ = Major historical level
More hits generally indicate greater historical recognition of that price area.
S/R Flip
When a zone displays S/R Flip, it means that the same price area has historically acted as both:
* Support
* Resistance
These zones often represent some of the strongest historical price levels because market participants have repeatedly recognised them from both directions.
Suggested Workflow
For the best results:
1. Open the Weekly chart to identify the strongest long-term support and resistance zones.
2. Switch to the Daily chart to refine those major levels.
3. Use the 4H, 8H, or 12H chart for additional precision.
4. Execute trades using your preferred lower timeframe confirmation.
This top-down approach helps maintain focus on the most significant historical levels before refining entries.
Inputs
The indicator provides several adjustable settings:
* Pivot Strength – Controls how significant a swing must be before it is considered.
* ATR Length – Used to normalise reaction size across different markets.
* Minimum Reaction ATR – Filters out weak reactions.
* Cluster Distance ATR – Controls how close reactions must be before they are grouped together.
* Zone Width ATR – Determines the thickness of each support/resistance zone.
* Minimum Hits – Minimum number of reactions required before displaying a zone.
* Minimum Score – Minimum strength score required before displaying a zone.
* Display Options – Toggle labels and the built-in legend on or off.
Best Practices
This indicator is designed to identify historically important price zones, not generate buy or sell signals.
The strongest trading opportunities often occur when:
* High-scoring zones align with your own market structure analysis.
* Higher timeframe zones overlap with lower timeframe confirmations.
* Price shows clear rejection or acceptance at the identified historical levels.
As with all technical analysis tools, this indicator should be used alongside sound risk management and your broader trading methodology rather than in isolation.
Indicador

Edo Liquidity SweepsEdo Liquidity Sweeps — Detects Liquidity Sweeps of Swing Highs and Lows and Tracks Each One Through Detected, Confirmed and Faded States
Markets move toward liquidity. Above every relevant swing high rests buy-side liquidity — the stops of short positions and the breakout buy orders waiting there. Below every relevant swing low rests sell-side liquidity — the stops of longs and the breakout sells. Those order clusters act as magnets: very often price travels precisely to reach them. A liquidity sweep is the moment that happens and is rejected — price wicks beyond the level to take the resting liquidity, then closes back on the other side, the classic trap that leaves breakout traders offside and frequently turns price around.
Edo Liquidity Sweeps isolates that single event and, crucially, tracks what happens next. It marks each sweep on the chart and follows it through three clear states — Detected, Confirmed and Faded — so you can separate the sweeps that actually reversed price from the ones that failed, all validated on closed bars so the indicator does not repaint. It is the sweep specialist of the Edolab structure family, designed to pair with Edo Liquidity Zones, which maps the liquidity pools these sweeps take.
LIQUIDITY LEVELS: SWING HIGHS AND LOWS
Everything starts from the swings that define where liquidity sits. A swing high is confirmed when a candle has the highest high of its surroundings; a swing low, the lowest low. The size of that surroundings is set by the Swing Profile: Scalper (5 bars each side) tracks short-term liquidity for intraday work, Swing (10 bars, the default) is the balanced setting for 4H and daily, and Long Term (21 bars) watches only the liquidity of the major structures. Each confirmed swing high becomes a buy-side liquidity level to monitor, and each swing low a sell-side one, until price sweeps it.
SWEEP DETECTION
A sweep is detected, on closed bars only, when price pierces a level with a wick but closes on the opposite side. A bearish sweep: the candle's high takes a swing high (grabbing the buy-side liquidity) but the close stays below that level — price pierced the high and rejected it, an downward reversal is expected. A bullish sweep: the candle's low loses a swing low (grabbing the sell-side liquidity) but the close stays above it — price pierced the low and rejected it, an upward reversal is expected. At detection the indicator draws a dotted line at the swept level with a Sweep ▲ or Sweep ▼ label, and records the high and low of the sweep candle itself, which will later decide whether the sweep confirms or fails. A wick that pierces a level but closes back on the same side generates nothing.
THREE STATES: DETECTED, CONFIRMED, FADED
A sweep is not a one-candle signal. The indicator follows each one through three states, evaluated on every closed bar against the range of the sweep candle. Detected: the sweep has just happened and it is not yet known whether price will turn — a dotted line. Confirmed: price confirms the reversal by closing beyond the sweep candle's extreme in the expected direction — the line turns solid and bold and the label gains a ✓. Faded: price closes the opposite way, reclaiming the level, so the sweep failed — the line turns dashed and faded grey and the label gains a ✕. For a bullish sweep, confirmation is a close above the sweep candle's high and a fade is a close below its low; for a bearish sweep it is the mirror. This follow-through confirmation is what separates the operative sweeps from the anecdotal ones: a Confirmed sweep has proven the rejection had continuation, while a Faded one warns that the trap did not work and the level has genuinely been broken.
INFORMATION PANEL
The panel condenses the read into a compact table. It shows the Last Sweep with its direction (Bull ▲ / Bear ▼) and state, and the live count of sweeps in each state: Detected, Confirmed and Faded. The Confirmed-to-Faded ratio gives a quick sense of how reliable sweeps are behaving on that instrument and timeframe. The panel sits in any of the four chart corners (Top Right by default), comes in three sizes (Tiny / Small / Normal) and two themes (Dark / Light), and can be hidden entirely.
NO REPAINTING
Sweeps are validated on closed bars only and on confirmed pivots, so a level and its sweep never appear or disappear intrabar. A wick that pierces a level but closes back inside generates nothing — the indicator waits for the close. This removes the false signals that clutter tools which mark instantly, at the cost of confirming each sweep once it has completed. There are no higher-timeframe functions: all logic runs on the current chart timeframe.
CONFIGURATION
The inputs are grouped by block. Detection sets the swing profile and the maximum number of sweeps kept on the chart (12 by default). Style exposes the bullish and bearish sweep colours, the faded colour, the label size and the Dark/Light theme. Panel controls panel visibility, position and size. The defaults are calibrated to work without adjustment on stocks, crypto, forex, indices and futures, on any timeframe — the input most users touch is the Swing Profile, to match the sensitivity of the tracked liquidity to their horizon.
ALERTS
Five predefined alerts cover the life of a sweep: Bullish Sweep Detected and Bearish Sweep Detected fire the moment a sweep is detected; Bullish Sweep Confirmed and Bearish Sweep Confirmed fire when a sweep confirms its reversal through follow-through; and Sweep Faded fires when a sweep fails and the level is reclaimed. The Detected alerts are the earliest but least confirmed, the Confirmed alerts are more reliable at the cost of arriving later, and the Faded alert is useful to discard a reversal idea. All alerts fire on bar close, consistent with the indicator's anti-repaint validation.
HOW TO READ IT
Wait for confirmation: a Detected sweep only flags that liquidity was taken and rejected, not that price will turn — waiting for it to become Confirmed reduces false signals at the cost of entering later, and the panel's Confirmed-to-Faded ratio shows how trustworthy sweeps are being. Read the fade as a warning: when a sweep turns Faded, the trap did not work and the level was genuinely broken — recognising a failed sweep in time avoids forcing a reversal idea the market has already rejected. Trade sweeps in confluence: a confirmed sweep that takes liquidity at an important level, a demand zone or a higher-timeframe support is a far more solid reference than an isolated one. And pairing Edo Liquidity Sweeps with Edo Liquidity Zones closes the loop — the zones say where liquidity sits, the sweeps say when it is taken.
OPEN SOURCE
Edo Liquidity Sweeps is published as a free open source indicator. The full Pine Script is publicly accessible on TradingView for study, adaptation and integration into any workflow. Part of the Edolab Markets free tools ecosystem alongside Edo Liquidity Zones, Edo Smart Money Map, Edo Order Blocks, Edo ZigZag Auto Fib SR and more available on TradingView.
This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. Trading financial markets involves significant risk of capital loss. Past performance does not guarantee future results. Always use proper risk management.
TAGS
LiquiditySweep SmartMoneyConcepts Liquidity MarketStructure PriceAction StopHunt SwingHighLow SupplyDemand Reversal Overlay Indicator OpenSource Edolab EdolabMarkets Stocks Crypto Forex Indices
CATEGORIES (TradingView dropdowns)
— Direction: Both
— Market category: All markets (Stocks / Crypto / Forex / Indices)
— Analysis type: Trend Analysis / Chart patterns / Support and Resistance
Indicador

Indicador

Indicador

Indicador

Profitable Key Levels Trading System (v6 - Full Custom) v.2▲ ALTO (Prezzo)
│
│ <-- Livello Rosa (Debole)
│ ▲ o <-- CERCHIO GIALLO (Rimbalzo con Volumi Alti)
│ ╱ ╲ ╱
│ ╱ ╲ ╱
│ ╱ ▼ ╱
│ ╱ ────────────▼───────────────────── <-- Livello Celeste (Forte!)
│╱ ▲
│ │ <-- FRECCIA VERDE "BUY" (Segnale d'Ingresso)
│
│ ~~~~~~~~~~~~~~~~~ EMA 200 (Filtro Trend Arancione) ~~~~~~~~~~~~~~~~~
│
│ (Sotto la EMA cercheremo solo frecce rosse "SELL", sopra solo frecce verdi "BUY")
│
▼ BASSO (Tempo)
Questo strumento trasforma il tuo grafico da una "foresta di candele confuse" a una mappa operativa chiara, dicendoti dove, quando e in che direzione aprire un'operazione.
1. Trova le "Zone Calde" del Prezzo (I Livelli)
Invece di tracciare linee a caso, l'algoritmo analizza fino a 1000 giorni di storico, raggruppa i punti di inversione più importanti e assegna loro uno Score (punteggio).
Livelli Rosa: Zone di rimbalzo recenti o minori.
Livelli Celesti: Fortezze storiche dove il prezzo ha reagito molte volte.
2. Svela le Tracce delle "Mani Forti" (I Cerchi Gialli)
Un livello grafico è utile, ma diventa potentissimo se sai che è stato difeso con grandi volumi. L'indicatore mette un cerchio colorato (es. giallo) esattamente sulla candela in cui i grandi istituzionali sono entrati al mercato, filtrando via il "rumore" dei piccoli trader.
3. Ti tiene dalla parte giusta del mercato (La Media Mobile)
La media mobile personalizzabile (EMA o SMA) funge da guardiano del trend.
Se il mercato sale (prezzo sopra la linea arancione), l'indicatore ti mostra solo segnali di acquisto.
Se il mercato scende (prezzo sotto la linea arancione), ti mostra solo segnali di vendita.
In questo modo eviti di metterti contro i trend più forti.
4. Ti dà il "Trigger" d'Ingresso (Le Frecce)
Non devi più indovinare il momento esatto. Quando il prezzo tocca un livello chiave, fa un rimbalzo volumetrico (cerchio) e si allinea al trend di fondo, l'indicatore stampa una Freccia Verde (BUY) o una Freccia Rossa (SELL) e ti invia un Alert sul telefono.
🎯 Come usarlo operativamente:
Attendi il segnale: Aspetta che compaia una freccia (es. Verde / BUY).
Imposta la protezione (Stop Loss): Posiziona il tuo stop appena sotto il minimo della candela con la freccia.
Punta al target (Take Profit): Chiudi l'operazione quando il prezzo raggiunge il livello chiave successivo (la linea colorata più vicina).
traduci in inglese: ▲ ALTO (Prezzo)
│
│ <-- Livello Rosa (Debole)
│ ▲ o <-- CERCHIO GIALLO (Rimbalzo con Volumi Alti)
│ ╱ ╲ ╱
│ ╱ ╲ ╱
│ ╱ ▼ ╱
│ ╱ ────────────▼───────────────────── <-- Livello Celeste (Forte!)
│╱ ▲
│ │ <-- FRECCIA VERDE "BUY" (Segnale d'Ingresso)
│
│ ~~~~~~~~~~~~~~~~~ EMA 200 (Filtro Trend Arancione) ~~~~~~~~~~~~~~~~~
│
│ (Sotto la EMA cercheremo solo frecce rosse "SELL", sopra solo frecce verdi "BUY")
│
▼ BASSO (Tempo)
Questo strumento trasforma il tuo grafico da una "foresta di candele confuse" a una mappa operativa chiara, dicendoti dove, quando e in che direzione aprire un'operazione.
1. Trova le "Zone Calde" del Prezzo (I Livelli)
Invece di tracciare linee a caso, l'algoritmo analizza fino a 1000 giorni di storico, raggruppa i punti di inversione più importanti e assegna loro uno Score (punteggio).
Livelli Rosa: Zone di rimbalzo recenti o minori.
Livelli Celesti: Fortezze storiche dove il prezzo ha reagito molte volte.
2. Svela le Tracce delle "Mani Forti" (I Cerchi Gialli)
Un livello grafico è utile, ma diventa potentissimo se sai che è stato difeso con grandi volumi. L'indicatore mette un cerchio colorato (es. giallo) esattamente sulla candela in cui i grandi istituzionali sono entrati al mercato, filtrando via il "rumore" dei piccoli trader.
3. Ti tiene dalla parte giusta del mercato (La Media Mobile)
La media mobile personalizzabile (EMA o SMA) funge da guardiano del trend.
Se il mercato sale (prezzo sopra la linea arancione), l'indicatore ti mostra solo segnali di acquisto.
Se il mercato scende (prezzo sotto la linea arancione), ti mostra solo segnali di vendita.
In questo modo eviti di metterti contro i trend più forti.
4. Ti dà il "Trigger" d'Ingresso (Le Frecce)
Non devi più indovinare il momento esatto. Quando il prezzo tocca un livello chiave, fa un rimbalzo volumetrico (cerchio) e si allinea al trend di fondo, l'indicatore stampa una Freccia Verde (BUY) o una Freccia Rossa (SELL) e ti invia un Alert sul telefono.
🎯 Come usarlo operativamente:
Attendi il segnale: Aspetta che compaia una freccia (es. Verde / BUY).
Imposta la protezione (Stop Loss): Posiziona il tuo stop appena sotto il minimo della candela con la freccia.
Punta al target (Take Profit): Chiudi l'operazione quando il prezzo raggiunge il livello chiave successivo (la linea colorata più vicina). Indicador

Indicador

Forza Relativa - Professional Table v2█ OVERVIEW
Questo indicatore calcola e mostra la Forza Relativa (Relative Strength) di un asset rispetto a un benchmark di riferimento e al suo settore di appartenenza (se applicabile). Tutti i calcoli sono basati su giorni solari reali ("Calendar Days"), garantendo un confronto preciso e uniforme delle performance su diversi archi temporali: 1g, 7g, 30g, 60g, 90g e 180g.
A differenza delle tabelle standard, questa versione è stata interamente ottimizzata per il Tema Scuro (Dark Theme) di TradingView, garantendo una leggibilità nitida e professionale in ogni condizione di mercato.
█ CARATTERISTICHE PRINCIPALI
• Adattabilità Asset & Crypto: Lo script rileva automaticamente la classe di asset sul grafico. Se l'asset è una Criptovaluta, imposta come benchmark predefinito Bitcoin (BTC) o Ethereum (ETH) a scelta dell'utente. Se l'asset è un'Azione o ETF, utilizza lo S&P500 (SPY) come benchmark e attiva la colonna dedicata al "Settore".
• Selezione del Settore: Per il mercato azionario, è possibile selezionare manualmente l'ETF settoriale di riferimento (es. XLK per il Tech, XLF per i Finanziari, ecc.) per monitorare se l'asset sta sovraperformando o sottoperformando il proprio settore di appartenenza.
• Calcolo a Giorni Solari (Calendar Days): Le variazioni percentuali non si basano sul semplice conteggio delle candele del grafico corrente (che variano a seconda del timeframe), ma calcolano l'effettiva variazione temporale indietro nel tempo, rendendo l'indicatore ideale sia su grafici Daily che Intraday.
█ OTTIMIZZAZIONE GRAFICA & NITIDEZZA (DARK THEME)
Per risolvere il classico problema di scarsa leggibilità delle tabelle TradingView su sfondi scuri, sono state introdotte le seguenti migliorie:
1. Contrasto Dinamico: Il testo delle celle utilizza una palette di colori e trasparenze che si adatta allo sfondo per risaltare chiaramente senza affaticare la vista.
2. Palette Colori Soft: Sostituiti i verdi e rossi standard (troppo accesi e fastidiosi su sfondo scuro) con un elegante Verde Smeraldo Soft per i rendimenti positivi e un Rosso Corallo Soft per quelli negativi.
3. Griglia Protetta: La tabella presenta bordi grigio-scuri solidi per separare nettamente i dati e le colonne, rendendo l'interfaccia pulita e moderna.
█ PARAMETRI PERSONALIZZABILI (INPUTS)
• Crypto Benchmark: Consente di scegliere tra BTCUSDT ed ETHUSDT quando si analizzano le criptovalute.
• Dimensione Testo Tabella: Modifica la dimensione della tabella per adattarla a schermi di diverse risoluzioni (Tiny, Small, Normal, Large, Huge).
• Posizione Tabella: Permette di posizionare la griglia in qualsiasi angolo del grafico (es. in basso a destra, in alto a sinistra, ecc.) per non coprire i prezzi.
• Settore Manuale: Consente di selezionare l'ETF settoriale SPDR di riferimento per l'asset azionario sotto analisi.
█ NOTE SUL TIMEFRAME
Dato che l'indicatore analizza performance storiche fino a 180 giorni solari fa, si consiglia di utilizzare timeframe come il Giornaliero (1D) o l'Orario (1H/4H). Su timeframe estremamente ridotti (es. 1 o 5 minuti), TradingView potrebbe non avere abbastanza candele storiche caricate per calcolare i periodi più lunghi, mostrando la dicitura "n/a" (non disponibile).
Relative Strength vs Benchmark & Sector (Dark Theme)
█ OVERVIEW
This indicator measures and displays the Relative Strength (RS) of an asset by comparing its performance against a selected benchmark and, when applicable, its sector benchmark.
All calculations are based on actual Calendar Days rather than a simple bar count, ensuring consistent and accurate performance comparisons across the following periods:
1D, 7D, 30D, 60D, 90D, and 180D
The table has been specifically designed and optimized for the TradingView Dark Theme, providing maximum readability, strong contrast, and a professional appearance under all market conditions.
█ KEY FEATURES
• Automatic Asset Detection
The script automatically identifies the type of asset displayed on the chart:
Cryptocurrencies: uses either Bitcoin (BTC) or Ethereum (ETH) as the benchmark, selectable by the user.
Stocks and ETFs: uses SPY (S&P 500 ETF) as the benchmark and automatically enables the Sector comparison column.
• Sector Comparison
For equities, users can manually select the appropriate SPDR sector ETF (XLK, XLF, XLE, XLV, etc.) to determine whether the stock is:
Outperforming its sector
Underperforming its sector
Moving in line with its sector
• Calendar-Day Performance Calculation
Performance measurements are independent of the chart timeframe.
Instead of relying on the number of bars displayed, percentage changes are calculated using actual calendar days, ensuring consistent results across both Daily and Intraday charts.
█ DARK THEME VISUAL OPTIMIZATION
To improve readability on dark backgrounds, several visual enhancements have been implemented:
1. Dynamic Contrast
Text colors and transparency levels have been carefully tuned to provide excellent visibility while minimizing eye strain.
2. Soft Color Palette
Standard colors have been replaced with more balanced tones:
Soft Emerald Green for positive values
Soft Coral Red for negative values
This creates a cleaner appearance and improves readability during extended analysis sessions.
3. High-Definition Grid
The table uses solid dark-gray borders to clearly separate cells, columns, and headers, resulting in a modern and professional layout.
█ CUSTOMIZABLE INPUTS
• Crypto Benchmark
Select the benchmark used for cryptocurrency analysis:
BTCUSDT
ETHUSDT
• Table Text Size
Adjust the table size to fit different screen resolutions:
Tiny
Small
Normal
Large
Huge
• Table Position
Place the table anywhere on the chart:
Top Left
Top Right
Bottom Left
Bottom Right
• Manual Sector Selection
Choose the SPDR sector ETF used as the sector benchmark for relative performance analysis.
█ DATA INTERPRETATION
Positive values indicate that the asset is outperforming its benchmark or sector.
Negative values indicate underperformance, signaling weaker relative strength compared to the benchmark or sector being analyzed.
█ TIMEFRAME NOTES
Since the indicator analyzes historical performance up to 180 calendar days, the following timeframes are recommended:
1D
4H
1H
On very low timeframes (such as 1-minute or 5-minute charts), TradingView may not have enough historical bars loaded to calculate the longest lookback periods. In these cases, some cells may display "n/a" (data not available).
Ideal for quickly identifying assets that are demonstrating superior relative strength versus both the broader market and their respective sector, regardless of the chart timeframe being used.
Indicador

Indicador

ATK/DEF KDJ Rewind ContextRewind KDJ Context is a visual KDJ analysis indicator designed to provide a clearer understanding of momentum structure through the relationship between the K, D, and J lines.
Traditional KDJ analysis often focuses on fixed overbough and oversol levels. This indicator expands the interpretation by analyzing the interaction between KDJ components, including line arrangement, directional changes, momentum development, and structural transitions.
The script transforms KDJ movement into different context states, helping users observe how momentum conditions develop, slow down, weaken, and recover over time.
Instead of treating K, D, and J as isolated values, Rewind KDJ Context focuses on the relationship between the three components and presents their current condition through a structured visual approach.
KDJ Context Framework
▶️ Momentum Push
Identifies conditions where K, D, and J show coordinated upward momentum development.
This context represents a phase where KDJ structure is aligned with increasing momentum activity and stronger directional movement.
⏸️ Momentum Pause
Highlights situations where momentum remains active but begins to slow or entr a temporary balance condition.
This state focuses on changes in momentum speed and the relationship between K, D, and J during a slowing phase.
⏪ Reversal Context
Highlights changes in KDJ structure where J-line movement and the relationship between K and D indicate a possible transition in short-term momentum conditions.
This context focuses on structural changes rather than predicting future pric direction.
⬇️ Weakness Context
Displays conditions where KDJ structure shows reduced momentum strength and weaker directional movement.
This state helps visualize when previous momentum conditions begin losing strength.
🔄 Recovery Context
Highlights situations where KDJ structure begins improving after a weaker phase.
This context observes changes in J-line behavior and KDJ alignment during potential momentum recovery conditions.
⚪ Neutral Context
Represents situations where K, D, and J do not form a strong directional structure and momentum remains relatively balanced.
Main Features
• Customizable KDJ calculation parameters
• Dynamic K, D, and J value visualization
• KDJ line relationship and structure analysis
• Momentum context classification
• Historical context table display
• Recent bar comparison
• Visual markers for important KDJ transitions
• KDJ arrangement monitoring
• Adjustable display range and historical reference position
How It Works
Rewind KDJ Context uses the traditional KDJ calculation method based on RSV, followed by smoothing calculations for the K and D lines.
The J line is derived from the relationship between K and D:
• K line represents the smoothed RSV movement
• D line represents the smoothed K line movement
• J line represents an extended momentum relationship between K and D
The indicator evaluates several aspects of KDJ behavior, including:
• Relative position between K, D, and J
• Directional movement of each component
• Changes in momentum expansion and contraction
• KDJ structural transitions
• Recent historical context
These calculations are organized into visual context states to make KDJ behavior easier to interpret.
Intended Use
Rewind KDJ Context is designed as a technical analysis tool for observing momentum conditions and KDJ structure.
It can be used together with price action analysis, trend evaluation, support and resistance analysis, volatility analysis, and other technical methods to build a broader market view.
The indicator is intended to provide additional context about momentum behavior rather than replace complete market analysis.
Notes
Rewind KDJ Context is based on mathemat calculations derived from historical pric data.
The displayed context states represent current and historical KDJ conditions based on the selected settings and market data available on the chart.
Different assets, timeframes, and market environments may produce different interpretations of the same indicator behavior.
Disclaimer
Rewind KDJ Context is provided for informational and technical analysis purposes only.
This indicator does not provide finacl advice, personalized recommendations, autm trading decisions, or guaranteed results.
The displayed KDJ context states, momentum conditions, and visual markers are generated from mathematical calculations and should not be interpreted as predictions of future pric movements.
Users are responsible for conducting their own analysis, making their own decisions, and applying appropriate risk management methods.
Past market behavior and technical indicator performance do not guaran future outcomes. Indicador

Premium/Discount ML Zones [PickMyTrade]What does it do?
Builds a Premium / Equilibrium / Discount map from a higher-timeframe dealing range, then runs an online logistic regression over every price level inside that map to detect the exact band where the model currently reads a directional edge. Because the range is read from one anchor timeframe, the zones sit at the same prices whether you view the 5m, 1h or Daily chart.
────────────────────────────────────
The intellectual problem
Premium/Discount is a location framework: above the 50% equilibrium of a dealing range price is expensive, below it price is cheap. Two problems show up the moment you try to automate it.
First — the range is usually drawn on whatever chart you are looking at. A 5-minute chart finds 5-minute swings, so it anchors to a micro-range that may be a few points wide. The Daily chart finds a range a hundred times larger. The same price is then simultaneously "premium" on one timeframe and "discount" on another, and the label stops meaning anything. The conventional discipline is to define the range on a higher timeframe and drop down only to execute — never to redraw the range on the execution chart.
Second — location alone is not an edge. Knowing price is in the lower half of a range tells you it is cheap relative to that range. It does not tell you whether cheapness is currently being rewarded. In a strong downtrend every discount print keeps getting cheaper. Location is a filter; something else has to decide whether the location is worth acting on.
This indicator separates those two jobs. The dealing range and its three zones are the map , anchored once on a higher timeframe. A logistic regression trained on the chart's own history is the decision , and it is what marks the actionable band inside the map.
────────────────────────────────────
How the dealing range is anchored
The range is built from confirmed swing highs and lows read from the Dealing Range Timeframe (default Daily) via request.security(..., lookahead=barmerge.lookahead_off) . Each side re-anchors to its most recent confirmed swing, with guards that keep the pair coherent:
if not na(ph) and (na(swingLow) or ph > swingLow) swingHigh := ph if not na(pl) and (na(swingHigh) or pl < swingHigh) swingLow := pl
Those guards are what make the range track the current leg rather than a fixed lookback window. In an uptrend each new higher low pulls the low side up with price, instead of leaving equilibrium pinned to an ancient low that price has long since left behind.
From that range:
Equilibrium — the exact 50% midpoint, (rangeHigh + rangeLow) / 2 Equilibrium band — a neutral fair-value zone of ± Equilibrium Band × range around the midpoint (default ±10%, i.e. the middle 20%). No signals fire inside it. Premium — everything above the band. Discount — everything below it.
Break of structure — when price closes beyond the anchored range, the old range is stale until a new swing confirms. A bearish BOS blocks longs and a bullish BOS blocks shorts, so the model does not fade a breakout while waiting for the range to re-anchor.
────────────────────────────────────
How the logistic regression works
Step 1 — Three z-score normalised features
All three are standardised over the Z-Score Window (default 50) so the model is scale-invariant across instruments and timeframes.
F1 — Position in range : where the close sits between the range low and high, clamped to 0–1. This is the premium/discount coordinate itself. F2 — Dwell time : a rolling time-at-price measure — the fraction of the last N bars that closed within one price band of the current close. High dwell means price has spent real time here; a level touched once in a spike scores low. F3 — Momentum : rate of change over the momentum length, normalised. Distinguishes a discount that is stabilising from one that is still falling.
Step 2 — Online gradient descent with L2 regularization
There is no fixed training window and no retraining pass. Each confirmed bar is labelled from its forward return over the Label Horizon, and the weights take one gradient step per bar, always evaluated on the previous bar's features so no current-bar information leaks into the update:
_pred = f_sigmoid(w0 + w1f1 + w2f2 + w3*f3 ) _label = label_bull ? 1.0 : 0.0 _err = _label - _pred w1 := w1 + i_learn_rate * (_err * f1 - i_l2_lambda * w1)
The - i_l2_lambda * w1 term is weight decay: it pulls weights back toward zero each step, which stops any single feature from running away to an extreme value on a stretch of trending data. The bias term w0 is deliberately left unregularized — it carries the base rate, not a feature relationship.
Step 3 — Posterior
post_bull = f_sigmoid(w0 + w1f1 + w2f2 + w3*f3) post_bear = 1.0 - post_bull
Step 4 — The ML entry zone (what the model detects)
This is the part that does the work. Rather than only scoring the bar in front of it, the model scores every price level inside the discount half and the premium half — sweeping the position feature across the zone while holding dwell and momentum at their current values — and marks the contiguous band where its probability clears the Entry Threshold:
for j = 0 to i_nbins float p = rangeLow + (eq_bot - rangeLow) * j / i_nbins float f1p = ((p - rangeLow) / range_size - pos_mean) / pos_std float pbup = f_sigmoid(base + w1 * f1p) if pbup >= i_posterior_thresh ml_long_lo := na(ml_long_lo) ? p : math.min(ml_long_lo, p) ml_long_hi := na(ml_long_hi) ? p : math.max(ml_long_hi, p)
That band is the ML Buy / Sell Zone drawn on the chart. It is the exact price range in which a signal would fire right now — visible before price arrives there. Its thickness is meaningful: a thin band means only a sliver of the zone clears the threshold, a thick band means the model reads an edge across most of the zone. When nothing clears the threshold, the band disappears entirely rather than showing a level the model does not support.
────────────────────────────────────
Reading the indicator
PREMIUM box (orange) — upper region of the HTF range. Shorts are considered here only. EQUILIBRIUM box (grey) — the fair-value band around the 50% midpoint. Nothing fires here by design. DISCOUNT box (blue) — lower region. Longs are considered here only. ML BUY / SELL ZONE (bright band) — the model-detected band inside the discount/premium region, labelled with the peak probability found in that band. ● circle (blue) — high-conviction long: P(Bull) ≥ 0.85. ▲ triangle (blue) — standard long: P(Bull) ≥ threshold. ● circle (orange) — high-conviction short: P(Bear) ≥ 0.85. ▼ triangle (orange) — standard short: P(Bear) ≥ threshold. Dashed equilibrium line — the exact 50% midpoint. Dashed SL / TP lines — reference levels from the range extreme at ATR × multiplier and the Risk:Reward ratio.
Only the first bar of each signal cluster fires — if conditions stay true for several bars, only the transition bar is marked.
Info table (top-right)
● LIVE (green) — the model has taken ≥ Training Samples Needed gradient steps. ● WARMUP (yellow) — still accumulating; signals suppressed. Zone — Premium / Equilibrium / Discount, or BOS ↑ / BOS ↓ (yellow) when price has broken the range. P(Bull) / P(Bear) — live posterior at the current bar. N Trained — total gradient updates taken.
────────────────────────────────────
Inputs
Dealing Range Dealing Range Timeframe — whose swings define the map (default D). Set it equal to or higher than your execution chart. This is the input that makes the zones identical across timeframes. Swing Left / Right Bars — swing definition on the anchor timeframe (default 3/3). Right Bars is the confirmation delay: the range re-anchors that many anchor-timeframe bars after a swing forms. Equilibrium Band — half-width of the neutral zone as a fraction of range (default 0.10). Set 0 to collapse it to a single line.
Dwell-Time Feature Scan / Dwell Bands (default 20) — price resolution for the entry-zone scan and the dwell band width. Dwell Lookback (default 50).
Logistic Regression Training Samples Needed — gradient updates before signals activate (default 80). Entry Threshold — minimum probability to fire a signal and to light the ML zone (default 0.65). Learning Rate — gradient step size (default 0.05). Higher adapts faster but noisier. L2 Regularization — weight decay (default 0.001). 0 disables it. Label Horizon (default 5), Momentum Length (default 14), Z-Score Window (default 50).
Signal Levels Show SL/TP Lines, ATR Period, SL ATR Buffer (default 1.2), Risk:Reward (default 1.8).
Visual / Display Show Premium/Discount Map, Show ML Entry Zone, Zone Left Extent / Forward Extend, Show Equilibrium Line, Regime Background, zone colours. Zen Mode — hides SL/TP lines and the table; map and ML zone remain.
────────────────────────────────────
Three alerts included
PD ML - Long — discount long fired PD ML - Short — premium short fired PD ML - Any Signal — either direction
────────────────────────────────────
Technical notes
Swing detection on the anchor timeframe needs Swing Right Bars of that timeframe to confirm. With the Daily default that is a three-day confirmation delay before the range re-anchors. This is inherent to non-repainting swing detection, not a tunable away. request.security uses lookahead_off , so historical bars use only confirmed anchor-timeframe values. The developing anchor bar updates in real time, which is expected behaviour for a live higher-timeframe reference. The dwell feature counts closes within one band of the current close over the lookback — a bar-based proxy for time-at-price. It does not use tick or volume-profile data. The entry-zone scan holds dwell and momentum fixed while sweeping position. It answers "if price were at level X, with today's momentum and dwell, what would the model read?" — a counterfactual across location, not a forecast of the path. Logistic regression assumes a monotonic relationship between each feature and the log-odds. Real price behaviour is not always monotonic in position-within-range; the model captures the dominant direction of that relationship, not its curvature.
────────────────────────────────────
Requirements and limitations
The model needs Training Samples Needed gradient steps before signals activate; on short-history charts the table shows WARMUP and nothing fires. Weights are learned per chart and per timeframe — switching symbol or timeframe restarts the learning from zero.
Probabilities are the model's read of patterns in its own training history. They are not a probability of profit, and patterns that historically preceded a directional move may not repeat.
The equilibrium band is deliberately dead space. If you want signals nearer the midpoint, reduce the band toward 0 — but the closer to fair value you trade, the less the premium/discount premise is contributing.
If the Dealing Range Timeframe is left blank or set below your chart's timeframe, the range is computed on the chart timeframe and the cross-timeframe consistency is lost. That is the failure mode this indicator exists to avoid.
The three zones describe location within one dealing range. They carry no information about ranges above them — a Daily discount can sit inside a Weekly premium.
────────────────────────────────────
Risk disclosure
Nothing here forecasts price. The zones describe where price sits inside a measured range; the classifier reports what its training history associates with that location. Use with your own position sizing and risk management. Not financial advice.
Built natively in Pine Script® v6. Online logistic regression trained by per-bar gradient descent with L2 weight decay, a rolling dwell-time feature, and a higher-timeframe swing-anchored dealing range. No external libraries, no data feeds.
Open source — Mozilla Public License 2.0. Indicador
