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
Daye
Quarterly Theory ICT 01 [TradingFinder] XAMD + Q1-Q4 Sessions🔵 Introduction
The Quarterly Theory ICT indicator is an advanced analytical system based on the concepts of ICT (Inner Circle Trader) and fractal time. It divides time into quarterly periods and accurately determines entry and exit points for trades by using the True Open as the starting point of each cycle. This system is applicable across various time frames including annual, monthly, weekly, daily, and even 90-minute sessions.
Time is divided into four quarters: in the first quarter (Q1), which is dedicated to the Accumulation phase, the market is in a consolidation state, laying the groundwork for a new trend; in the second quarter (Q2), allocated to the Manipulation phase (also known as Judas Swing), sudden price changes and false moves occur, marking the true starting point of a trend change; the third quarter (Q3) is dedicated to the Distribution phase, during which prices are broadly distributed and price volatility peaks; and the fourth quarter (Q4), corresponding to the Continuation/Reversal phase, either continues or reverses the previous trend.
By leveraging smart algorithms and technical analysis, this system identifies optimal price patterns and trading positions through the precise detection of stop-run and liquidity zones.
With the division of time into Q1 through Q4 and by incorporating key terms such as Quarterly Theory ICT, True Open, Accumulation, Manipulation (Judas Swing), Distribution, Continuation/Reversal, ICT, fractal time, smart algorithms, technical analysis, price patterns, trading positions, stop-run, and liquidity, this system enables traders to identify market trends and make informed trading decisions using real data and precise analysis.
♦ Important Note :
This indicator and the "Quarterly Theory ICT" concept have been developed based on material published in primary sources, notably the articles on Daye( traderdaye ) and Joshuuu . All copyright rights are reserved.
🔵 How to Use
The Quarterly Theory ICT strategy is built on dividing time into four distinct periods across various time frames such as annual, monthly, weekly, daily, and even 90-minute sessions. In this approach, time is segmented into four quarters, during which the phases of Accumulation, Manipulation (Judas Swing), Distribution, and Continuation/Reversal appear in a systematic and recurring manner.
The first segment (Q1) functions as the Accumulation phase, where the market consolidates and lays the foundation for future movement; the second segment (Q2) represents the Manipulation phase, during which prices experience sudden initial changes, and with the aid of the True Open concept, the real starting point of the market’s movement is determined; in the third segment (Q3), the Distribution phase takes place, where prices are widely dispersed and price volatility reaches its peak; and finally, the fourth segment (Q4) is recognized as the Continuation/Reversal phase, in which the previous trend either continues or reverses.
This strategy, by harnessing the concepts of fractal time and smart algorithms, enables precise analysis of price patterns across multiple time frames and, through the identification of key points such as stop-run and liquidity zones, assists traders in optimizing their trading positions. Utilizing real market data and dividing time into Q1 through Q4 allows for a comprehensive and multi-level technical analysis in which optimal entry and exit points are identified by comparing prices to the True Open.
Thus, by focusing on keywords like Quarterly Theory ICT, True Open, Accumulation, Manipulation, Distribution, Continuation/Reversal, ICT, fractal time, smart algorithms, technical analysis, price patterns, trading positions, stop-run, and liquidity, the Quarterly Theory ICT strategy acts as a coherent framework for predicting market trends and developing trading strategies.
🔵b]Settings
Cycle Display Mode: Determines whether the cycle is displayed on the chart or on the indicator panel.
Show Cycle: Enables or disables the display of the ranges corresponding to each quarter within the micro cycles (e.g., Q1/1, Q1/2, Q1/3, Q1/4, etc.).
Show Cycle Label: Toggles the display of textual labels for identifying the micro cycle phases (for example, Q1/1 or Q2/2).
Table Display Mode: Enables or disables the ability to display cycle information in a tabular format.
Show Table: Determines whether the table—which summarizes the phases (Q1 to Q4)—is displayed.
Show More Info: Adds additional details to the table, such as the name of the phase (Accumulation, Manipulation, Distribution, or Continuation/Reversal) or further specifics about each cycle.
🔵 Conclusion
Quarterly Theory ICT provides a fractal and recurring approach to analyzing price behavior by dividing time into four quarters (Q1, Q2, Q3, and Q4) and defining the True Open at the beginning of the second phase.
The Accumulation, Manipulation (Judas Swing), Distribution, and Continuation/Reversal phases repeat in each cycle, allowing traders to identify price patterns with greater precision across annual, monthly, weekly, daily, and even micro-level time frames.
Focusing on the True Open as the primary reference point enables faster recognition of potential trend changes and facilitates optimal management of trading positions. In summary, this strategy, based on ICT principles and fractal time concepts, offers a powerful framework for predicting future market movements, identifying optimal entry and exit points, and managing risk in various trading conditions.
Correlated asset and Daye's Quarterly TheoryThis indicator is based on the Quarterly Theory concepts from Daye. You can find him mainly on X as traderdaye.
It works on a new panel and the quarters will be drawn over the chart of the correlated that you set on its settings.
You can use every asset to compare with the main one to make easier to find divergences between days, sessions and 90 minutes cycles.
In different timeframes, the indicator could show more or less information about quarters, but will always show the compared asset one. This is due to limitations of the candles start (for example, the Session's Q2 open won't be shown on an hourly chart because it starts after 30 minutes of candle's open).
What can this indicator do for you?
- Show the correlated asset chart.
- Show daily, session and 90 minutes cycle boxes.
- Show Midnight and every session's Q2 open.
- Make easier for the trained eye to determine if the model is AMDX or XAMD, find PO3, turtle soups, SMT divergences, etc.
Do you have any suggestion? Please, leave it on the comments. I'll try to improve this indicator regularly.


