Quantum Reversal Detector [JOAT]
Quantum Reversal Detector - Multi-Factor Reversal Probability Analysis
Introduction and Purpose
Quantum Reversal Detector is an open-source overlay indicator that combines multiple reversal detection methods into a unified probability-based framework. The core problem this indicator addresses is the unreliability of single-factor reversal signals. A price touching support means nothing without momentum confirmation; an RSI oversold reading means nothing without price structure context.
This indicator solves that by requiring multiple independent factors to align before generating reversal signals, then expressing the result as a probability score rather than a binary signal.
Why These Components Work Together
The indicator combines five analytical approaches, each addressing a different aspect of reversal detection:
1. RSI Extremes - Identifies momentum exhaustion (overbought/oversold)
2. MACD Crossovers - Confirms momentum direction change
3. Support/Resistance Proximity - Ensures price is at a significant level
4. Multi-Depth Momentum - Analyzes momentum across multiple timeframes
5. Statistical Probability - Quantifies reversal likelihood using Bayesian updating
These components are not randomly combined. Each filter catches reversals that others miss:
RSI catches momentum exhaustion but misses structural reversals
MACD catches momentum shifts but lags price action
S/R proximity catches structural levels but ignores momentum
Multi-depth momentum catches divergences across timeframes
Probability scoring combines all factors into actionable confidence levels
How the Detection System Works
Step 1: Pattern Detection
The indicator first identifies potential reversal conditions:
// Check if price is at support/resistance
float lowestLow = ta.lowest(low, period)
float highestHigh = ta.highest(high, period)
bool atSupport = low <= lowestLow * 1.002
bool atResistance = high >= highestHigh * 0.998
// Check RSI conditions
float rsi = ta.rsi(close, 14)
bool oversold = rsi < 30
bool overbought = rsi > 70
// Check MACD crossover
float macd = ta.ema(close, 12) - ta.ema(close, 26)
float signal = ta.ema(macd, 9)
bool macdBullish = ta.crossover(macd, signal)
bool macdBearish = ta.crossunder(macd, signal)
// Combine for reversal detection
if atSupport and oversold and macdBullish
bullishReversal := true
Step 2: Multi-Depth Momentum Analysis
The indicator calculates momentum across multiple periods to detect divergences:
calculateQuantumMomentum(series float price, simple int period, simple int depth) =>
float totalMomentum = 0.0
for i = 0 to depth - 1
int currentPeriod = period * (i + 1)
float momentum = ta.roc(price, currentPeriod)
totalMomentum += momentum
totalMomentum / depth
This creates a composite momentum reading that smooths out noise while preserving genuine momentum shifts.
Step 3: Bayesian Probability Calculation
The indicator uses Bayesian updating to calculate reversal probability:
bayesianProbability(series float priorProb, series float likelihood, series float evidence) =>
float posterior = evidence > 0 ? (likelihood * priorProb) / evidence : priorProb
math.min(math.max(posterior, 0.0), 1.0)
The prior probability starts at 50% and updates based on:
RSI extreme readings increase likelihood
MACD crossovers increase likelihood
S/R proximity increases likelihood
Momentum divergence increases likelihood
Step 4: Confidence Intervals
Using Monte Carlo simulation concepts, the indicator estimates price distribution:
monteCarloSimulation(series float price, series float volatility, simple int iterations) =>
float sumPrice = 0.0
float sumSqDiff = 0.0
for i = 0 to iterations - 1
float randomFactor = (i % 10 - 5) / 10.0
float simulatedPrice = price + volatility * randomFactor
sumPrice += simulatedPrice
float avgPrice = sumPrice / iterations
// Calculate standard deviation for confidence intervals
This provides 95% and 99% confidence bands around the current price.
Signal Classification
Signals are classified by confirmation level:
Confirmed Reversal : Pattern detected for N consecutive bars (default 3)
High Probability : Confirmed + Bayesian probability > 70%
Ultra High Probability : High probability + PDF above average
Dashboard Information
The dashboard displays:
Bayesian Probability - Updated reversal probability (0-100%)
Quantum Momentum - Multi-depth momentum average
RSI - Current RSI value with overbought/oversold status
Volatility - Current ATR as percentage of price
Reversal Signal - BULLISH, BEARISH, or NONE
Divergence - Momentum divergence detection
MACD - Current MACD histogram value
S/R Zone - AT SUPPORT, AT RESISTANCE, or NEUTRAL
95% Confidence - Price range with 95% probability
Bull/Bear Targets - ATR-based reversal targets
Visual Elements
Quantum Bands - ATR-based upper and lower channels
Probability Field - Circle layers showing probability distribution
Confidence Bands - 95% and 99% confidence interval circles
Reversal Labels - REV markers at confirmed reversals
High Probability Markers - Star diamonds at high probability setups
Reversal Zones - Boxes around confirmed reversal areas
Divergence Markers - Triangles at momentum divergences
How to Use This Indicator
For Reversal Trading:
1. Wait for Bayesian Probability to exceed 70%
2. Confirm price is at S/R zone (dashboard shows AT SUPPORT or AT RESISTANCE)
3. Check that RSI is in extreme territory (oversold for longs, overbought for shorts)
4. Enter when REV label appears with high probability marker
For Risk Management:
1. Use the 95% confidence band as a stop-loss reference
2. Use Bull/Bear Targets for take-profit levels
3. Higher probability readings warrant larger position sizes
For Filtering False Signals:
1. Increase Confirmation Bars to require more consecutive signals
2. Only trade when probability exceeds 70%
3. Require divergence confirmation for highest conviction
Input Parameters
Reversal Period (21) - Lookback for S/R and momentum calculations
Quantum Depth (5) - Number of momentum layers for multi-depth analysis
Confirmation Bars (3) - Consecutive bars required for confirmation
Detection Sensitivity (1.2) - Band width and target multiplier
Bayesian Probability (true) - Enable probability calculation
Monte Carlo Simulation (true) - Enable confidence interval calculation
Normal Distribution (true) - Enable PDF calculation
Confidence Intervals (true) - Enable confidence bands
Timeframe Recommendations
1H-4H: Best for swing trading reversals
Daily: Fewer but more significant reversal signals
15m-30m: More signals, requires higher probability threshold
Limitations
Statistical concepts are simplified implementations for Pine Script
Monte Carlo uses deterministic pseudo-random factors, not true randomness
Bayesian probability uses simplified prior/likelihood model
Reversal detection does not guarantee actual reversals will occur
Confirmation bars add lag to signal generation
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. The source code is fully visible and can be studied to understand how each component works.
This indicator does not constitute financial advice. Reversal detection is probabilistic, not predictive. The probability scores represent statistical likelihood based on historical patterns, not guaranteed outcomes. Past performance does not guarantee future results. Always use proper risk management, position sizing, and stop-losses.
- Made with passion by officialjackofalltrades
Göstergeler ve stratejiler
Relative Strength by MomentradeRelative Strength Indicator (Index Comparison)
This Pine Script indicator displays the Relative Strength (RS) of the selected instrument compared to a benchmark index, primarily designed for Nifty. It measures performance comparison, helping traders identify whether the asset is outperforming or underperforming the index over a chosen period.
A rising Relative Strength line indicates outperformance, while a falling line signals underperformance. This tool is ideal for trend confirmation, stock selection, and strength-based trading, allowing users to focus on strong assets during bullish markets and avoid weak ones. The indicator is fully customizable and can be applied to any index, stock, or timeframe.
Silver Projection DivergenceSILVER PROJECTION DIVERGENCE
Standardized Fair Value Divergence Oscillator
OVERVIEW
The Silver Projection Divergence oscillator is the companion indicator to the Silver Macro Projection Model. It quantifies the gap between silver's actual price and its projected fair value, displaying this divergence as a standardized z-score. This format makes it easier to identify extreme conditions and time entries/exits based on mean reversion.
HOW IT WORKS
The oscillator converts raw divergence (Actual Silver - Projected Silver) to a z-score by normalizing against its historical distribution:
Z-Score > 0 - Silver trading ABOVE projected value (overvalued)
Z-Score < 0 - Silver trading BELOW projected value (undervalued)
Z-Score > 2 - Extreme condition (2 standard deviations)
VISUAL ELEMENTS
Main Plot
Green line/histogram - Negative divergence (undervalued)
Red line/histogram - Positive divergence (overvalued)
Color intensity increases when divergence is expanding
Reference Lines
+2 sigma / -2 sigma (dashed) - Extreme zones
+1 sigma / -1 sigma (dotted) - Moderate deviation
Zero line - Fair value equilibrium
Signal Markers
Green Triangle (bottom) - Z-score crosses below -2 (STRONG BUY)
Red Triangle (top) - Z-score crosses above +2 (STRONG SELL)
Background
Light red background - Extreme overvaluation (Z > 2)
Light green background - Extreme undervaluation (Z < -2)
SIGNAL INTERPRETATION
Z > +2.0 - Extreme Overvaluation - STRONG SELL / Take profits
Z +1.0 to +2.0 - Moderate Overvaluation - Caution / Reduce exposure
Z -1.0 to +1.0 - Fair Value Range - Neutral / Hold
Z -2.0 to -1.0 - Moderate Undervaluation - Accumulate / Scale in
Z < -2.0 - Extreme Undervaluation - STRONG BUY signal
COMPONENT TABLE
The bottom-right table breaks down divergence by factor:
Gold Ratio - Deviation from gold-implied fair value
M2 Supply - Divergence from monetary-implied value
DXY Signal - Dollar strength bullish/bearish indication
Equities - Equity market positioning signal
OVERALL - Combined signal with Z-score
TRADING APPLICATIONS
Mean Reversion Strategy
Enter LONG when Z < -2 and begins rising
Enter SHORT when Z > +2 and begins falling
Use zero-line crossings for trend confirmation
Trend Following Filter
Only take long trades when Z < 0 (undervalued)
Only take short trades when Z > 0 (overvalued)
Divergence Confirmation
Bearish: Price makes new highs while Z-score makes lower highs
Bullish: Price makes new lows while Z-score makes higher lows
ALERTS
Extreme Undervaluation - Z crosses below -2
Extreme Overvaluation - Z crosses above +2
Divergence Turned Positive - Crossed above zero
Divergence Turned Negative - Crossed below zero
COMBINED USAGE
For best results, use both with Silver Macro Projection Model - indicator:
Main Indicator - Visual context of actual vs. projected on price chart
Divergence Oscillator - Precise measurement for timing decisions
The main indicator (Silver Macro Projection Model - ) shows where silver should be; this oscillator shows how extreme the mispricing is and when to act.
Disclaimer: This indicator is for educational purposes only. Past correlations do not guarantee future relationships. Market conditions can alter historical relationships. Always use proper risk management.
Previous HLC Single ChoiceThis indicator allows traders to visualize the High, Low, and Close (HLC) levels of a previous timeframe directly on their current chart. By plotting these key levels from a higher timeframe, traders can identify significant support and resistance zones, potential breakout levels, and the overall market context without needing to switch back and forth between different chart intervals.
How it Works
The script utilizes the request.security() function to fetch the High, Low, and Close data from the previous completed bar of a user-selected timeframe.
Unlike static multi-timeframe indicators that might clutter the chart with too many lines, this script is designed for simplicity and flexibility. It uses the input.timeframe functionality, allowing you to select any standard or custom timeframe available on TradingView (e.g., 4-hour, Daily, Weekly, 3-Month, 12-Month) via a simple dropdown menu.
Once a timeframe is selected, the indicator plots three distinct lines:
Green Line: The High of the previous timeframe.
Red Line: The Low of the previous timeframe.
Orange Line: The Close of the previous timeframe.
Usage Examples
These levels often act as dynamic support and resistance.
Breakouts: A move above the previous timeframe's High can signal bullish strength.
Breakdowns: A drop below the previous timeframe's Low can signal bearish weakness.
Ranges: The space between the High and Low often defines the trading range for the current session.
Screenshots
Ethereum (1D Chart / 6M Levels):
Here we see the 6-Month High, Low, and Close plotted on a Daily chart. Note how the previous 6-month levels frame the long-term trend.
Silver (2h Chart / 1W Levels):
This example shows Silver on a 2-hour chart with Weekly levels. This is useful for intraday traders looking for weekly pivots.
EURUSD (30m Chart / 480m Levels):
A granular look at the Euro on a 30-minute chart using an 8-hour (480m) timeframe overlay. This helps identify mid-session reversals.
Apple (1D Chart / 3M Levels):
Apple stock on a Daily chart with Quarterly (3-Month) levels, highlighting major structural levels for swing trading.
Settings
Choose Timeframe: Select the specific timeframe you wish to overlay (Default is 3 Months).
Disclaimer
This script is for educational and informational purposes only. It DOES NOT constitute financial advice. Past performance is not indicative of future results. Always do your own research and risk management before trading.
MA-MTF-12 Overlay📊 MA-MTF-12 Overlay — Indicator Description
■ Overview
MA-MTF-12 Overlay is a multi-timeframe moving average indicator that allows you to display up to 12 moving averages (SMA / EMA) simultaneously, calculated either from the current timeframe (Local) or from higher timeframes (MTF).
It is designed to help traders visualize short-term price action and higher-timeframe market structure on a single chart, enabling clearer trend context and better decision-making.
■ Key Features
✅ Up to 12 Moving Averages
Display MA1–MA12 independently
Choose SMA or EMA for each MA
Fully customizable length, color, and line width
✅ Per-MA Local / MTF Selection
Each moving average can be set individually to:
Local – calculated on the current chart timeframe
MTF – retrieved from a higher timeframe (e.g. 1H, 4H, Daily, Weekly, Monthly)
This allows you to clearly separate entry signals from higher-timeframe trend context.
✅ Confirmed Bar Mode (Repaint Control)
When using MTF, each MA supports Confirmed Bar Mode:
ON – updates only after the higher-timeframe bar is closed (minimal repaint, backtest-friendly)
OFF – follows the current higher-timeframe bar in real time (discretionary trading)
✅ Gap Handling Option
Gaps OFF – higher-timeframe values are filled smoothly (step-style, easier to read)
Gaps ON – values appear only when a higher-timeframe bar updates (theoretical accuracy)
✅ Lightweight & Efficient Design
Each MA includes separate:
Calculation ON / OFF
Display ON / OFF
Unused MAs can be completely disabled, preventing unnecessary calculations and keeping the indicator fast even with multiple MTF sources.
■ Example Use Case
MA1–MA3: Local timeframe MAs for short-term momentum
MA4–MA6: Higher-timeframe MAs (4H / Daily / Weekly) for trend structure
MA7–MA12: Optional layers, disabled by default
This setup makes it easy to understand where price is trading within the broader market context.
■ Who This Indicator Is For
Traders who rely on multi-timeframe trend analysis
Scalpers, day traders, and swing traders who want one-chart clarity
Users concerned about repainting and indicator performance
Anyone who uses moving averages as structural reference points, not just signals
■ Technical Notes
Pine Script v5
Overlay indicator (drawn on price chart)
Multi-timeframe support via request.security()
No alerts or shapes — pure visual analysis
📊 MA-MTF-12 Overlay – インジケーター解説
■ 概要
MA-MTF-12 Overlay** は、
最大12本の移動平均(SMA / EMA)を、現在足(Local)または上位足(MTF)から自由に組み合わせて表示できる**
マルチタイムフレーム対応の高機能MAインジケーターです。
短期足の値動きから、1時間・4時間・日足・週足・月足といった
上位足のトレンド環境を、1つのチャート上で同時に把握**することを目的に設計されています。
---
■ 主な特徴
✅ 最大12本のMAを同時表示
* MA1〜MA12を個別に設定可能
* SMA / EMA をMAごとに選択
* 期間・色・太さもすべて自由にカスタマイズ
---
✅ Local / MTF をMAごとに切替可能
各MAは以下を個別に選択できます。
Local:現在のチャート時間足で計算
MTF:指定した上位足(例:1H / 4H / D / W / M)から取得
👉
短期MAはLocal、
環境認識用MAはMTF、
という役割分担を1つのインジケーターで実現できます。
---
✅ 確定足モード(リペイント制御)
MTF使用時は、確定足モードをMAごとに設定可能。
ON:上位足が確定してから更新(リペイント最小・検証向き)
OFF:上位足の進行中の値もリアルタイムで反映(裁量トレード向き)
用途に応じて柔軟に使い分けられます。
---
✅ ギャップ表示 ON / OFF
OFF:上位足MAを階段状に補完表示(視認性重視)
ON:上位足更新点のみ表示(理論重視)
---
✅ 計算ON / 表示ON を分離した軽量設計
各MAには
計算ON / OFF
表示ON / OFF**
を個別に用意。
使わないMAは計算そのものを停止できるため、
MTFを多用しても**動作が重くなりにくい設計です。
---
■ 想定される使い方
* MA1〜MA3:Local(短期〜中期の勢い把握)
* MA4〜MA6:MTF(4H・日足・週足のトレンド環境)
* MA7〜MA12:必要に応じて追加(初期はOFF)
👉
「今どの時間軸のトレンドの中にいるのか」を
MAだけで直感的に把握できます。
---
■ こんな方におすすめ
* 上位足MAを使った環境認識を重視するトレーダー
* スキャル・デイトレ・スイングを1チャートで完結させたい方
* MTFインジケーターのリペイントや重さが気になる方
* MAを「本数・役割・時間軸」で整理して使いたい方
---
■ 技術仕様
* Pine Script v5
* overlay=true(価格チャート上に表示)
* MTF対応(request.security 使用)
* アラート・シェイプなし(純粋な分析用)
---
SMT divergencesSMT divergences, virtually shows where Divergences in a pair are, choose your pairs and add to chart, only shows divergence when the laggard pair is sweeping downward and the leading pair doesn't sweep.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
For Source the Cutie
SMI + Trend Whale Tracker//@version=6
// Fixed Line 1: Explicitly naming the title and shorttitle
indicator(title="SMI + Trend Whale Tracker", shorttitle="SMI_Whale", overlay=true)
// --- Inputs ---
lenK = input.int(10, "%K Length", group="SMI Settings")
lenD = input.int(3, "%D Length", group="SMI Settings")
lenEMA = input.int(3, "EMA Length", group="SMI Settings")
volMult = input.float(3.0, "Whale Volume Multiplier (x Avg)", group="Whale Settings")
trendLen = input.int(200, "Global Trend SMA Length", group="Trend Settings")
// --- Calculations: SMI ---
emaEma(src, len) => ta.ema(ta.ema(src, len), len)
hi = ta.highest(lenK), lo = ta.lowest(lenK)
relRange = close - (hi + lo) / 2
smi = (hi - lo) != 0 ? 200 * (emaEma(relRange, lenD) / emaEma(hi - lo, lenD)) : 0
// --- Calculations: Global Trend ---
sma200 = ta.sma(close, trendLen)
isBullishTrend = close > sma200
plot(sma200, "200 SMA", color=color.new(color.blue, 50), linewidth=2)
// --- Calculations: Whale Tracker with Filter ---
avgVol = ta.sma(volume, 20)
isWhaleVol = volume > (avgVol * volMult)
// Filter: Whale must buy while price is above the 200 SMA
isWhaleBuy = isWhaleVol and close > open and isBullishTrend
isWhaleSell = isWhaleVol and close < open
// --- Visuals ---
plotshape(isWhaleBuy, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Whale Buy")
plotshape(isWhaleSell, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, title="Whale Sell")
// --- Dashboard ---
var table dash = table.new(position.top_right, 2, 3, bgcolor=color.new(color.black, 0), border_width=1)
if barstate.islast
smiColor = smi > 40 ? color.green : (smi < -40 ? color.red : color.gray)
trendColor = isBullishTrend ? color.green : color.red
table.cell(dash, 0, 0, text="SMI", text_color=color.white)
table.cell(dash, 1, 0, text=str.tostring(smi, "#.#"), bgcolor=smiColor, text_color=color.white)
table.cell(dash, 0, 1, text="Trend", text_color=color.white)
table.cell(dash, 1, 1, text=isBullishTrend ? "BULLISH" : "BEARISH", bgcolor=trendColor, text_color=color.white)
table.cell(dash, 0, 2, text="Whale", text_color=color.white)
table.cell(dash, 1, 2, text=isWhaleVol ? "ACTIVE" : "None", bgcolor=isWhaleVol ? color.purple : color.gray, text_color=color.white)
// --- Alerts ---
if isWhaleBuy
alert("Whale Buy + Trend Aligned: " + syminfo.ticker, alert.freq_once_per_bar_close)
RSI Trendline Breakout BB Exit -by RiazMalikUse this strategy based on RSI and bolinger bands
When RSI trend line breaks take position when RSI touches bolinger bands exit
MindEdge 2-7am (utc +1)This indicator highlights the 2-7am time for me to trade the opposite direction of a m15 sweep
Q# ML Logistic Regression Indicator [Lite]
Q TechLabs MLLR Lite — Machine Learning Logistic Regression Trading Indicator
© Q# Tech Labs 2025 Developed by Team Q TechLabs
Overview
Q# MLLR Lite is an open-source, lightweight TradingView indicator implementing a logistic regression model to generate buy/sell signals based on engineered price features. This “lite” version is designed for broad community access and serves as a foundation for the upcoming Pro version with advanced features and integration.
Features
Logistic Regression-based buy/sell signal generation
Customizable price source input (Open, High, Low, Close, HL2, HLC3, OHLC4)
Adjustable signal threshold and smoothing parameters
Signal confidence plotted in a separate pane
Alert conditions for buy and sell signals
Fully documented, clean Pine Script (v6) code for easy customization
Installation
Open TradingView and navigate to the Pine Script editor
Create a new script and paste the full content of the Q# MLLR Lite Pine Script
Save and add to chart
Configure inputs as needed for your trading style
Licensing
Q# MLLR Lite is provided under the MIT License, promoting open use, modification, and community collaboration with attributi
Q# MLLR Lite — Machine Learning Logistic Regression Trading Indicator
© Q# Tech Labs 2025 — Developed by Team Q#
Overview
Q# MLLR Lite is an open-source, lightweight TradingView indicator implementing a logistic regression model to generate buy/sell signals based on engineered price features. This “lite” version is designed for broad community access and serves as a foundation for the upcoming Pro version with advanced features and integration.
Features
Logistic Regression-based buy/sell signal generation
Customizable price source input (Open, High, Low, Close, HL2, HLC3, OHLC4)
Adjustable signal threshold and smoothing parameters
Signal confidence plotted in a separate pane
Alert conditions for buy and sell signals
Fully documented, clean Pine Script (v6) code for easy customization
Installation
Open TradingView and navigate to the Pine Script editor
Create a new script and paste the full content of the Q# MLLR Lite Pine Script
Save and add to chart
Configure inputs as needed for your trading style
Licensing
Q# MLLR Lite is provided under the MIT License, promoting open use, modification, and community collaboration with attribution.
Copyright (c) 2025 Q# Tech Labs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Hotjaem SignalBuy and Sell signals based on MACD, RSI, and Moving Averages.
Displays Golden Cross and Dead Cross for 5 and 20 Moving Averages.
Updates in progress.
EMA Trend + ADX Filter Sonia'sThis script lets you use EMA of your choice which only become a cloud when the ADX is at 25 or over, which confirms a trend. Enjoy!
Market Structure MTF [HH/HL/LH/LL + CHoCH + BOS]Automatic market structure detection with pivot classification (HH/HL/LH/LL), Change of Character (CHoCH) and Break of Structure (BOS) signals. Multi-timeframe support allows overlaying higher timeframe structure on any chart.
█ OVERVIEW
This indicator automatically detects and classifies pivot points to visualize market structure. It identifies trend direction through the sequence of highs and lows, and signals potential reversals through Change of Character (CHoCH) and trend continuation through Break of Structure (BOS).
█ CONCEPTS
Market structure analysis is based on the relationship between consecutive pivot points:
Bullish Structure:
• HH (Higher High): A swing high that exceeds the previous swing high
• HL (Higher Low): A swing low that stays above the previous swing low
• Sequence: HH → HL → HH → HL confirms uptrend
Bearish Structure:
• LH (Lower High): A swing high that fails to exceed the previous swing high
• LL (Lower Low): A swing low that breaks below the previous swing low
• Sequence: LH → LL → LH → LL confirms downtrend
Structure Shifts:
• CHoCH (Change of Character): Signals when the expected sequence breaks, suggesting potential trend reversal
• BOS (Break of Structure): Confirms trend continuation when price breaks a pivot level in trend direction
█ FEATURES
• Automatic pivot detection using configurable lookback period
• Smart classification comparing each pivot to its predecessor
• CHoCH detection when trend sequence is violated
• BOS signals with anti-repetition filter to reduce noise in consolidation zones
• Multi-Timeframe (MTF) support to display higher timeframe structure
• Horizontal dashed lines marking HTF pivot levels
• Clean visual output with color-coded labels
█ SETTINGS
Structure Settings:
• Pivot Length: Number of bars on each side required to confirm a pivot (default: 5)
- Lower values (2-3) = more sensitive, detects minor swings
- Higher values (10-20) = less sensitive, only major structure
Multi-Timeframe:
• Show HTF Structure: Enable/disable higher timeframe overlay
• HTF Timeframe: Select the higher timeframe to display (D, W, M, etc.)
Visualization:
• Show Local Structure: Toggle visibility of current timeframe pivots
Filters:
• BOS Buffer: Minimum bars between BOS signals to avoid repetition
█ HOW TO USE
The indicator offers three visualization modes:
1. LOCAL STRUCTURE ONLY (default)
├─ Show Local Structure: ✓ Enabled
├─ Show HTF Structure: ✗ Disabled
└─ Use case: Analyze structure on the current timeframe only
2. HIGHER TIMEFRAME ONLY (recommended for clarity)
├─ Show Local Structure: ✗ Disabled
├─ Show HTF Structure: ✓ Enabled
├─ HTF Timeframe: Select desired TF (D, W, M)
└─ Use case: View higher TF context on lower TF charts without clutter
3. BOTH TIMEFRAMES (advanced)
├─ Show Local Structure: ✓ Enabled
├─ Show HTF Structure: ✓ Enabled
└─ Use case: See confluence between timeframes
⚠️ WARNING: This mode can make the chart visually crowded.
Recommended only for experienced users who need both layers simultaneously.
█ RECOMMENDED SETTINGS BY TIMEFRAME
| Chart TF | Pivot Length | Suggested HTF |
|----------|--------------|---------------|
| 1H | 10-15 | 4H or D |
| 4H | 5-10 | D or W |
| 1D | 5-7 | W |
| 1W | 3-5 | M |
The goal is to make pivots on lower timeframes represent equivalent time context.
█ VISUAL REFERENCE
Local Structure Labels:
• 🟩 Green (above): HH - Higher High
• 🟥 Red (above): LH - Lower High
• 🟩 Green (below): HL - Higher Low
• 🟥 Red (below): LL - Lower Low
• 🟧 Orange: CHoCH - Change of Character
• 🟦 Blue: BOS - Break of Structure
HTF Structure Labels:
• 🩵 Teal: HH/HL - Bullish HTF structure
• 🟫 Maroon: LH/LL - Bearish HTF structure
• 🟨 Yellow: CHoCH - HTF trend shift
• 🟦 Navy: BOS - HTF structure break
• ┈┈ Dashed lines mark HTF pivot price levels
█ INTERPRETATION GUIDELINES
Reading the sequence:
• Consistent HH + HL = Bullish bias, look for long opportunities
• Consistent LH + LL = Bearish bias, look for short opportunities
• CHoCH after trending sequence = Potential reversal, exercise caution
• BOS in trend direction = Trend continuation confirmed
Combining timeframes:
• HTF structure defines the primary bias
• Local structure provides entry timing
• Confluence (both TFs aligned) = Higher probability setups
█ LIMITATIONS
• Pivots are confirmed with a delay equal to the Pivot Length parameter
• In ranging markets, multiple CHoCH signals may appear (this is correct behavior - the market IS changing direction frequently)
• CHoCH signals potential reversal, not guaranteed reversal
• Works best on liquid markets with clean price action
█ TECHNICAL NOTES
• Uses ta.pivothigh() and ta.pivotlow() for pivot detection
• request.security() fetches higher timeframe data
• Anti-repetition logic prevents BOS signal clustering in consolidation
• All crossover/crossunder calculations are performed at global scope for consistency (Pine Script v6 compliance)
█ CREDITS
Developed for swing traders and position traders who use market structure for trend analysis and trade timing.
Feedback and suggestions are welcome.
Custom RSI with Multi-Level Colors
Custom RSI with Multi-Level Colors
buy signal when rsi < 35
rsi color does not change when rsi > 40
below 35, for every 5-point drop, color changes
My script_DetailedThis is a daily screener for swing trading using the latest screener functionality from trading view. I have been using this for a few months for a fantastic results. I have traded 100 trades with a profit potentiality of 80 percent.
What a way to trade. I use the daily timeframe.
LBMA London Gold Fix Times [Auto DST]## Overview
This lightweight indicator automatically marks the **LBMA Gold Price Fixing** times on your chart using vertical lines. It is designed specifically for **XAUUSD (Gold)** traders who need to monitor institutional liquidity and volatility shifts during the London session.
The indicator tracks the two key daily fixing moments:
* **AM Fix:** 10:30 (London Time)
* **PM Fix:** 15:00 (London Time)
## Key Features
* **🌍 Auto Daylight Saving Time (DST):** Built with the `Europe/London` timezone parameter. It automatically adjusts to British Summer Time (BST) and GMT, so you never have to manually change the UTC offset settings.
* **⚡ Minimalist Design:** Draws clean vertical lines without cluttering your chart with text labels.
* **🎨 Fully Customizable:** You can adjust the line color, width, and style (Solid, Dashed, Dotted) for both AM and PM sessions independently.
## Why are these times important?
The London Gold Fix (LBMA Gold Price) is the global benchmark for physical gold settlement. Major institutions, central banks, and mining companies settle contracts at these times. Consequently, **10:30** and **15:00** (London time) often witness:
1. Significant spikes in volatility.
2. Trend reversals or accelerations.
3. Massive volume injection.
## Usage Tips
* **Timeframe:** This indicator works best on **Intraday Timeframes** (1-minute to 30-minute charts).
* *Note:* It may not be visible on H1 (1-hour) charts or higher because the fix times (e.g., 10:30) occur in the middle of an hourly candle.
* **Setup:** Simply add it to your chart. No timezone configuration is required; the script calculates London time internally.
## Settings
* **AM Fix Color:** Default is Blue (London Morning).
* **PM Fix Color:** Default is Red (London Afternoon/US Morning overlap).
* **Line Style:** Choose between Solid, Dashed, or Dotted lines.
概述 (Overview)
这是一个轻量级的辅助指标,通过垂直线在图表上自动标记 LBMA 伦敦金定盘价(LBMA Gold Price Fixing) 的时刻。它是专为 XAUUSD(黄金) 交易者设计的,旨在帮助大家捕捉伦敦时段内机构流动性和市场波动的关键节点。
该指标会自动锁定每天两个核心的定盘时间:
上午定盘 (AM Fix): 10:30 (伦敦时间)
下午定盘 (PM Fix): 15:00 (伦敦时间)
主要功能 (Key Features)
🌍 自动识别夏令时 (Auto DST): 代码内置 Europe/London 时区参数。无论英国处于夏令时 (BST) 还是冬令时 (GMT),指标都会自动精准对齐,无需用户手动调整时区设置。
⚡ 极简主义设计: 仅绘制干净的垂直线,不显示任何文字标签,避免遮挡K线或干扰视线。
🎨 高度可定制: 您可以独立调整上午和下午定盘线的颜色、粗细以及样式(实线、虚线或点线)。
为什么要关注这两个时间点?
LBMA 伦敦金定盘价是全球实物黄金结算的基准价格。大型金融机构、中央银行和金矿公司通常会在这个时间点集中进行合约结算。因此,在伦敦时间 10:30 和 15:00 前后,市场经常会出现:
波动率瞬间激增。
短期趋势的反转或加速。
巨量成交量的涌入。
使用建议 (Usage Tips)
适用周期: 建议在 日内分时图(1分钟、5分钟、15分钟或30分钟)上使用。
注意: 在 1小时 (H1) 或更大的周期上,线条可能无法显示,因为定盘时间(如 10:30)发生在整点K线的内部,无法被单独标记。
设置方法: 加载指标即可使用。无论您本地电脑的时间设置如何,脚本内部会自动计算正确的伦敦时间。
参数设置 (Settings)
AM Fix Color: 上午定盘线颜色(默认为蓝色)。
PM Fix Color: 下午定盘线颜色(默认为红色,此时往往也是美盘初期的波动高峰)。
Line Style: 线条样式选择(实线、虚线、点线)。
Triple Supertrend Hybrid This takes 3 supertrends and calculates them into 1 simple trendline signal
Nifty50 Session Pivot + Fixed Open-Based BandsFixed width based Support resistance bands for Nifty 50 with pivot point.
Pro Volume Lite positionsThis is another update to the Positions indicator, which gives 3 SQ , so that you can have a dynamic sizing.
This way you will be able to scale in MB
NY Open Candle IndicatorThe NY Open Candle Indicator identifies significant opening range activity at the New York stock market open.
It highlights the 09:30–09:45 EST 15-minute candle when its range (high - low) exceeds a user-defined percentage of the daily ATR (default 25%).
- Bullish wide-range candles are colored green
- Bearish wide-range candles are colored red
A small table displays:
- Current Daily ATR
- The threshold value (user % of ATR in price terms)
An alert condition is included — create an alert for "Wide NY Open Range Detected" to get notified when a qualifying candle closes.
Perfect for traders watching opening range breakouts, volatility expansion, or momentum at the NY open.
Requirements:
- Use on 15-minute timeframe
- Set chart timezone to America/New_York
Enjoy!






















