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. Strategy

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. Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

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.
Indicator

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
Indicator

Indicator

Indicator

Indicator

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). Indicator

Indicator

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.
Indicator

Indicator

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. Indicator

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. Indicator

Indicator

Indicator

Indicator

BTC Max Pain (Deribit)**BTC Max Pain (Deribit) โ every key expiry's Max Pain level on a single chart**
## What this indicator does
Plots the **Max Pain** price of Bitcoin options on Deribit, per expiration date, as dashed horizontal lines on your chart. Each line:
- Has its **own color** per expiry, with a label showing the expiry date / Max Pain price / total Open Interest
- Extends from the current bar to that expiry's **actual settlement time** (08:00 UTC) โ so you can see exactly when each level "expires"
- Has its **width scaled by Open Interest** โ expiries where the money is concentrated (monthlies/quarterlies) draw thicker than thin weeklies
## What is Max Pain?
Max Pain is the strike price at which the total value of all outstanding options โ both calls and puts, weighted by Open Interest โ expires **as worthless as possible**. It is the price where option buyers hurt the most and option sellers (typically market makers) benefit the most. The theory holds that as expiration approaches, delta-hedging flows tend to pull price toward this level, so traders watch it as a magnet zone / options-flow-based support and resistance to complement their analysis.
## Where the data comes from
Computed from the per-contract Open Interest of all BTC options on the **Deribit public API** (free, no key required) using the standard method: for every strike, assume price settles there and sum the payout owed to all option holders โ the strike with the lowest total payout is Max Pain.
Since Pine Script cannot access the internet on its own, this indicator takes its data through the **"Data"** input field in Settings, formatted as comma-separated `YYMMDD:maxpain:oi`. The string is generated automatically by an open-source Python script in the linked repository โ one command fetches fresh data and copies the string to your clipboard, ready to paste.
## How to use
1. Add the indicator to a BTCUSD chart (recommended timeframe: **D and above** โ on intraday timeframes TradingView clamps drawings to ~500 bars into the future, so distant expiries will be displayed closer than they really are)
2. To update the data: run the script from the repo (or compute your own) โ paste the new string into the Data field โ OK
3. Options: show/hide OI in labels, hide already-settled expiries
## Settings
- **Data** โ the data string (`YYMMDD:maxpain:oi,...`)
- **Show total OI in label** โ display total Open Interest in each label
- **Hide expired** โ hide expiries that have already settled
โ ๏ธ Max Pain is a theoretical framework. Price does not always gravitate toward it, especially when strong directional forces dominate the market โ this is not financial advice.
Source code + automatic data generator: github.com/seed2004/btc-maxpain-tradingview Indicator

Strategy
