SMT Divergence [Kodexius]SMT Divergence is a correlation-based divergence detector built around the Smart Money Technique concept: when two normally correlated instruments should be making similar swing progress, but one prints a new extreme while the other fails to confirm it. This “disagreement” can be a valuable contextual signal around liquidity runs, distribution phases, and potential reversal or continuation points.
The script compares the chart symbol (primary) with a user-selected comparison symbol (for example BTC vs ETH, ES vs NQ, EUR/USD vs GBP/USD) and automatically scans both instruments for confirmed swing highs and swing lows using pivot logic. Once swings are established, it checks for classic SMT conditions:
Primary makes a new swing extreme while the comparison symbol forms a non-confirming swing .
To support a wider range of markets, the indicator includes an Inverse Correlation option for pairs that typically move opposite to each other (for example DXY vs EUR/USD). With this enabled, the divergence rules are logically flipped so that the script still detects “non-confirmation” in a way that is consistent with the pair’s relationship.
The indicator is designed to be readable and actionable. It can draw divergence labels directly on the main chart, connect the relevant swing points with lines, show a compact information table with the last signal and settings, and optionally render the comparison symbol as a mini candle chart in the indicator pane for quick visual validation.
🔹 Features
🔸 Two-Symbol SMT Analysis (Primary vs Compare)
Select any comparison symbol to evaluate correlation structure and divergence. The script fetches the comparison OHLC data using the current chart timeframe to keep both series aligned for analysis.
🔸 Inverse Correlation Mode
For inversely correlated pairs, enable “Inverse Correlation” so the script interprets confirmation appropriately (for example, a higher low on the comparison instrument might be expected to correspond to a lower low on the primary, depending on the relationship). This helps avoid false conclusions when the pair naturally moves opposite.
🔸 Pivot-Based Swing with Adjustable Sensitivity
Swings are detected using confirmed pivots (left bars and right bars). This provides cleaner structural swing points compared with raw candle-to-candle comparisons, and it lets you control sensitivity for different market conditions and timeframes. The script also limits stored swing history to keep performance stable.
🔸 Flexible Detection Mode: Time Matched or Independent Swings
You can choose how swings are paired across instruments:
Time Matched searches for a comparison swing that occurred at the same pivot time as the primary swing.
Independent Swings compares each symbol’s own last two swings without requiring an exact time match.
🔸 Range Control and Noise Filtering
To reduce weak or irrelevant signals:
“Max Bars Between Swings” ensures the two swings being compared are close enough in structure to be meaningful.
“Min Price Diff (%)” can require a minimum percentage change between the primary’s last two swing prices to confirm the move is significant.
🔸 Clear Visual Output with Tooltips
When a divergence is detected, the script can print a label (“SMT”) with bullish or bearish styling and a tooltip that includes the symbol pair and the primary swing price for quick context.
🔸 Divergence Lines for Context
Optional lines connect the relevant swing points, making it easier to see the exact structure that triggered the signal. One line can be drawn on the main chart and another in the indicator pane for the comparison series.
🔸 Info Table (At a Glance)
A compact table can display the active symbols, correlation mode, total divergences stored, and the most recent signal type.
🔸 Alerts Included
Built-in alert conditions are provided for bullish SMT, bearish SMT, and any SMT event so you can automate notifications without editing the code.
🔸 Optional Comparison Candle Panel
If enabled, the indicator can plot the comparison symbol as candles in the indicator pane. This is useful for confirming whether the divergence is happening around major levels, consolidations, or impulsive legs on the secondary instrument.
🔹 Calculations
This section summarizes the core logic used by the script.
1. Data Synchronization (Comparison Symbol)
The comparison instrument is requested on the chart’s current timeframe so swing calculations are performed consistently:
=
request.security(compareSymbolInput, timeframe.period, )
This ensures pivots and swing times are derived from the same bar cadence as the primary chart.
2. Swing Detection via Confirmed Pivots
Swings are detected using pivot logic with user-defined left and right bars:
primaryPivotHigh = ta.pivothigh(high, pivotLeftBars, pivotRightBars)
primaryPivotLow = ta.pivotlow(low, pivotLeftBars, pivotRightBars)
Because pivots are confirmed only after the “right bars” have closed, the script stores each swing using an offset so the swing’s bar index and time reflect where the pivot actually occurred, not where it was confirmed.
3. Swing Storage and Retrieval
Both symbols maintain arrays of SwingPoint objects. Each new swing is pushed into the array, and older swings are dropped once the array exceeds the configured maximum. This makes the divergence engine predictable and prevents uncontrolled memory growth.
The script then retrieves the last and previous swing highs and lows (per symbol) to evaluate structure.
4. Matching Logic (Time Matched vs Independent)
When “Time Matched” is selected, the script searches the comparison swing array for a pivot that occurred at the exact same timestamp as the primary swing. When “Independent Swings” is selected, it simply uses the comparison symbol’s last two swings of the same type.
5. Bullish SMT Condition (LL vs HL)
A bullish SMT event is defined as:
Primary forms a lower low (last low < previous low)
Comparison forms a higher low (last low > previous low)
If inverse correlation is enabled, the comparison condition flips to maintain logical confirmation rules
The two primary swings must be within the configured bar distance window
Optional minimum percentage difference must be satisfied
A simple anti duplication rule prevents repeated triggers on the same structure
These checks are implemented directly in the bullish detection block.
6. Bearish SMT Condition (HH vs LH)
A bearish SMT event is defined as:
Primary forms a higher high (last high > previous high)
Comparison forms a lower high (last high < previous high)
Inverse correlation flips the comparison rule
Range checks, minimum difference filtering, and duplicate protection apply similarly
These checks are implemented in the bearish detection block.
7. Percentage Difference Filter
The optional “Min Price Diff (%)” filter measures the relative distance between the last two primary swing prices. This prevents very small structural changes from being treated as valid SMT signals.
priceDiffPerc = math.abs(lastSwing.price - prevSwing.price) / prevSwing.price * 100.0
The divergence condition is only allowed to trigger if this value exceeds the user defined threshold.
priceOk = priceDiffPerc >= minPriceDiff
This filter is especially useful on higher timeframes or during low volatility conditions, where micro structure noise can otherwise produce misleading signals.
8. Visualization and Output
When a divergence is confirmed, the script:
Stores the event in a divergence array (limited by “Max Divergences to Display”)
Draws a directional SMT label with a tooltip (optional)
Draws connecting lines using time based coordinates for clean alignment (optional)
It also updates an information table on the last bar only, and exposes alertconditions for automation workflows.
SMT
QT-Cycles-Clear-View(Theory by DAYE)Quarter Theory – Short Summary
each cycle is segmented into four sequential quarters (Q1–Q4).
Each quarter reflects a distinct phase of liquidity, volatility, and participant behavior.
The theory focuses on when price is likely to move, rather than predicting direction.
Implemented Cycles
W.C (Weekly Cycle) – Day-to-day quarters on the 1H chart
D.C (Daily Cycle) – 6-hour quarters on the 15-minute chart
90M Cycle – Quarters within each 90-minute period
Micro Cycle – Short-term quarters within 23-minute cycles
/ Theory © DAYE
// Indicator implementation by M.A
// All rights to the original theory belong to DAYE.
// This script is an independent implementation.
QTheory [SSMT]QTheory –
This indicator is built on Quarterly Theory (developed by Daye)
🔹 Quarterly Theory
Markets often unfold in repeating quarterly cycles (Q1–Q4) across multiple timeframes — yearly, monthly, weekly, daily, 90-minute, and even micro cycles. By dividing price action into these quarters, traders can better anticipate structural shifts, accumulation/distribution phases, and liquidity runs.
🔹 Sequential SMT (SSMT)
Sequential SMT extends standard SMT (Smart Money Technique) by comparing multiple assets (such as FX majors) to identify divergences across quarters.
🔹 Features of QTheory
Automatic detection of quarterly cycles across multiple timeframes.
Visual cycle boxes & customizable dividers.
Integrated SSMT signals with divergence line visualization.
DFR (Defining Range) with Fibonacci levels.
Support for up to 5 comparison assets, with inversion options.
Auto-cycle selection for seamless multi-timeframe adaptation.
Extensive customization for colors, opacity, and signal display.
🔹 How it works
QTheory divides price data into consistent “quarters” across multiple timeframes. Within each cycle, it tracks highs, lows, and divergences, then overlays this information as boxes, dividers, and optional signals on your chart. Traders can use these visual cues to better align entries and exits with institutional market behavior patterns.
🔹 How to use it
Enable the desired cycle type (e.g., weekly, daily, 90-minute) from the settings.
Toggle boxes, dividers, and signals depending on your trading style.
Use SSMT divergences and DFR Fibs to anticipate a reversal
Compare against other assets (e.g., DXY or correlated pairs) to refine confluence.
Enable "Show Weekends" for Crypto.
⚠️ Disclaimer: This tool is for educational purposes only. It does not constitute financial advice. Always perform your own analysis and risk management.
Intermarket SSMT Table [Pogiest]General
Intermarket Sequential Smart Money Technique (IMSSMT) is a Quarterly Theory concept that identifies divergences (extreme highs/lows) when comparing different market triads to another market triad in two consecutive quarters.
SSMT involves identifying divergences in a correlated asset triad that occurs consecutively from the previous quarter to the current quarter to predict new phases of price, a shift in market sentiment, and also potential trend reversals. An SSMT divergence occurs when one or two assets makes a new high or low, but the other asset or assets does not, signaling a potential shift in market direction. A Hidden SSMT Divergence occurs when one or two assets’ closing price closes higher or lower than the other one or two assets’ closing price. However, with potential gaps in price, an opening price can also be the extreme when comparing assets for divergences. Hidden SSMT divergence compares the candle bodies while a Standard SSMT divergence compares the highs and lows. Both types of SSMTs are considered to be cracks in correlation and can be used to identify potential new phases of price whether it be a reversal, retracement, consolidation, and continuation.
Credit of concepts/ideas: ICT & TraderDaye
What Makes This Indicator Unique
The indicator table is designed to be used on any symbol the trader is viewing. For example, the indicator is shown on an NQ chart while selecting three symbols in the Forex triad in settings. The indicator will request the separate data from the symbols selected and display the data within the table. The table does not rely on data on the chart being viewed. Instead of switching charts, the table is used to track other market triads for SSMTs (standard & hidden) while viewing other markets simultaneously.
The indicator has the ability to display Standard SSMTs, Hidden SSMTs, or both simultaneously in real-time, tick by tick in the time period selected in a correlated asset triad within the table. Toggle modes for each type of SSMT will run independently (runs when enabled) and therefore, optimizes performance. The user is able to select three different tickers in settings instead of limiting to pairs. In addition, the indicator has “Invert” toggle options to track both Standard and Hidden SSMTs for assets with negative correlations.
How the Indicator Table Works
The indicator functions to track any divergences from the previous quarter to the current quarter. In addition, the indicator tracks the current status even when there are no divergences (see phase column below).
Timeframe Column:
1. Displays up to two different timeframes to monitor.
Asset Columns:
1. Display up to three different assets to monitor.
2. Cells display “Bull” in green background color or “Bear” in red background color showing the current state of each candle and updates in real-time tick by tick.
Phase Column:
Displays the current status from the previous quarter to the current quarter. The status updates in real-time tick by tick.
1. “F/S” indicates there are no current SSMT divergences between the previous quarter to the current quarter and all assets have not swept the previous quarter, a “failure swing”.
2. “HH” is displayed when all assets have swept the previous quarter’s extreme high. (Higher High)
3. “LL” is displayed when all assets have swept the previous quarter’s extreme low. (Lower Low) See screenshot with drawings below.
4. SSMT indicates there is an SSMT from the previous quarter to the current quarter. Red background is a bearish SSMT (divergence at the highs) or green background is a bullish SSMT (divergence at the lows). If the SSMT becomes invalid (i.e. the last asset sweeps the extreme high/low), then the table will update to display either “HH” or “LL” depending on the extreme it swept. See screenshot with drawings below.
5. “Both” indicates there are SSMT divergences at both the extremes highs and lows. If an SSMT on one side gets deleted, then the cell will automatically update to display the SSMT that is still intact. See screenshot with drawings below.
Invert Toggle Option:
When this setting is turned on, the asset column cells will display the inverted color of the live chart to show assets are in-sync. It will track the inverted swing points for SSMTs, higher highs, lower lows, etc. For example, if EUR and GBP are making lower highs, while DXY (Inverted toggle on), makes a lower low on the actual live chart, it will display “SSMT”.
NOTE:
Scanning function per timeframe to detect SSMTs:
Weekly HTF: Scans 4HR bars
Daily HTF: Scans 1HR bars
6HR/4HR HTF: Scans 15m bars
1HR HTF: Scans 5m bars
5m HTF: Scans 1m bars
The script has fixed lookback periods for bars to ensure the appropriate data is being captured. The higher the timeframe the user selects in settings while viewing on an extremely lower timeframe, the indicator may give inaccurate readings:
Recommended Chart Timeframes:
For best performance and accuracy, view your chart on a timeframe close to or lower than the scan timeframe:
Weekly HTF → View on 1H-4H chart
Daily HTF → View on 1H-4H chart
6HR/4HR HTF → View on 5m-15m chart
90M HTF → View on 3m-15m chart
1H HTF → View on 1m-15m chart
The indicator will attempt to scan further back if needed, but extremely low chart timeframes (e.g., 1m) with high HTF (e.g., Weekly) may still have limitations.
In addition, the indicator bases the SSMT off the previous quarter’s time range to the current quarter’s time range. If there are discrepancies in the time ranges (start to end of higher timeframe period selected), the SSMTs may display differently than what is viewed on the chart. For example, indices open at 18:00 est on a new trading day, so the time ranges matches throughout the day. However, in Forex, EUR and GBP opens at 17:00 est while DXY opens later, so the time ranges may be off (i.e. 6 hour timeframe). For best use, select time periods that matches throughout the day.
Usage
Traders can use both types of SSMT divergences to anticipate potential reversals in points of interest such as higher timeframe swing points, supply/demand zones, higher timeframe imbalances, key levels, etc. This indicator can also be beneficial in identifying cracks in correlation via Hidden SSMT when there are no divergences off the highs and lows. Divergences can come in different forms relating to Intermarket SSMT. For example, if one market triad is all making lower lows while the other market triad is making higher highs, this can be deemed a divergence between the two markets. Another example would be one market triad all makes lower lows while another market triad makes a bullish SSMT. This can potentially signal a bullish move up. SSMT divergences (standard and hidden) can be used as a confirmation tool with other confluences to identify trend direction with respect to points of interest, higher timeframe order-flow, lower timeframe order-flow, etc. In addition, having both a Standard SSMT and Hidden SSMT divergence display could potentially signal a reversal. It is up to the trader to gauge the price action at the time.
Settings
1. Choose up to three different assets to monitor.
Note: If only two are selected, the indicator will only display the two selected and compare the two assets for divergences. If one is selected, a warning sign will be displayed to select at least two assets.
2. Choose up to two different timeframes. Option to deselect timeframes.
3. Enable/disable standard or hidden SSMT.
4. Option to enable alerts. Alerts include the different phases in the table (i.e. SSMT, HH, LL, and Dual SSMT [both standard & hidden) for each timeframe.
5. Toggle option to show/hide the table. Toggle option to show/hide the “Title Row” which is the first row at the top of the table.
6. Adjust the table positioning to be displayed on the chart.
7. Option to change text size in the table cells. This will also increase/decrease the size of the table.
Risk Disclaimer
This indicator is for educational and informational purposes only and does not constitute financial advice. All trading and investment decisions remain solely the responsibility of the user.
Trading involves a high degree of risk, and past performance is not indicative of future results.
Always conduct your own research and consult with a qualified financial professional before making any trading decisions.
By using this indicator, users acknowledge they understand these risks and accept full responsibility for their trading decisions and outcomes.
SMT (ICT Concepts)Overview
Smart Money Technique (SMT) Divergence is a price action analysis method derived from Inner Circle Trader (ICT) methodology. This indicator automatically detects SMT divergences by comparing price movements across correlated financial instruments, identifying moments when assets that typically move together begin to diverge - a phenomenon often associated with potential price reversals.
An SMT divergence occurs when one instrument makes a new swing high or low while a correlated instrument fails to confirm that move. This failure to confirm suggests that the instrument may be positioning for a reversal, as the divergence indicates a lack of conviction in the current price direction across related markets.
Theoretical Foundation
What is SMT Divergence?
In correlated markets, instruments tend to move in tandem. For example, the E-mini S&P 500 (ES) and E-mini Nasdaq 100 (NQ) futures typically make swing highs and lows together due to their shared exposure to U.S. equity markets. When this correlation breaks down at key swing points, it creates an SMT divergence.
Bullish SMT Divergence:
The chart instrument creates a lower low compared to a previous swing low, while the correlated comparison instrument creates a higher low (or fails to make a lower low). This divergence at the lows suggests potential buying pressure and a possible bullish reversal.
Bearish SMT Divergence:
The chart instrument creates a higher high compared to a previous swing high, while the correlated comparison instrument creates a lower high (or fails to make a higher high). This divergence at the highs suggests potential selling pressure and a possible bearish reversal.
Why SMT Divergences Matter
SMT divergences are considered significant because they may indicate:
Accumulation or distribution occurring in one instrument but not the other
Relative strength or weakness between correlated assets
Potential exhaustion of the current trend
Early warning signs before major reversals
Indicator Features
Multi-Timeframe SMT Detection
This indicator provides simultaneous SMT detection on two timeframes:
Current Timeframe (CTF) Detection:
The indicator scans for SMT divergences on the chart's active timeframe using multiple pivot lookback periods (3, 5, 8, 13, 21, and 34 bars). This multi-period approach ensures detection of both short-term and intermediate swing points, reducing the likelihood of missing valid divergences while filtering out noise.
Higher Timeframe (HTF) Detection:
Simultaneously, the indicator monitors a higher timeframe for SMT divergences using pivot periods of 3, 5, 8, 13, and 21 HTF candles. Higher timeframe signals generally carry more significance as they represent larger market structure.
Automatic Timeframe Pairing:
When enabled, the indicator automatically selects an appropriate higher timeframe based on your chart's current timeframe:
Sub-1 minute charts pair with 5-minute
1-2 minute charts pair with 15-minute
3-4 minute charts pair with 30-minute
5 minute charts pair with 1-hour
6-9 minute charts pair with 1-hour
15 minute charts pair with 4-hour
16-59 minute charts pair with Daily
1-4 hour charts pair with Weekly
Daily charts pair with Monthly
Combined Signal Detection:
When an SMT divergence is detected on both the current timeframe and higher timeframe at the same price pivots, the indicator combines these into a single enhanced signal. Combined signals display both timeframes in the label and use the higher timeframe styling to emphasize their increased significance.
Automatic Symbol Correlation
The indicator includes comprehensive automatic symbol selection based on the instrument you are viewing. When Auto SMT is enabled, the indicator intelligently selects correlated comparison symbols.
Index Futures Correlations:
E-mini Contracts:
NQ (Nasdaq 100) compares with ES (S&P 500) and YM (Dow Jones)
ES (S&P 500) compares with NQ (Nasdaq 100) and YM (Dow Jones)
YM (Dow Jones) compares with NQ (Nasdaq 100) and ES (S&P 500)
RTY (Russell 2000) compares with ES (S&P 500) and NQ (Nasdaq 100)
Micro Contracts:
MNQ (Micro Nasdaq) compares with MES (Micro S&P) and MYM (Micro Dow)
MES (Micro S&P) compares with MNQ (Micro Nasdaq) and MYM (Micro Dow)
MYM (Micro Dow) compares with MNQ (Micro Nasdaq) and MES (Micro S&P)
M2K (Micro Russell) compares with MES (Micro S&P) and MNQ (Micro Nasdaq)
Metals Futures Correlations:
Standard Contracts:
GC (Gold) compares with SI (Silver) and PL (Platinum)
SI (Silver) compares with GC (Gold) and PL (Platinum)
PL (Platinum) compares with GC (Gold) and SI (Silver)
Micro Contracts:
MGC (Micro Gold) compares with SIL (Micro Silver) and PL (Platinum)
SIL (Micro Silver) compares with MGC (Micro Gold) and PL (Platinum)
Energy Futures Correlations:
CL (Crude Oil) compares with RB (RBOB Gasoline) and NG (Natural Gas)
RB (RBOB Gasoline) compares with CL (Crude Oil) and NG (Natural Gas)
NG (Natural Gas) compares with CL (Crude Oil) and RB (RBOB Gasoline)
MCL (Micro Crude) compares with RB (RBOB Gasoline) and NG (Natural Gas)
Major ETF Correlations:
SPY (S&P 500 ETF) compares with QQQ, DIA, and IWM
QQQ (Nasdaq 100 ETF) compares with SPY, DIA, and IWM
DIA (Dow Jones ETF) compares with SPY, QQQ, and IWM
IWM (Russell 2000 ETF) compares with SPY, QQQ, and DIA
Stock Sector Mapping:
When viewing individual stocks, the indicator automatically identifies the stock's sector and selects appropriate sector ETFs for comparison:
Technology Sector (AAPL, MSFT, GOOGL, NVDA, AMD, INTC, etc.):
Primary: QQQ (Nasdaq 100 ETF)
Secondary: XLK (Technology Select Sector SPDR)
Tertiary: SPY (S&P 500 ETF)
Financial Sector (JPM, BAC, GS, MS, WFC, etc.):
Primary: XLF (Financial Select Sector SPDR)
Secondary: KBE (SPDR S&P Bank ETF)
Tertiary: SPY (S&P 500 ETF)
Energy Sector (XOM, CVX, COP, SLB, etc.):
Primary: XLE (Energy Select Sector SPDR)
Secondary: USO (United States Oil Fund)
Tertiary: SPY (S&P 500 ETF)
Healthcare Sector (JNJ, UNH, PFE, MRK, LLY, etc.):
Primary: XLV (Health Care Select Sector SPDR)
Secondary: IBB (iShares Biotechnology ETF)
Tertiary: SPY (S&P 500 ETF)
Consumer Discretionary Sector (TSLA, HD, NKE, MCD, etc.):
Primary: XLY (Consumer Discretionary Select Sector SPDR)
Secondary: SPY (S&P 500 ETF)
Tertiary: QQQ (Nasdaq 100 ETF)
Consumer Staples Sector (PG, KO, PEP, WMT, COST, etc.):
Primary: XLP (Consumer Staples Select Sector SPDR)
Secondary: SPY (S&P 500 ETF)
Tertiary: QQQ (Nasdaq 100 ETF)
Industrial Sector (CAT, BA, HON, UPS, etc.):
Primary: XLI (Industrial Select Sector SPDR)
Secondary: SPY (S&P 500 ETF)
Tertiary: QQQ (Nasdaq 100 ETF)
Materials Sector (LIN, APD, SHW, FCX, NEM, etc.):
Primary: XLB (Materials Select Sector SPDR)
Secondary: GLD (SPDR Gold Shares)
Tertiary: SPY (S&P 500 ETF)
Utilities Sector (NEE, DUK, SO, etc.):
Primary: XLU (Utilities Select Sector SPDR)
Secondary: SPY (S&P 500 ETF)
Tertiary: QQQ (Nasdaq 100 ETF)
Real Estate Sector (AMT, PLD, CCI, etc.):
Primary: XLRE (Real Estate Select Sector SPDR)
Secondary: VNQ (Vanguard Real Estate ETF)
Tertiary: SPY (S&P 500 ETF)
Communication Services Sector (NFLX, DIS, CMCSA, VZ, T, etc.):
Primary: XLC (Communication Services Select Sector SPDR)
Secondary: SPY (S&P 500 ETF)
Tertiary: QQQ (Nasdaq 100 ETF)
Forex Correlations:
EURUSD compares with GBPUSD
GBPUSD compares with EURUSD
Cryptocurrency Correlations:
BTCUSD compares with ETHUSD
ETHUSD compares with BTCUSD
Three-Symbol Comparison
The indicator supports comparison against up to three symbols simultaneously. When multiple comparison symbols show divergence at the same pivot point, all diverging symbols are displayed in the label, providing stronger confluence. For example, if NQ shows divergence with both ES and YM at the same swing high, the label will display "ES1! + YM1!" indicating divergence confirmation from multiple correlated instruments.
Invalidation Logic
SMT divergences are not indefinitely valid. The indicator includes automatic invalidation logic based on price action following the divergence signal.
Invalidation Rules:
Bearish SMT: Invalidates when price trades above the high of the confirmation pivot (right side of the divergence)
Bullish SMT: Invalidates when price trades below the low of the confirmation pivot (right side of the divergence)
The invalidation level is set at the confirmation bar (the second pivot that completes the SMT pattern), not the extreme of both pivots. This approach aligns with the concept that once price exceeds the confirmation point, the divergence setup is no longer valid.
Invalidation Display Options:
Users can choose to show or hide invalidated SMT signals separately for current timeframe and higher timeframe divergences. When shown, invalidated signals can be displayed with different line styles and widths to visually distinguish them from active signals. Separate limits prevent excessive invalidated signals from cluttering the chart (maximum 15 invalidated signals per timeframe type).
Input Settings
General Settings
Enable SMT Detection:
Master toggle to enable or disable all SMT divergence detection. When disabled, no SMT signals will be calculated or displayed.
Direction:
Filter which divergence types to display:
Both: Display both bullish and bearish SMT divergences
Bullish: Display only bullish SMT divergences (divergence at lows)
Bearish: Display only bearish SMT divergences (divergence at highs)
Symbol Settings
Enable Auto SMT:
When enabled, the indicator automatically selects correlated comparison symbols based on the chart instrument using the correlation mappings described above. When disabled, manual symbol inputs are used.
Symbol 1 (with enable toggle):
First comparison symbol. Enabled by default. When Auto SMT is disabled, enter the desired symbol manually.
Symbol 2 (with enable toggle):
Second comparison symbol. Enabled by default. When Auto SMT is disabled, enter the desired symbol manually.
Symbol 3 (with enable toggle):
Third comparison symbol. Disabled by default. Enable for additional confirmation from a third correlated instrument.
Current Timeframe SMT Settings
Show Current TF SMTs:
Toggle visibility of SMT divergences detected on the chart's current timeframe.
Bullish Color:
Color for bullish SMT divergence lines and labels on the current timeframe.
Bearish Color:
Color for bearish SMT divergence lines and labels on the current timeframe.
Line Style:
Style for current timeframe SMT lines (solid, dashed, or dotted).
Line Width:
Width of current timeframe SMT lines (1-4 pixels).
Show Labels:
Toggle visibility of labels on current timeframe SMT divergences.
Label Style:
Normal: Displays full information including timeframe and diverging symbol names
+/-: Displays minimal "+" or "-" characters with full information available in hover tooltip
Label Size:
Size of current timeframe SMT labels (Tiny, Small, Normal, or Large).
Show Invalidated:
Toggle visibility of invalidated current timeframe SMT signals.
Invalidated Line Style:
Line style for invalidated current timeframe SMT signals.
Invalidated Line Width:
Line width for invalidated current timeframe SMT signals.
Higher Timeframe SMT Settings
Show Higher TF SMTs:
Toggle visibility of SMT divergences detected on the higher timeframe.
Auto Timeframe:
When enabled, automatically selects an appropriate higher timeframe based on the chart's current timeframe. When disabled, uses the manually specified timeframe.
Manual Timeframe:
When Auto Timeframe is disabled, specify the higher timeframe to scan for SMT divergences.
Bullish Color:
Color for bullish SMT divergence lines and labels on the higher timeframe.
Bearish Color:
Color for bearish SMT divergence lines and labels on the higher timeframe.
Line Style:
Style for higher timeframe SMT lines (solid, dashed, or dotted).
Line Width:
Width of higher timeframe SMT lines (1-4 pixels).
Show Labels:
Toggle visibility of labels on higher timeframe SMT divergences.
Label Style:
Normal: Displays full information including timeframe and diverging symbol names
+/-: Displays minimal "+" or "-" characters with full information available in hover tooltip
Label Size:
Size of higher timeframe SMT labels (Tiny, Small, Normal, or Large).
Show Invalidated:
Toggle visibility of invalidated higher timeframe SMT signals.
Invalidated Line Style:
Line style for invalidated higher timeframe SMT signals.
Invalidated Line Width:
Line width for invalidated higher timeframe SMT signals.
Visual Representation
Line Display
SMT divergences are displayed as lines connecting the two pivot points that form the divergence:
For bearish SMT: A line connects the previous swing high to the current (higher) swing high
For bullish SMT: A line connects the previous swing low to the current (lower) swing low
The line color indicates the divergence type (bullish or bearish) and whether it was detected on the current timeframe or higher timeframe.
Label Display
Labels are positioned at the midpoint of the SMT line and display:
The timeframe on which the divergence was detected
The symbol(s) that showed divergence with the chart instrument
When using the "+/-" label style, labels show only "+" for bullish or "-" for bearish divergences, with full information accessible via hover tooltip.
All labels use monospace font formatting for consistent visual appearance.
Combined Signals
When the same divergence is detected on both current and higher timeframes, the signals are combined into a single display using higher timeframe styling. The label shows both timeframes (e.g., "M2 + M15") and all diverging symbols, indicating strong multi-timeframe confluence.
Practical Application Guidelines
Signal Interpretation
SMT divergences should be interpreted within the broader market context. Consider the following when evaluating signals:
Market Structure: SMT divergences occurring at key structural levels (previous highs/lows, order blocks, fair value gaps) tend to be more significant.
Timeframe Confluence: Signals appearing on multiple timeframes simultaneously suggest stronger institutional involvement.
Symbol Confluence: Divergences confirmed by multiple comparison symbols indicate broader market disagreement with the current price direction.
Time of Day: SMT divergences during high-volume trading sessions may carry more weight than those during low-liquidity periods.
Limitations and Considerations
Correlation Variability: Correlations between instruments can strengthen or weaken over time. The automatic symbol selection is based on typical correlations but may not always reflect current market conditions.
Pivot Detection Lag: Pivots are only confirmed after subsequent price action, meaning SMT signals appear with some delay after the actual swing point forms.
False Signals: Not all SMT divergences result in reversals. Use additional confirmation methods and proper risk management.
Data Requirements: The indicator requires sufficient historical data and may not function properly on instruments with limited price history.
Technical Notes
The indicator uses multiple pivot detection periods to identify swing points across different scales
Higher timeframe candle tracking is performed on the lower timeframe chart for precise pivot bar indexing
A deduplication system prevents the same divergence from being detected multiple times across different pivot periods
Array-based storage manages active and invalidated SMT signals with automatic cleanup to prevent memory issues
Maximum label and line counts are set to 500 each to accommodate extended analysis periods
Disclaimer
This indicator is provided for educational and informational purposes only. It is designed to assist traders in identifying potential SMT divergences based on historical price data and should not be considered as financial advice or a recommendation to buy or sell any financial instrument.
Trading financial markets involves substantial risk of loss and is not suitable for all investors. Past performance of any trading methodology, including concepts discussed in this indicator, does not guarantee future results. Users should conduct their own research and analysis before making any trading decisions.
The automatic symbol correlations and sector mappings are based on general market relationships and may not accurately reflect current or future correlations. Users are encouraged to verify correlations independently and adjust comparison symbols as needed.
Always use appropriate risk management techniques, including but not limited to position sizing and stop-loss orders. Never risk more capital than you can afford to lose.
Single Candle Divergence E.V//AMarks single‑candle divergences between the asset on your chart and any user‑selectable second asset, displaying the second asset’s full OHLC candles in a dedicated separate panel.
SMT Divergence - Time & Calendar CyclesOverview
This indicator is a tool designed to detect SMT Divergences across multiple market structures.
It operates on a Dual-Layer Logic, which filters, ranks, and renders divergences based on specific, adjustable Time Cycles (e.g., 90-minute, or 30-minute rolling windows) and Calendar Cycles (e.g., Daily, or Weekly structure).
1. Core Concept: Automated SMT Detection
SMT Divergences occur when correlated instruments fail to confirm each other's price action at key structural pivots. For example, if the Nasdaq (NQ) makes a higher high while the S&P 500 (ES) fails to do so, that can be considered a SMT Divergence , this discrepancy in correlation could indicate a potential shift in structural momentum and a weakening of the prevailing trend.
This indicator automates this analysis by comparing the Main Chart against up to three user-defined Comparison Symbols. It supports:
Direct Correlation: Identifies standard divergences between positively correlated assets where one fails to confirm the other's new high or low (e.g., NQ vs. ES).
Inverse Correlation: Accounts for negative correlation to detect failures in symmetry, such as when the Main Chart makes a Higher High but the Inverse Symbol fails to make the expected Lower Low (e.g., EURUSD vs. DXY).
Cross Symbol vs. Symbol: Logic that cross-verifies comparison symbols against each other to find internal market weakness, even if the main chart is currently neutral (e.g., Symbol 1 vs. Symbol 2).
2. How It Works: Technical Architecture
To accurately map market structure, the indicator uses a specific technical method to handle data synchronization and structure storage:
A. Data Synchronization
The tool utilizes 'request.security' targeting the current chart's resolution (native timeframe) to retrieve comparison data of the other symbol. This method enforces strict bar-by-bar alignment between the main symbol and the comparison symbol, preventing the access of future data (lookahead bias) and ensuring historical data integrity.
B. Pivot Arrays
The script identifies significant swing points and stores them in custom arrays. It iterates through these arrays to compare the current price structure against historical structures stored in memory.
The array storage and comparison logic operates in two distinct modes depending on the cycle type:
2.1 Time Cycles (Intraday Analysis)
Targeting specific, adjustable time windows like 90-minute or 30-minute cycles.
Session Bound: These cycles are strictly bound to a user-defined trading session (e.g., 09:30 - 16:00).
Continuous Roll: They repeat continuously throughout the window until the session ends.
Session Reset: At the start of every new session, calculation data resets to ensure signals reflect only the current session, while preserving all historical lines on the chart.
2.2 Calendar Cycles (Macro Analysis)
Targeting Higher Timeframe (HTF) structural analysis (Daily, Weekly, Monthly, Quarterly, and Yearly).
Persistent Data: Unlike Time Cycles, Calendar Cycles utilize persistent data arrays that survive session resets.
Calculation Mode: "Exchange Session" prevents ghost lines on Futures, while "Input Timezone" enforces strict midnight resets for Crypto/CFDs.
3. The Unified SMT Visualization
The indicator provides a Composite Visualization , unifying micro (Intraday) and macro (Calendar) analysis by simultaneously projecting divergence signals onto a single chart view.
Live vs. Historical Logic:
The Live Feed (Dynamic State): This is the only component where repainting occurs. Signals within the current active cycle are temporary and self-correcting:
Updates: If the price pushes to a new extreme within the open cycle, the SMT line automatically redraws to the new High/Low.
Invalidation: If the Comparison Symbol eventually breaks its structure ("catches up") before the cycle closes, the divergence is no longer valid, and the signal is removed.
Example: In a 90-minute Time Cycle, a signal might form at minute 30. If the Comparison Symbol confirms the move at minute 45, the signal is invalidated. If the divergence holds until minute 90, it becomes permanent.
The Historian (Permanent Record):
Once a cycle closes, the final state is locked. Validated signals are transferred to the historical array and will never change (non-repainting).
4. Key Features & Capabilities
4.1 Multi-Symbol & Correlation
Triple-Check Logic: Capable of comparing the Main Chart against Symbol 1, Symbol 2, and Symbol 3 simultaneously.
Cross-Symbol Check: The script can optionally validate Symbol 1 against Symbol 2 (e.g., checking ES vs. YM) and plot the result on your main chart, providing a broader market view.
4.2 Structural Range Validation
The script includes strict validation logic to ensure high-quality data. It automatically verifies that the detected highs and lows are the true extremes of the cycle range.
Lookback Cycles: Users define the exact number of preceding historical cycles the current structure must be compared against (e.g., comparing against the last 9 cycles), allowing for customization of structural depth.
4.3 Professional Drawing & Chart Management
Visual Collision Detection: The script uses Coordinate Tracking to store the start and end points of every rendered divergence. If a lower timeframe cycle attempts to draw over an existing higher-priority structure, the logic compares their coordinates and suppresses the lower-priority signal to prevent visual clutter.
Data Integrity: The script automatically validates cycle duration to ensure signals do not span across abnormal time gaps or missing data.
Memory Optimization: The script actively manages internal memory to prevent execution limits, allowing for deep backtesting history even on lower timeframes.
4.4 Structural Parameters
Furthest / Nearest Mode: Determines which specific pivot to target when multiple candidates exist within the same search window.
Furthest: Targets the extreme point furthest back in time within the cycle range (captures the widest possible structure).
Nearest: Targets the most recent valid pivot (captures the tightest, most immediate structure).
Anchor Mode: Controls exactly where the divergence line connects:
Structural: Always connects to the Main Chart's pivot High/Low.
Snap to Aggressor: The precision method. The line "snaps" to the exact candle where the structure was broken first, whether on the Main Chart or the Comparison Symbol.
Cycle Boundary Overlap: Controls how the transition candle is handled between time cycles (Overlap On vs. Clean Start).
4.5 Full Customization
Adaptive & Custom Coloring: Labels automatically adjust to background brightness for optimal readability. Includes a manual override for user-defined color preferences.
Visual Control: Fully customizable line styles, widths, and colors for every individual cycle.
5. How To Use This Tool
Configuration: Set your Timezone and Session Start/End times in the settings. This ensures "Time Cycles" align with your specific market.
Select Symbols: Input your comparison symbols (e.g., ES, YM, or inversely DXY). Crucial: Ensure the "Inverse" toggle is checked for negatively correlated assets.
Cycle Selection: Enable the specific cycles relevant to your strategy (e.g., Daily + 90-minutes).
Render History: Scroll the chart back to the beginning of your available price history after loading the indicator or changing timeframes to process maximum historical data.
Interpretation:
Bearish SMT: Price makes a Higher High, but the correlated asset makes a Lower High. This divergence could indicate a potential shift in structural momentum and a weakening of the prevailing uptrend.
Bullish SMT: Price makes a Lower Low, but the correlated asset makes a Higher Low. This divergence could indicate a potential shift in structural momentum and a weakening of the prevailing downtrend.
Disclaimer
This indicator is designed for educational purposes only. It does not constitute financial advice or a recommendation to trade. Trading involves risk, and past performance does not guarantee future results.
Smart Money Time by TMUSMT-Integrated Institutional Structure
This solution addresses a critical limitation in retail technical analysis: Fractal Blindness. While standard indicators operate linearly on a single timeframe, this script utilizes a Synchronous Multi-Timeframe (MTF) Architecture combined with SMT (Smart Money Time) logic to overlay higher-order market structure directly onto your execution chart.
It is engineered to align your entry triggers with the dominant institutional trend, effectively filtering out counter-trend noise that often leads to liquidity sweeps.
Core Technology: The "Fractal-Sync" Engine
1. Hierarchical Trend Propagation (MTF Logic) The script performs a real-time request.security analysis of user-selected higher timeframes to determine the "True State" of the market.
The Mechanism: Instead of repainting historical data, the algorithm uses a Step-Locked logic. It projects the confirmed Swing Highs and Lows of the Higher Timeframe (e.g., 4H) onto your Lower Timeframe (e.g., 5m or 15m).
Practical Value: You instantly visualize the "Big Picture" bias without switching tabs, ensuring your local trades are aligned with the global flow.
2. SMT-Grade Pivot Detection Integrating concepts from Smart Money analysis, the indicator identifies Key Swing Points that have a high probability of defense by large operators.
Technique: By calculating volatility-adjusted deviations (ATR) across multiple timeframes, the script distinguishes between a standard "pullback" and a genuine Structure Shift (MSS) or Break of Structure (BOS).
Benefit: It visually separates weak internal structure (inducement) from strong external structure (protected levels).
Technical Specifications & Filters
To satisfy strict stability requirements and provide objective signals, the engine incorporates unique validation methods:
Volatility Normalization: Structure breaks are validated against a dynamic ATR threshold. This ensures that low-volume consolidation does not trigger false structural resets.
Candle-Close Validation Protocol: A level is considered breached only if the candle body closes beyond the pivot. This filters out "Wick Fakeouts" and Stop-Hunts often seen during news events.
Conflict Resolution: When the Lower Timeframe trend contradicts the Higher Timeframe structure, the indicator visualizes this as a "Retracement Phase," advising caution.
Operational Workflow
This tool acts as a Market Context Filter, not a simple signal generator:
Trend Alignment: Use the visual cues to instantly recognize the dominant institutional flow.
Zone Identification: The script automatically plots "Strong Lows" (Invalidation Points) and "Weak Highs" (Targets).
Execution: Seek entries on your timeframe only when the higher timeframe structure (shown by this script) confirms the direction.
Note for Professional Use: This script is designed for precision execution. It minimizes chart clutter by displaying only confirmed structural points, providing a clean, logic-driven workspace for objective decision-making.
SMT [Advanced] by TMUThis is a proprietary technical analysis tool designed to detect SMT (Smart Money Time) Divergences with a specific focus on Time-Cycle Theory and advanced Data Visualization.
Originality & Technical Uniqueness Unlike standard open-source SMT indicators that simply compare Highs/Lows and clutter the chart with overlapping text, this script utilizes a custom-built "Label Registry & Stacking Engine". Standard indicators often fail when multiple divergences occur simultaneously on different timeframes. This script solves this problem using a proprietary deferred rendering algorithm:
Registry System: Instead of drawing signals immediately, the script calculates potential divergences across multiple assets/timeframes and pushes them into a dynamic array (registry).
Dynamic Stacking: A background sorting algorithm processes this stack every bar, groups signals by their timestamp and type, and renders them with calculated offsets. This ensures labels never overlap, providing a clean, professional workspace impossible to achieve with basic plotting functions.
Signal Rotation: It implements a "rotation manager" logic for 90-minute cycles. As price action evolves, the script automatically assesses whether to update an existing divergence line or create a new historical reference, keeping the analysis strictly relevant to the current cycle structure.
How it Works (Methodology) The script performs a relative strength analysis between two correlated assets (e.g., ES vs. YM) using request.security to fetch comparative data.
Pivot Analysis: It identifies structural Pivot Highs and Lows based on a configurable length, filtering out minor internal noise.
Divergence Logic:
Bearish SMT: Validated when the primary asset makes a Higher High while the comparison asset makes a Lower High.
Bullish SMT: Validated when the primary asset makes a Lower Low while the comparison asset makes a Higher Low.
Time-Cycle Isolation: The analysis is confined within strictly defined temporal windows (Daily, Weekly, and custom 90-minute intraday blocks). The script detects cracks in correlation specifically within these isolated sessions rather than looking at infinite history.
Features
Smart Filter: Advanced logic to filter out "Internal" structure and focus only on major external pivot breaches.
Multi-Cycle Dashboard: A real-time table monitoring the SMT status of Monthly, Weekly, Daily, and intraday cycles simultaneously.
Auto-Ticker Selection: Automatically detects the current asset class (Indices/Forex) and selects the appropriate comparison symbol (e.g., selects YM when viewing ES).
Settings
Comparisons: Manual or Auto-ticker selection.
Visuals: Custom colors, line styles, and label positioning modes.
Alerts: Customizable alerts for valid SMT formation on any monitored timeframe.
Aurora Reversal Suite: Liquidity & Inversion ModelConcept & Methodology The Aurora Reversal Suite is not a general-purpose indicator; it is a hard-coded algorithmic implementation of a specific institutional reversal model often referred to as the "2022 Mentorship Model" or "Sweep-to-Inversion" setup.
While many scripts display Liquidity Sweeps or Fair Value Gaps individually, this script solves the problem of "confluence fatigue" by algorithmically enforcing a strict order of operations. It does not alert on every sweep; it alerts only when a specific sequence of price action events occurs in a verified order.
The Algorithmic Logic (How it Works) The core value of this script lies in its conditional filtering logic, which automates the following manual verification process:
Event A: Liquidity Sweep
The script first monitors key institutional levels: Previous Day High/Low, Session High/Low (Asia/London/NY), and dynamic Swing Points.
It detects a "Sweep" event when price breaches a level but fails to close beyond it (or closes back inside within a defined lookback period).
Event B: Displacement & Inversion
Unlike standard FVG indicators, this script searches specifically for Inversion FVGs (iFVG) that form immediately following the sweep event.
The script logic requires that the iFVG be created by the displacement leg that reverses the sweep. This binds the "Entry Signal" directly to the "Liquidity Event."
Event C: Algorithmic Filtering (The "Strict" Mode)
To filter out false positives common in choppy markets, the script applies a multi-layer filter before printing a signal:
Volume Qualification: The signal bar's volume must exceed a user-defined multiple of the N-period average volume (default 1.5x) to confirm institutional participation.
SMT Divergence Filter: The script cross-references a correlated asset (e.g., NQ vs. ES or EU vs. DXY). If enabled, a signal is only valid if the correlated asset failed to make a matching high/low at the moment of the sweep (SMT Divergence).
Bias Alignment: The script calculates directional bias using a waterfall logic (Daily > 4H > 1H). Signals counter to this calculated bias are suppressed in "Strict" mode.
Included Features & Components
Automated Market Structure: Real-time labeling of BOS (Break of Structure) and MSS (Market Structure Shift) based on swing point logic.
Session Killzones: Visual boxes for Asia, London, and NY sessions with auto-extending high/low lines to track session liquidity.
Multi-Timeframe Dashboard: A calculated table displaying the trend state of the Daily, 4H, and 1H timeframes to assist with top-down analysis.
Power of 3 (PO3) Overlay: Visualization of higher-timeframe candle geometry on lower-timeframe charts to identify accumulation/distribution phases.
Why This Mashup is Necessary Attempting to trade this specific reversal model using separate indicators results in chart clutter and conflicting signals. By combining the Sweep detection, iFVG creation, and SMT filtering into a single codebase, we can programmatically eliminate "naked" sweeps that have no displacement, providing a cleaner and more objective view of the market structure.
Settings & Customization
Signal Mode: Choose between "Simple" (Price Action only) or "Strict" (Trend + Volume filtered).
SMT Input: Manually define the correlated asset ticker for divergence checks.
Visuals: Fully customizable colors for Bullish/Bearish scenarios to fit light or dark themes.
Disclaimer This script is a tool for market analysis and does not guarantee future results. It is intended to assist traders in identifying high-probability setups based on historical price action concepts.
Multi-TimeCycle SMT Live DetectorThis indicator is a multi-asset, multi-timeframe SMT Live detector designed to work on any symbol (indices, futures, FX, crypto, stocks).
It compares your chart symbol against up to two custom comparison symbols and automatically detects bullish and bearish SMT divergences across:
90-minute session blocks (Asia, London, NY – with internal 90m sessions)
60-minute (hourly) cycles
30-minute cycles
10-minute cycles
3-minute cycles
Each SMT is plotted as a line between the reference high/low and the current high/low, with a clear text label showing:
Timecycle (90m / 60m / 30m / 10m / 3m)
Which comparison asset(s) created the divergence (e.g., ES, YM, ES/YM or your custom labels)
The 90-minute SMT module is session-aware using New York time:
Asia: 18:00 – 02:29 NY time
London A/M/D
NY AM A/M/D
NY PM A/M/D
AssetCorrelationLibraryLibrary "AssetCorrelationLibrary™"
detectIndicesFutures(ticker)
Detects Index Futures (NQ/ES/YM/RTY + micro variants)
Parameters:
ticker (string) : The ticker string to check (typically syminfo.ticker)
Returns: AssetPairing with secondary and tertiary assets configured
detectMetalsFutures(ticker)
Detects Metal Futures (GC/SI/HG + micro variants)
Parameters:
ticker (string) : The ticker string to check
Returns: AssetPairing with secondary and tertiary assets configured
detectForexFutures(ticker)
Detects Forex Futures (6E/6B + micro variants)
Parameters:
ticker (string) : The ticker string to check
Returns: AssetPairing with secondary and tertiary assets configured
detectEnergyFutures(ticker)
Detects Energy Futures (CL/RB/HO + micro variants)
Parameters:
ticker (string) : The ticker string to check
Returns: AssetPairing with secondary and tertiary assets configured
detectTreasuryFutures(ticker)
Detects Treasury Futures (ZB/ZF/ZN)
Parameters:
ticker (string) : The ticker string to check
Returns: AssetPairing with secondary and tertiary assets configured
detectForexCFD(ticker, tickerId)
Detects Forex CFD pairs (EUR/GBP/DXY, USD/JPY/CHF triads)
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID (syminfo.tickerid) for primary asset
Returns: AssetPairing with secondary and tertiary assets configured
detectCrypto(ticker, tickerId)
Detects major Crypto assets (BTC, ETH, SOL, XRP, alts)
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with secondary and tertiary assets configured
detectMetalsCFD(ticker, tickerId)
Detects Metals CFD (XAU/XAG/Copper)
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with secondary and tertiary assets configured
detectIndicesCFD(ticker, tickerId)
Detects Indices CFD (NAS100/SP500/DJ30)
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with secondary and tertiary assets configured
detectEUStocks(ticker, tickerId)
Detects EU Stock Indices (GER40/EU50) - Dyad only
Parameters:
ticker (string) : The ticker string to check
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with secondary asset configured (tertiary empty for dyad)
getDefaultFallback(tickerId)
Returns default fallback assets (chart ticker only, no correlation)
Parameters:
tickerId (string) : The full ticker ID for primary asset
Returns: AssetPairing with chart ticker as primary, empty secondary/tertiary (no correlation)
applySessionModifierWithBackadjust(tickerStr, sessionType)
Applies futures session modifier to ticker WITH back adjustment
Parameters:
tickerStr (string) : The ticker to modify
sessionType (string) : The session type (syminfo.session)
Returns: Modified ticker string with session and backadjustment.on applied
applySessionModifierNoBackadjust(tickerStr, sessionType)
Applies futures session modifier to ticker WITHOUT back adjustment
Parameters:
tickerStr (string) : The ticker to modify
sessionType (string) : The session type (syminfo.session)
Returns: Modified ticker string with session and backadjustment.off applied
isTriadMode(pairing)
Checks if a pairing represents a valid triad (3 assets)
Parameters:
pairing (AssetPairing) : The AssetPairing to check
Returns: True if tertiary is non-empty (triad mode), false for dyad
getAssetTicker(tickerId)
Extracts clean ticker string from full ticker ID
Parameters:
tickerId (string) : The full ticker ID (e.g., "BITGET:BTCUSDT.P")
Returns: Clean ticker string (e.g., "BTCUSDT.P")
resolveTriad(chartTickerId, pairing)
Resolves triad asset assignments with proper inversion flags
Parameters:
chartTickerId (string) : The current chart's ticker ID (syminfo.tickerid)
pairing (AssetPairing) : The detected AssetPairing
Returns: Tuple
resolveDyad(chartTickerId, pairing)
Resolves dyad asset assignment with proper inversion flag
Parameters:
chartTickerId (string) : The current chart's ticker ID
pairing (AssetPairing) : The detected AssetPairing (dyad: tertiary is empty)
Returns: Tuple
resolveAssets(ticker, tickerId, assetType, sessionType, useBackadjust)
Main auto-detection entry point. Detects asset category and returns fully resolved config.
Parameters:
ticker (string) : The ticker string to check (typically syminfo.ticker)
tickerId (string) : The full ticker ID (typically syminfo.tickerid)
assetType (string) : The asset type (typically syminfo.type)
sessionType (string) : The session type for futures (typically syminfo.session)
useBackadjust (bool) : Whether to apply back adjustment for futures session alignment
Returns: AssetConfig with fully resolved assets, inversion flags, and detection status
resolveCurrentChart()
Simplified auto-detection using current chart's syminfo values
Returns: AssetConfig with fully resolved assets, inversion flags, and detection status
AssetPairing
Core asset pairing structure for triad/dyad configurations
Fields:
primary (series string) : The primary (chart) asset ticker ID
secondary (series string) : The secondary correlated asset ticker ID
tertiary (series string) : The tertiary correlated asset ticker ID (empty for dyad)
invertSecondary (series bool) : Whether secondary asset should be inverted for divergence calc
invertTertiary (series bool) : Whether tertiary asset should be inverted for divergence calc
AssetConfig
Full asset resolution result with mode detection and computed values
Fields:
detected (series bool) : Whether auto-detection succeeded
isTriadMode (series bool) : True if triad (3 assets), false if dyad (2 assets)
primary (series string) : The resolved primary asset ticker ID
secondary (series string) : The resolved secondary asset ticker ID
tertiary (series string) : The resolved tertiary asset ticker ID (empty for dyad)
invertSecondary (series bool) : Computed inversion flag for secondary asset
invertTertiary (series bool) : Computed inversion flag for tertiary asset
assetCategory (series string) : String describing the detected asset category
Note to potential users.
I did not really intend to make this public but i have to in order to avoid any potential compliance issues with the TradingView Moderation Team and the House Rules.
However if you are to use this library, you cannot make your code closed source / invite only as it is intellectual property. The only exception to this is if I am credited in the header of your code and i explicitly give permission to do so.
As per the TradingView house rules, you are completely FREE to do with this as you like, provided the script stays private.
Use the @fstarcapital tag to give credits
❤️ from cephxs
Liquidity Sweep & FVG StrategyThis strategy combines higher-timeframe liquidity levels, stop-hunt (sweep) logic, Fair Value Gaps (FVGs) and structure-based take-profits into a single execution engine.
It is not a simple mash-up of indicators: every module (HTF levels, sweeps, FVGs, ZigZag, sessions) feeds the same entry/exit logic.
1. Core Idea
The script looks for situations where price:
Sweeps a higher-timeframe high/low (takes liquidity around obvious levels),
Then forms a displacement candle with a gap (FVG) in the opposite direction,
Then uses the edge of that FVG as a limit entry,
And manages exits using unswept structural levels (ZigZag swings or HTF levels) as targets.
The intent is to systematically trade failed breakouts / stop hunts with a defined structure and risk model.
It is a backtesting / study tool, not a signal service.
2. How the Logic Works (Conceptual)
a) Higher-Timeframe Liquidity Engine
Daily, Weekly and Monthly highs/lows are pulled via request.security() and stored as HTF liquidity levels.
Each level is drawn as a line with optional label (1D/1W/1M High/Low).
A level is marked as “swept” once price trades through it; swept levels may be removed or shortened depending on settings.
b) Sweep & Manipulation Filter
A low sweep occurs when the current low trades through a stored HTF low.
A high sweep occurs when the current high trades through a stored HTF high.
If both a high and a low are swept in the same bar, the script flags this as “manipulation” and blocks new entries around that noise.
The script also tracks the sweep wick, bar index and HTF timeframe for later use in SL placement and labels.
c) FVG Detection & Management
FVGs are defined using a 3-candle displacement model:
Bullish FVG: high < low
Bearish FVG: low > high
Only gaps larger than a minimum size (ATR-based if no manual value is set) are kept.
FVGs are stored in arrays as boxes with: top, bottom, mid (CE), direction, and state (filled / reclaimed).
Boxes are auto-extended and visually faded when price is far away, or deleted when filled.
d) Entry Conditions (Sweep + FVG)
For each recent sweep window:
After a low sweep, the script searches for the nearest bullish FVG below price and uses its top edge as a long limit entry.
After a high sweep, it searches for the nearest bearish FVG above price and uses its bottom edge as a short limit entry.
A “knife protection” check blocks trades where price is already trading through the proposed stop.
Only one entry per sweep is allowed; entries are only placed inside the configured NY trading sessions and only if no manipulation flag is active and EOD protection allows it.
e) Stop-Loss Placement (“Tick-Free” SL)
The stop is not placed directly on the HTF level; instead, the script scans a window around the sweep bar to find a local extreme:
Longs: lowest low in a configurable bar window around the sweep.
Shorts: highest high in that window.
This produces a structure-based SL that is generally outside the main sweep wick.
f) Take-Profit Logic (ZigZag + HTF Levels)
A lightweight ZigZag engine tracks swing highs/lows and removes levels that have already been broken.
For intraday timeframes (< 1h), TP candidates come from unswept ZigZag swings above/below the entry.
For higher timeframes (≥ 1h), TP candidates fall back to unswept HTF liquidity levels.
The script picks up to two targets:
TP1: nearest valid target in the trade direction (or a 2R fallback if none exists),
TP2: second target (or a 4R fallback if none exists).
A multi-TP model is used: typically 50% at TP1, remainder managed towards TP2 with breakeven plus offset once TP1 is hit.
g) Session & End-of-Day Filters
Three predefined NY sessions (Early, Open, Afternoon) are available; entries are only allowed inside active sessions.
An End-of-Day filter checks a user-defined NY close time and:
Blocks new entries close to the end of the day,
Optionally forces flat before the close.
3. Inputs Overview (Conceptual)
Liquidity settings: which HTF levels to track (1D/1W/1M), how many to show, and sweep priority (highest TF vs nearest vs any).
FVG settings: visibility radius, search window after a sweep, minimum FVG size.
ZigZag settings: swing length used for TP discovery.
Execution & protection: limit order timeout, breakeven offset, EOD protection.
Visuals: labels, sweep markers, manipulation warning, session highlighting, TP lines, etc.
For exact meaning of each input, please refer to the inline comments in the open-source code.
4. Strategy Properties & Backtesting Notes
Default strategy properties in this script:
Initial capital: 100,000
Order size: 10% of equity (strategy.percent_of_equity)
Commission: 0.01% per trade (adjust as needed for your broker/asset)
Slippage: must be set manually in the Strategy Tester (recommended: at least a few ticks on fast markets).
Even though the order size is 10% of equity, actual risk per trade depends on the SL distance and is typically much lower than 10% of the account. You should still adjust these values to keep risk within what you personally consider sustainable (e.g. somewhere in the 1–2% range per trade).
For more meaningful results:
Test on liquid instruments (e.g. major indices, FX, or liquid futures).
Use enough history to reach 100+ closed trades on your market/timeframe.
Always include realistic commission and slippage.
Do not assume that past performance will continue.
5. How to Use
Apply the strategy to your preferred symbol and timeframe.
Set broker-like commission and slippage in the Strategy Tester.
Adjust:
HTF levels (1D/1W/1M),
Sessions (NY windows),
FVG search window and minimum size,
ZigZag length and EOD filter.
Observe how entries only appear:
After a HTF sweep,
In the configured session,
At a FVG edge,
With TP lines anchored at unswept structure / liquidity.
Use this primarily as a research and backtesting tool to study how your own ICT / SMC ideas behave over a large sample of trades.
6. Disclaimer
This script is for educational and research purposes only.
It does not constitute financial advice, and it does not guarantee profitability. Always validate results with realistic assumptions and use your own judgment before trading live.
QT Previous Micro Cycle Range + SSMT [bilal]Previous Micro Cycle Range + SMTs - Indicator Description
📊 Overview
This indicator tracks 22.5-minute micro cycles within ICT's Quarterly Theory framework and automatically detects Smart Money Technique (SMT) divergences across correlated indices (NQ, ES, YM). It visualizes previous cycle ranges and identifies high-probability manipulation completions for precise intraday entries.
🎯 What It Does
Micro Cycle Tracking:
Divides each 90-minute session into four 22.5-minute micro quarters
Plots the previous micro cycle's High, Low, Equilibrium (EQ), and Quarter levels
Updates automatically as new micro cycles form
Works on any timeframe (recommended: 1-5 minute charts)
SMT Detection:
Compares current micro cycle vs previous micro cycle across NQ, ES, and YM
Detects Bearish SMT: Divergence at highs (signals distribution down)
Detects Bullish SMT: Divergence at lows (signals distribution up)
Draws visual SMT lines with directional arrows showing correlation/divergence
Optional SMT table showing all three indices' movements
💡 How To Use It
For Scalpers & Day Traders:
Wait for a new micro cycle to begin (lines will refresh every 22.5 minutes)
Watch for SMT formation in the current cycle
Bullish SMT = Buy signal (previous low is confirmed, expect move to previous high)
Bearish SMT = Sell signal (previous high is confirmed, expect move to previous low)
Key Concepts:
Minimum Target: Opposite extreme of previous cycle
SMT Confirmation: One or two indices sweep a level while the other(s) fail to sweep
Best Results: Trade with higher timeframe bias aligned
⚙️ Features
Customizable Display:
Toggle High/Low lines with multiple label styles (Timeframe, Label, %, Fib)
Optional Equilibrium (50%) level
Optional Quarter levels (25% / 75%)
Optional extended range projections (±50% to ±400%)
Adjustable line colors, widths, and label sizes
SMT Options:
Enable/disable SMT detection
Show/hide SMT text labels
Custom colors for bullish/bearish SMTs
Option to delete previous cycle SMTs (keeps chart clean)
Real-time SMT table showing all three indices
Comparison Assets:
Default: ES1! and YM1! (customize to your preference)
Set correlation type for each asset (correlated vs inverse)
Disable individual assets if needed
🔍 Understanding The Visuals
Lines:
Solid lines = Previous cycle High/Low (where price came from)
Dotted lines = EQ and Quarter levels (internal cycle structure)
Green lines = SMT divergence detected (buy/sell signal)
Labels:
▲ = Asset made higher high/low vs previous cycle
▼ = Asset made lower high/low vs previous cycle
🔺 = Inverse correlation (up when others down)
🔻 = Inverse correlation (down when others up)
SMT Logic:
If indices diverge (move opposite directions), SMT is confirmed
Bearish SMT = Highs diverge → Sell
Bullish SMT = Lows diverge → Buy
📈 Best Practices
Use on 1-5 minute charts for optimal micro cycle visualization
Combine with higher timeframe bias (Daily Cycle SSMT, session bias, etc.)
Wait for SMT confirmation before entering trades
Target previous cycle's opposite extreme as minimum profit target
Exit when opposing SMT forms or price reaches target
🛠️ Settings Guide
Essential Settings:
Comparison Symbols: Set to the indices you trade (default: ES1!, YM1!)
Show Cycle SMT: Toggle SMT detection on/off
Delete Previous Cycles SMTs: Keep chart clean by removing old SMTs
Visual Preferences:
Line Color/Width: Customize previous cycle lines
Label Style: Choose between Timeframe (22.5m), Label (descriptive), % (percentage), or Fib (0-1)
Show High/Low: Toggle previous cycle extremes
Show EQ/Quarters/Extended Ranges: Add more reference levels as needed
⚠️ Important Notes
This indicator shows previous cycle ranges, not predictive future levels
SMTs are confirmation signals for manipulation completion
Always use proper risk management and combine with your trading plan
Best results when aligned with higher timeframe directional bias
🎓 Based On ICT Concepts
This indicator implements concepts from Inner Circle Trader (ICT):
Quarterly Theory (fractal time structure)
Micro cycles (22.5-minute quarters)
Sequential SMT (mechanical divergence confirmation)
Smart Money accumulation, manipulation, distribution (AMD)
Perfect for: Scalpers, day traders, and anyone using ICT's Quarterly Theory and SMT concepts for precise intraday entries.
Note: This is a study indicator (overlay=true). It does not generate buy/sell signals automatically - you must interpret SMT formations based on your trading strategy.RéessayerGu should know it only works on the 30s chart btwPrevious Micro Cycle Range + SMTs - Indicator Description
📊 Overview
This indicator tracks 22.5-minute micro cycles within ICT's Quarterly Theory framework and automatically detects Smart Money Technique (SMT) divergences across correlated indices (NQ, ES, YM). It visualizes previous cycle ranges and identifies high-probability manipulation completions for precise intraday entries.
⚠️ IMPORTANT: This indicator is designed to work on the 30-second chart only. The micro cycle calculations are optimized for 30s timeframe data.
🎯 What It Does
Micro Cycle Tracking:
Divides each 90-minute session into four 22.5-minute micro quarters
Plots the previous micro cycle's High, Low, Equilibrium (EQ), and Quarter levels
Updates automatically as new micro cycles form every 22.5 minutes
Precise timing based on New York timezone session structure
SMT Detection:
Compares current micro cycle vs previous micro cycle across NQ, ES, and YM
Detects Bearish SMT: Divergence at highs (signals distribution down)
Detects Bullish SMT: Divergence at lows (signals distribution up)
Draws visual SMT lines with directional arrows showing correlation/divergence
Optional SMT table showing all three indices' movements in real-time
💡 How To Use It
Setup:
Switch to 30-second chart (required for accurate cycle timing)
Add indicator to your chart
Ensure you're viewing NQ, ES, or YM (or correlated futures)
For Scalpers & Day Traders:
Wait for a new micro cycle to begin (lines will refresh every 22.5 minutes)
Watch for SMT formation in the current cycle
Bullish SMT = Buy signal (previous low is confirmed, expect move to previous high)
Bearish SMT = Sell signal (previous high is confirmed, expect move to previous low)
Key Concepts:
Minimum Target: Opposite extreme of previous cycle
SMT Confirmation: One or two indices sweep a level while the other(s) fail to sweep
Best Results: Trade with higher timeframe bias aligned (Daily Cycle SSMT, session bias)
⚙️ Features
Customizable Display:
Toggle High/Low lines with multiple label styles (Timeframe, Label, %, Fib)
Optional Equilibrium (50%) level
Optional Quarter levels (25% / 75%)
Optional extended range projections (±50% to ±400%)
Adjustable line colors, widths, and label sizes
Line extension length (default: 15 bars ahead)
SMT Options:
Enable/disable SMT detection
Show/hide SMT text labels with ticker symbols and directional arrows
Custom colors for bullish/bearish SMT lines
Option to delete previous cycle SMTs (keeps chart clean)
Real-time SMT table showing all three indices' current status
Comparison Assets:
Default: ES1! and YM1! (customize to your preference)
Set correlation type for each asset (correlated vs inverse)
Disable individual assets if needed
Works with any correlated futures contracts
Debug Mode:
Toggle debug info to see current NY time, session, and micro cycle timing
Helpful for understanding cycle structure and troubleshooting
🔍 Understanding The Visuals
Lines:
Solid lines = Previous cycle High/Low (where price came from)
Dotted lines = EQ and Quarter levels (internal cycle structure)
Green lines (default) = SMT divergence detected (buy/sell signal)
Gray dotted lines = Extended range projections (if enabled)
Labels:
▲ = Asset made higher high/low vs previous cycle (correlated)
▼ = Asset made lower high/low vs previous cycle (correlated)
🔺 = Inverse correlation (up when others down)
🔻 = Inverse correlation (down when others up)
SMT Logic:
If indices diverge (move opposite directions), SMT is confirmed
Bearish SMT = Highs diverge → High is set, expect distribution down
Bullish SMT = Lows diverge → Low is set, expect distribution up
📈 Best Practices
Must use 30-second chart - indicator timing is calibrated for this timeframe
Combine with higher timeframe bias (Daily Cycle SSMT, 90-min SSMT, session bias)
Wait for SMT confirmation before entering trades (don't front-run)
Target previous cycle's opposite extreme as minimum profit target
Exit when opposing SMT forms or price reaches target
Best windows: Q2→Q3 or Q3→Q4 transitions within 90-minute sessions
Volatility injection times: Watch 09:30, 10:00, and 14:00 ET for strongest moves
🛠️ Settings Guide
Essential Settings:
Comparison Symbols: Set to the indices you monitor (default: ES1!, YM1!)
Correlation Type: Toggle "Correlated" on/off for each asset based on expected relationship
Show Cycle SMT: Enable/disable SMT detection
Show SMT Text: Toggle labels showing ticker divergence details
Delete Previous Cycles SMTs: Keep chart clean by removing old SMTs
Visual Preferences:
Line Color/Width: Customize previous cycle lines (default: black, width 1)
Label Style: Choose between:
Timeframe (shows "22.5m")
Label (descriptive: "previous micro cycle high/low")
% (shows "100%/0%")
Fib (shows "1/0")
Show High/Low: Toggle previous cycle extremes (recommended: ON)
Show EQ/Quarters/Extended Ranges: Add more reference levels as needed
SMT Customization:
SMT Colors: Customize bearish/bullish SMT line colors (default: green for both)
SMT Label Colors: Background and text color for SMT labels
SMT Table: Toggle real-time comparison table (bottom right)
⚠️ Important Notes
30-second chart required - will not work accurately on other timeframes
This indicator shows previous cycle ranges, not predictive future levels
SMTs are confirmation signals for manipulation completion, not entry triggers alone
Always use proper risk management and position sizing
Best results when aligned with higher timeframe directional bias
Monitor all three indices (NQ, ES, YM) for complete SMT picture
Micro cycles are part of a fractal structure - align with 90-min and Daily Cycle SMTs
🎓 Based On ICT Concepts
This indicator implements concepts from Inner Circle Trader (ICT):
Quarterly Theory (fractal time structure - 22.5 min micro quarters)
Micro cycles (four quarters within each 90-minute session)
Sequential SMT (mechanical divergence confirmation across correlated indices)
Smart Money AMD (Accumulation, Manipulation, Distribution pattern)
New York session timing (based on ICT's 6-hour daily cycles)
🕐 Micro Cycle Structure
Each 90-minute session divides into four 22.5-minute micro quarters:
Micro Q1: 00:00 - 22:30
Micro Q2: 22:30 - 45:00
Micro Q3: 45:00 - 67:30
Micro Q4: 67:30 - 90:00
This pattern repeats across all 16 daily 90-minute sessions (Q1.1 through Q4.4).
Perfect for: Scalpers and day traders using ICT's Quarterly Theory and SMT concepts for precise micro-level entries on 30-second charts.
Chart Requirement: 30-second timeframe only.
Note: This is a study indicator. It does not generate automatic buy/sell signals - you must interpret SMT formations based on your trading strategy and higher timeframe bias.
SSMT + HSSMT Detector- Q to Q Analysis- (by FINOR V10.1)📘 Description
This indicator detects Same-Side Market Trend (SSMT) and Hidden Same-Side Market Trend (HSSMT) divergences between three correlated symbols, providing multi-timeframe intermarket structure analysis.
It works entirely in a Q-based framework, allowing precise identification of structural inefficiencies between related markets.
🕒 Session Structure and Logic
The script divides price data into four time scopes:
1️⃣ Daily Session
2️⃣ 6-hour Session
3️⃣ 90-minute Session
4️⃣ 22.5-minute Session
Each of these sessions is split into consecutive Q intervals (quarters).
Within each Q, the algorithm detects local highs and lows for each of the three selected symbols.
⚙️ How It Works
Q Analysis:
For each session type, the algorithm evaluates the price structure of each symbol inside every Q.
It identifies swing highs and lows to map short-term market structure boundaries.
Inter-Q Comparison:
The script compares consecutive Q periods to locate structural asymmetries — situations where correlated symbols fail to move in sync.
These asymmetries often reveal intermarket inefficiencies and potential reversals or continuations.
SSMT Detection:
The SSMT logic checks for divergence in highs and lows between the selected symbols.
For example, if Symbol A makes a higher high but Symbol B does not, an SSMT signal is generated.
HSSMT Detection:
The HSSMT logic performs a similar analysis but based solely on closing prices, detecting hidden divergences that may appear within continuation phases rather than reversals.
🧭 Visualization and Alerts
Each detected event is labeled directly on the chart with visual tags showing whether it is an SSMT or HSSMT event.
Color-coded markers distinguish between highs, lows, and closes depending on the detected structure.
Optional smart alerts instantly notify the trader when a new SSMT or HSSMT signal is found.
💡 Use Cases
Confirm institutional SMT setups across correlated indices or assets.
Detect non-synchronous behavior between correlated pairs for early reversal confirmation.
Identify continuation or exhaustion points in multi-symbol price action.
🧠 Summary
This tool provides an advanced, multi-timeframe method to visualize and quantify intermarket divergences using a Q-segmented framework.
It allows traders to observe both explicit (SSMT) and hidden (HSSMT) inefficiencies between correlated symbols in real time — a capability not available in standard open-source SMT detectors.
RTH Previous Day's Range + SMTs [bilal x shpat]Overview
This advanced indicator is designed specifically for futures and equity traders who focus on Regular Trading Hours (RTH) sessions. It automatically plots the previous RTH session's high and low levels and detects Smart Money Theory (SMT) divergences across multiple correlated or inversely correlated instruments.
Key Features
📊 RTH Range Detection
Automatically identifies and tracks Regular Trading Hours (9:30 AM - 4:14 PM New York time)
Plots horizontal lines at the previous RTH session's high and low
Works seamlessly on all timeframes, including ETH (Extended Trading Hours) charts
Lines dynamically extend and update as new bars form
🔄 Smart Money Theory (SMT) Divergence Detection
Compares up to 3 correlated or inversely correlated assets simultaneously
Detects bullish and bearish SMT divergences automatically
Visual divergence lines connect previous session levels to current intraday highs/lows
Customizable SMT labels showing which instruments are diverging
Option to mark assets as "Correlated" or "Inversely Correlated" for accurate divergence detection
SMT detection occurs only during RTH sessions for cleaner signals
🎨 Fully Customizable Styling
3 Label Styles: Choose between "Full" (RTH Previous Day High), "Short" (RTH PDH), or "Lowercase" (rth previous day high)
Adjustable Label Sizes: Tiny, Small, Normal, or Large
Custom Colors: Separate color controls for lines, labels, bullish SMT, and bearish SMT
Line Extension: Control how many bars ahead lines extend
Line Width: Customize line thickness
📈 SMT Visual Indicators
Arrow Symbols: ▲ = Higher / ▼ = Lower (for correlated assets)
Alternate Symbols: 🔺 = Higher / 🔻 = Lower (for inversely correlated assets)
Color-coded divergence lines (white by default, fully customizable)
Optional SMT labels showing ticker symbols with directional indicators
Optional comparison table displaying current divergence status
⚙️ Comparison Settings
Add up to 2 comparison symbols (e.g., ES1!, YM1!, NQ1!)
Toggle each comparison asset on/off independently
Set correlation type (Correlated or Inversely Correlated) for each asset
Popular comparisons: ES vs NQ, YM vs ES, Equity vs Futures
🧹 Clean Chart Management
Option to delete previous RTH SMTs when new session starts
Automatic cleanup of outdated lines and labels
Transparent label backgrounds for minimal chart clutter
Lines track exact bar where high/low occurred
How It Works
Session Detection: The indicator identifies when RTH begins (9:30 AM ET) and tracks all price action during the session until close (4:14 PM ET)
Level Capture: At the start of each new RTH session, it captures the previous session's high and low and plots them as reference levels
SMT Analysis: During the current RTH session, it continuously compares the current session's high/low with the previous session's high/low across all selected instruments
Divergence Identification: When one instrument makes a higher high while another makes a lower high (or vice versa), an SMT divergence is detected and visualized
Use Cases
Liquidity Analysis: Identify when markets are taking liquidity at different rates
Reversal Signals: SMT divergences often precede significant reversals
Correlation Trading: Monitor when traditionally correlated markets begin to diverge
Key Level Trading: Use previous RTH high/low as support/resistance levels
Multi-Market Analysis: Compare ES, NQ, and YM simultaneously for institutional flow
Best Practices
Most effective on intraday timeframes (1m - 15m charts)
Works on both RTH and ETH chart sessions - meant to be used on a RTH chart
Compare highly correlated instruments (e.g., ES1! vs NQ1!)
Use in combination with volume analysis and market structure
SMT divergences are most powerful near key levels
Settings Overview
Comparison Symbols
Asset 2 & 3: Select tickers to compare (e.g., ES1!, YM1!)
Correlation toggles for each asset
Enable/disable each comparison independently
Styling
Line color, width, and extension length
Label color, size, and style (3 options)
Separate colors for bullish and bearish SMT lines
SMT Controls
Toggle SMT detection on/off
Show/hide SMT text labels
Optional SMT comparison table
Delete previous session SMTs option
Note: This indicator is best used by traders familiar with Smart Money Concepts (SMC) and inter-market analysis. Understanding market correlations is essential for accurate interpretation of SMT divergences.
thank you shpat for the SMT option in the last indicator, i tweaked it for this one
cd_correlation_analys_Cxcd_correlation_analys_Cx
General:
This indicator is designed for correlation analysis by classifying stocks (487 in total) and indices (14 in total) traded on Borsa İstanbul (BIST) on a sectoral basis.
Tradingview's sector classifications (20) have been strictly adhered to for sector grouping.
Depending on user preference, the analysis can be performed within sectors, between sectors, or manually (single asset).
Let me express my gratitude to the code author, @fikira, beforehand; you will find the reason for my thanks in the context.
Details:
First, let's briefly mention how this indicator could have been prepared using the classic method before going into details.
Classically, assets could be divided into groups of forty (40), and the analysis could be performed using the built-in function:
ta.correlation(source1, source2, length) → series float.
I chose sectoral classification because I believe there would be a higher probability of assets moving together, rather than using fixed-number classes.
In this case, 21 arrays were formed with the following number of elements:
(3, 11, 21, 60, 29, 20, 12, 3, 31, 5, 10, 11, 6, 48, 73, 62, 16, 19, 13, 34 and indices (14)).
However, you might have noticed that some arrays have more than 40 elements. This is exactly where @Fikira's indicator came to the rescue. When I examined their excellent indicator, I saw that it could process 120 assets in a single operation. (I believe this was the first limit overrun; thanks again.)
It was amazing to see that data for 3 pairs could be called in a single request using a special method.
You can find the details here:
When I adapted it for BIST, I found it sufficient to call data for 2 pairs instead of 3 in a single go. Since asset prices are regular and have 2 decimal places, I used a fixed multiplier of $10^8$ and a fixed decimal count of 2 in Fikira's formulas.
With this method, the (high, low, open, close) values became accessible for each asset.
The summary up to this point is that instead of the ready-made formula + groups of 40, I used variable-sized groups and the method I will detail now.
Correlation/harmony/co-movement between assets provides advantages to market participants. Coherent assets are expected to rise or fall simultaneously.
Therefore, to convert co-movement into a mathematical value, I defined the possible movements of the current candle relative to the previous candle bar over a certain period (user-defined). These are:
Up := high > high and low > low
Down := high < high and low < low
Inside := high <= high and low >= low
Outside := high >= high and low <= low and NOT Inside.
Ignore := high = low = open = close
If both assets performed the same movement, 1 was added to the tracking counter.
If (Up-Up), (Down-Down), (Inside-Inside), or (Outside-Outside), then counter := counter + 1.
If the period length is 100 and the counter is 75, it means there is 75% co-movement.
Corr = counter / period ($75/100$)
Average = ta.sma(Corr, 100) is obtained.
The highest coefficients recorded in the array are presented to the user in a table.
From the user menu options, the user can choose to compare:
• With assets in its own sector
• With assets in the selected sector
• By activating the confirmation box and manually entering a single asset for comparison.
Table display options can be adjusted from the Settings tab.
In the attached examples:
Results for AKBNK stock from the Finance sector compared with GARAN stock from the same sector:
Timeframe: Daily, Period: 50 => Harmony 76% (They performed the same movement in 38 out of 50 bars)
Comment: Opposite movements at swing high and low levels may indicate a change in the direction of the price flow (SMT).
Looking at ASELS from the Electronic Technology sector over the last 30 daily candles, they performed the same movements by 40% with XU100, 73.3% (22/30) with XUTEK (Technology Index), and 86.9% according to the averages.
Comment: It is more appropriate to follow ASELS stock with XUTEK (Technology index) instead of the general index (XU100). Opposite movements at swing high and low levels may indicate a change in the direction of the price flow (SMT).
Again, when ASELS stock is taken on H1 instead of daily, and the length is 100 instead of 30, the harmony rate is seen to be 87%.
Please share your thoughts and criticisms regarding the indicator, which I prepared with a bit of an educational purpose specifically for BIST.
Happy trading.
Smart Money Techniques (SMT) Divergence by RiseSmart Money Divergence - Early Reversal Indicator
This sophisticated indicator identifies and analyzes Smart Money Divergence patterns by systematically examining pivot point relationships between a primary asset and a secondary correlated instrument.
The indicator establishes divergence signals through precise algorithmic detection when pivot pairs exhibit opposing directional patterns between the primary and secondary assets. This sophisticated analysis reveals institutional positioning discrepancies that often precede significant market reversals.
Following divergence confirmation, the indicator provides comprehensive visualization tools and optional alert systems to capitalize on these high-probability trading opportunities. Advanced filtering capabilities allow traders to customize sensitivity levels, timeframe parameters, and styling to align with their specific trading methodology.
This powerful solution delivers unmatched functionality for traders seeking to identify and exploit Smart Money positioning through multi-asset divergence analysis. With its robust detection algorithms and granular customization options, it provides capabilities that surpass conventional divergence indicators by incorporating institutional flow analysis principles highly regarded in professional trading circles.
What is Smart Money Divergence?
Smart Money Divergence is another name for Smart Money Techniques (SMT). These patterns appear when comparing swing points, of adjustable strength, between correlated assets...
When an asset makes a higher high while the other makes a lower high.
When an asset makes a lower low while the other makes a higher low.
Potential Divergence
This indicator allows users to see potential SMT before the second swing point of the pair forms. It is showcased with different styling until it's confirmation, when enough bars pass based on the user-defined strength parameter.
Multi-Timeframe
Our tool allows traders to have higher/lower-timeframe divergences displayed on the chart of their choice, further automating their trading strategies.
Input Settings:
This tool offers a lot of customizable options, which could be overwhelming to some users. Below you will find an in-depth definition of every input's purpose to complement the tooltips that can be found directly in the indicator's settings.
Symbol 📊
This parameter let's users define the asset used in search of SMT divergence. We recommend using correlated assets, like NASDAQ100 with S&P500 or EURUSD with GBPUSD...
Timeframe 🔧
This is where users choose, if they wish, to set a different timeframe which will be utilized when looking for divergences.
Mode ⚙️
Default -> Displays all SMTs.
Bullish -> Displays only bullish SMTs using low pivots.
Bearish -> Displays only bearish SMTs using high pivots.
Historical 📜
This indicator allows users to display only a specific amount of SMTs... The historical input will display the specified amount of divergences up to 25, which will then showcase all available SMTs.
Parameters
This section defines the main parameters uses in establishing and managing SMT divergences.
Pivot Strength -> Number of bars to the left and right for pivot considerations.
Pivot Lookback -> Amount of past pivots to maintain in memory.
Allow Time Difference? -> Allow up to one bar difference when comparing pivots.
Time Filters -> The indicator allows for up to two time filters...
Checkbox -> Activate this time filter.
Time Range-> Define the time range which will only validate SMTs during.
Remove After Invalidation? -> Remove drawings from invalidated SMTs.
Style
Colors for bullish and bearish SMTs respectively.
Line styling and width
Potential Divergence -> checkbox and line styling.
Text
Label Contents :
Long -> "Smart Money Divergence"
Short -> "SMT"
None -> No text.
Include Symbol? -> Include the comparing asset's symbol within label text.
Size .
Font (Default or Monospace) and Format (None, Italic or Bold).
Align -> vertical and horizontal positioning.
This indicator is for educational and informational purposes only. Past performance and historical patterns do not guarantee future results. Trading involves substantial risk of loss and is not suitable for all investors. Always conduct your own analysis and consider your financial situation before making any trading decisions. The identification of patterns does not constitute trading advice.
Liquidity Grab Strategy SuvorovLiquidity grab strategy
Description:
This indicator is built around the Liquidity Grab Strategy, which identifies and reacts to stop hunts and false breakouts at key swing highs and lows. It detects where liquidity is likely to be resting (e.g., above highs or below lows) and provides trade signals when that liquidity is taken and price begins to reverse.
Core Features:
Liquidity Detection: Automatically identifies and marks key swing highs and lows where stop-losses are likely to accumulate.
Entry Signals: Generates BUY/SELL signals after a liquidity sweep and a confirmed reversal — based on price action, volume, or structure shifts.
Stop Loss & Take Profit Zones: Visualizes stop-loss just beyond the liquidity wick and take-profit near the next major structure point, with configurable Risk/Reward ratios.
False Signal Filters: Optional filters based on volume spikes, RSI divergence, or market structure confirmation.
Multi-Timeframe Logic: Supports separate timeframes for structure detection and signal confirmation (e.g., structure on 1H, entry on 5m).
Multi Timeframe BOS & rBOSThis is the same Multi-Timeframe Break of Structure and Market Structure Shift posted by Lenny_Kiruthu. However, the only difference is the naming of Market Structure Shift to rBOS (Break of Structure Reverse). To me, they are all break of structures when previous peaks or valleys are violated. The only difference is in sequence. Once a sequence of BOS reverses, then a new sequence begins. To me, this simplifies the various terminology incorporated by different systems such as ICT or SMT which adds unnecessary complexity.
eT
Price Level HighlighterThis indicator is a minimalist and highly effective tool designed for traders who incorporate institutional concepts into their analysis. It automates the identification of key psychological price levels and adds a unique, dynamic layer of information to help you focus on the most relevant area of the market. Inspired by core principles of market structure and liquidity, it serves as a powerful visual guide for anticipating potential support and resistance.
The core idea is simple: specific price points, particularly those ending in round numbers or common increments, often act as magnets or barriers for price. While many indicators simply plot static lines, this tool goes further by intelligently highlighting the single most significant level in real-time. This dynamic feature allows you to quickly pinpoint where the market is currently engaged, offering a clear reference point for your trading decisions. It reduces chart clutter and enhances your focus on the immediate price action.
Features
Customizable Price Range: Easily define a specific Start Price and End Price to focus the indicator on the most relevant area of your chart, preventing unnecessary clutter.
Adjustable Increment: Change the interval of the lines to suit your trading style, from high-frequency increments (e.g., 10 points) for scalping to wider intervals (e.g., 50 or 100 points) for swing trading.
Intelligent Highlighting: A key feature that automatically identifies and highlights the single horizontal line closest to the current market price with a distinct color and thickness. This gives you an immediate visual cue for the most relevant price level.
Highly Customizabile: Adjust the line color, style, and width for both the main lines and the highlighted line to fit your personal chart aesthetic.
Usage
Apply the indicator to your chart.
In the settings, input your desired price range (Start Price and End Price) to match the market you are trading.
Set the Price Increment to your preferred density.
Monitor the chart for the highlighted line. This is your active price level and a key area of interest.
Combine this tool with other confirmation signals (e.g., order blocks, fair value gaps, liquidity pools) to build higher-probability trade setups.
Best Practices
Pairing: This tool is effective across all markets, including stocks, forex, indices, and crypto. It is particularly useful for volatile markets where price moves rapidly between psychological levels.
Mindful Analysis: Use the highlighted level as a reference point for your analysis, not as a standalone signal. A break above or below this level can signify a shift in market control.
Backtesting: Always backtest the indicator on your preferred market and timeframe to understand how it performs under different conditions.
cd_indiCATor_CxGeneral:
This indicator is the redesigned, simplified, and feature-enhanced version of the previously shared indicators:
cd_cisd_market_Cx, cd_HTF_Bias_Cx, cd_sweep&cisd_Cx, cd_SMT_Sweep_CISD_Cx, and cd_RSI_divergence_Cx.
Within the holistic setup, the indicator tracks:
• HTF bias
• Market structure (trend) in the current timeframe
• Divergence between selected pairs (SMT)
• Divergence between price and RSI values
• Whether the price is in an important area (FVG, iFVG, and Volume Imbalance)
• Whether the price is at a key level
• Whether the price is within a user-defined special timeframe
The main condition and trigger of the setup is an HTF sweep with CISD confirmation on the aligned timeframe.
When the main condition occurs, the indicator provides the user with a real-time market status summary, enriched with other data.
________________________________________
What’s new?
-In the SMT module:
• Triad SMT analysis (e.g.: NQ1!, ES1!, and YM1!)
• Dyad SMT analysis (e.g.: EURUSD, GBPUSD)
• Alternative pair definition and divergence analysis for non-correlated assets
o For crypto assets (xxxUSDT <--> xxxUSDT.P) (e.g.: SOLUSDT.P, SOLUSDT)
o For stocks, divergence analysis by comparing the asset with its value in another currency
(BIST:xxx <--> BIST:xxx / EURTRY), (BAT:xxx <--> BAT:xxx / EURUSD)
-Special timeframe definition
-Configurable multi-option alarm center
-Alternative summary presentation (check list / status table / stickers)
________________________________________
Details and usage:
The user needs to configure four main sections:
• Pair and correlated pairs
• Timeframes (Auto / Manual)
• Alarm center
• Visual arrangement and selections
Pair Selections:
The user should adjust trading pairs according to their trade preferences.
Examples:
• Triad: NQ1!-ES1!-YM1!, BTC-ETH-Total3
• Dyad: NAS100-US500, XAUUSD-XAGUSD, XRPUSDT-XLMUSDT
Single pairs:
-Crypto Assets:
If crypto assets are not in the triad or dyad list, they are automatically matched as:
Perpetual <--> Spot (e.g.: DOGEUSDT.P <--> DOGEUSDT)
If the asset is already defined in a dyad list (e.g., DOGE – SHIB), the dyad definition takes priority.
________________________________________
-Stocks:
If stocks are defined in the dyad list (e.g.: BIST:THYAO <--> BIST:PGSUS), the dyad definition takes priority.
If not defined, the stock is compared with its value in the selected currency.
For example, in the Turkish Stock Exchange:
BIST:FENER stock, if EUR is chosen from the menu, is compared as BIST:FENER / OANDA:EURTRY.
Here, “OANDA” and the stock market currency (TRY) are automatically applied for the exchange rate.
For NYSE:XOM, its pair will be NYSE:XOM / EURUSD.
________________________________________
Timeframes:
By default, the menu is set to “Auto.” In this mode, aligned timeframes are automatically selected.
Aligned timeframes (LTF-HTF):
1m-15m, 3m-30m, 5m-1h, 15m-4h, 1h-D, 4h-W, D-M
Example: if monitoring the chart on 5m:
• 1h sweep + 5m CISD confirmation
• D sweep + 1h CISD confirmation (bias)
• 5m market structure
• 1h SMT and 1h RSI divergence analysis
For manual selections, the user must define the timeframes for Sweep and HTF bias.
FVG, iFVG, and Volume Imbalance timeframes must be manually set in both modes.
________________________________________
Alarm Center:
The user can choose according to preferred criteria.
Each row has options.
“Yes” → included in alarm condition.
“No” → not included in alarm condition.
If special timeframe criteria are added to the alarm, the hour range must also be entered in the same row, and the “Special Zone” tab (default: -4) should be checked.
Key level timeframes and plot options must be set manually.
Example alarm setup:
Alongside the main Sweep + CISD condition, if we also want HTF bias + Trend alignment + key level (W, D) and special timeframe (09:00–11:00), we should set up the menu as follows:
________________________________________
Visual Arrangement and Selections:
Users can control visibility with checkboxes according to their preferences.
In the Table & Sticker tab, table options and labels can be controlled.
• Summary Table has two options: Check list and Status Table
• From the HTF bias section, real-time bias and HTF sweep zone (optional) are displayed
• The RSI divergence section only shows divergence analysis results
• The SMT 2 sub-section only functions when triad is selected
Labels are shown on the bar where the sweep + CISD condition occurs, displaying the current situation.
With the Check box option, all criteria’s real-time status is shown (True/False).
Status Table provides a real-time summary table.
Although the menu may look crowded, most settings only need to be adjusted once during initial use.
________________________________________
What’s next?
• Suggestions from users
• Standard deviation projection
• Mitigation/order blocks (cd special mtg)
• PSP /TPD
________________________________________
Final note:
Every additional criterion in the alarm settings will affect alarm frequency.
Multiple conditions occurring at the same time is not, by itself, sufficient to enter a trade—you should always apply your own judgment.
Looking forward to your feedback and suggestions.
Happy trading! 🎉
SMT (DXY) DIVERGENCESThis indicator detects Smart Money Technique (SMT) Divergences between the chart symbol and up to two comparison symbols defined in the settings.
It identifies swing highs and swing lows on correlated/uncorrelated instruments, compares their highs and lows, and determines possible divergences.
🔷 What It Detects
-Bullish SMT Divergence: When the lows of the chart symbol slope in the opposite direction of the comparison symbol’s lows.
-Bearish SMT Divergence: When the highs of the chart symbol slope in the opposite direction of the comparison symbol’s highs.
-Multi-Symbol Compatibility: Ability to compare the main symbol with one or two external tickers (default: DXY and GBPUSD).
-Negative Divergence Option: The inversion feature allows comparison with opposite-moving charts.
🔷 Calculation Logic
-Swing Detection: Swing highs and lows are confirmed using pivot-based logic.
-Comparison: Slopes of highs and lows are calculated for both the chart symbol and the comparison symbols.
-Divergence Identification: If slopes point in opposite directions, an SMT divergence (bullish or bearish) is marked.
-Visualization: Lines and labels (“+ SMT” or “– SMT”) are drawn on the chart. Historical lines can be kept or cleared depending on user settings.
🔷 Visual
Bearish SMT: Downward line with “– SMT” label.
Bullish SMT: Upward line with “+ SMT” label.
Style Options: Predefined color schemes (TLAB, standard, monochrome) or fully customizable colors.
Line Style: Solid, dashed, or dotted.
🔷 Customization Options
-Show Historical: Decide whether past divergences remain visible on the chart.
-Comparison Symbols: Define up to two external tickers, with optional inversion.
-Swing Lengths: Preconfigured pivot lengths automatically adapt to the selected timeframe (Daily, 4H, 1H, 5m/15m).
-Lines & Labels: Enable or disable bullish/bearish SMT divergences and their annotations.
🔷 Indicator Usage
Select the comparison symbol with positive or negative correlation.
Wait for the “+ SMT” or “– SMT” marker to appear on the chart.
Divergences can be used as contextual confluence when studying potential market shifts:
A + SMT marker may suggest bullish divergence.
A – SMT marker may suggest bearish divergence.






















