Market Structure- ZigZag, Break of Structure & Order BlocksDescription:
This script is an all-in-one market structure tool designed for traders who follow price action, Smart Money Concepts (SMC), or institutional order flow. It combines Order Block detection , Break of Structure (BOS) , Internal Structure Shifts (CHoCH) , and a ZigZag swing framework to provide a clear and actionable view of market behavior.
Key Features:
Order Blocks (OB) :
-Detects Bullish (Green) and Bearish (Red) order blocks upon valid market structure shifts.
-Optional deletion of mitigated (touched) blocks to keep charts clean.
-Customizable block duration, fill color, and border color.
Break of Structure (BOS) :
-Marks BOS with horizontal dotted lines when price breaks previous swing highs/lows.
-Confirms new trends and structural shifts.
Internal Structure Shifts (CHoCH-like) :
-Detects early internal changes in direction before BOS.
-User-selectable logic: based on candle Open or High/Low.
-Plotted as small black triangle markers.
ZigZag Swings :
-Connects confirmed internal shifts with black zigzag lines.
-Visually simplifies trend structure and major swing points.
-Tracks last swing highs/lows for BOS validation.
Alerts :
-Bullish/Bearish Engulfments (OB signals)
-Internal Structure Shifts
-Bullish/Bearish Break of Structure
-OB Mitigation Events
Inputs & Settings :
-Show/Hide Bullish or Bearish Order Blocks
-Calculate internal shifts by: Open or High/Low
-Set order block fill and border colors
-Enable or disable automatic deletion of mitigated blocks
-Set duration for order block display
This tool is designed to support price action trading by visually mapping key structural changes and zones of interest directly on your chart. It is not intended to function as a standalone trading strategy , but rather as a supplementary tool to inform your own analysis and discretion.
Sentiment
SOPR with Z-Score Table📊 Glassnode SOPR with Dynamic Z-Score Table
ℹ️ Powered by Glassnode On-Chain Metrics
📈 Description:
This indicator visualizes the Spent Output Profit Ratio (SOPR) for major cryptocurrencies — Bitcoin, Ethereum, and Litecoin — along with a dynamically normalized Z-Score. SOPR is a key on-chain metric that reflects whether coins moved on-chain are being sold at a profit or a loss.
🔍 SOPR is calculated using Glassnode’s entity-adjusted SOPR feed, and a custom SMA is applied to smooth the signal. The normalized Z-Score helps identify market sentiment extremes by scaling SOPR relative to its historical context.
📊 Features:
Selectable cryptocurrency: Bitcoin, Ethereum, or Litecoin
SOPR smoothed by user-defined SMA (default: 10 periods)
Upper & lower bounds (±4%) for SOPR, shown as red/green lines
Background highlighting when SOPR moves outside normal range
Normalized Z-Score scaled between –2 and +2
Live Z-Score display in a compact top-right table
🧮 Calculations:
SOPR data is sourced daily from Glassnode:
Bitcoin: XTVCBTC_SOPR
Ethereum: XTVCETH_SOPR
Litecoin: XTVCLTC_SOPR
Z-Score is calculated as:
SMA of SOPR over zscore_length periods
Standard deviation of SOPR
Z-Score = (SOPR – mean) / standard deviation
Z-Score is clamped between –2 and +2 for visual consistency
🎯 Interpretation:
SOPR > 1 implies coins are sold in profit
SOPR < 1 suggests coins are sold at a loss
When SOPR is significantly above or below its recent range (e.g., +4% or –4%), it may signal overheating or capitulation
The Z-Score contextualizes how extreme the current SOPR is relative to history
📌 Notes:
Best viewed on daily charts
Works across selected assets (BTC, ETH, LTC)
BPCO Z-ScoreBPCO Z-Score with Scaled Z-Value and Table
Description:
This custom indicator calculates the Z-Score of a specified financial instrument (using the closing price as a placeholder for the BPCO value), scales the Z-Score between -2 and +2 based on user-defined thresholds, and displays it in a table for easy reference.
The indicator uses a simple moving average (SMA) and standard deviation to calculate the original Z-Score, and then scales the Z-Score within a specified range (from -2 to +2) based on the upper and lower thresholds set by the user.
Additionally, the scaled Z-Score is displayed in a separate table on the right side of the chart, providing a clear, numerical value for users to track and interpret.
Key Features:
BPCO Z-Score: Calculates the Z-Score using a simple moving average and standard deviation over a user-defined window (default: 365 days). This provides a measure of how far the current price is from its historical average in terms of standard deviations.
Scaled Z-Score: The original Z-Score is then scaled between -2 and +2, based on the user-specified upper and lower thresholds. The thresholds default to 3.5 (upper) and -1.5 (lower), and can be adjusted as needed.
Threshold Bands: Horizontal lines are plotted on the chart to represent the upper and lower thresholds. These help visualize when the Z-Score crosses critical levels, indicating potential market overbought or oversold conditions.
Dynamic Table Display: The scaled Z-Score is shown in a dynamic table at the top-right of the chart, providing a convenient reference for traders. The table updates automatically as the Z-Score fluctuates.
How to Use:
Adjust Time Window: The "Z-Score Period (Days)" input allows you to adjust the time period used for calculating the moving average and standard deviation. By default, this is set to 365 days (1 year), but you can adjust this depending on your analysis needs.
Set Upper and Lower Thresholds: Use the "BPCO Upper Threshold" and "BPCO Lower Threshold" inputs to define the bands for your Z-Score. The default values are 3.5 for the upper band and -1.5 for the lower band, but you can adjust them based on your strategy.
Interpret the Z-Score: The Z-Score provides a standardized measure of how far the current price (or BPCO value) is from its historical mean, relative to the volatility. A value above the upper threshold (e.g., 3.5) may indicate overbought conditions, while a value below the lower threshold (e.g., -1.5) may indicate oversold conditions.
Use the Scaled Z-Score: The scaled Z-Score is calculated based on the original Z-Score, but it is constrained to a range between -2 and +2. When the BPCO value hits the upper threshold (3.5), the scaled Z-Score will be +2, and when it hits the lower threshold (-1.5), the scaled Z-Score will be -2. This gives you a clear, easy-to-read value to interpret the market's condition.
Data Sources:
BPCO Data: In this indicator, the BPCO value is represented by the closing price of the asset. The calculation of the Z-Score and scaled Z-Score is based on this price data, but you can modify it to incorporate other data streams as needed (e.g., specific economic indicators or custom metrics).
Indicator Calculation: The Z-Score is calculated using the following formulas:
Mean (SMA): A simple moving average of the BPCO (close price) over the selected period (365 days by default).
Standard Deviation (Std): The standard deviation of the BPCO (close price) over the same period.
Z-Score: (Current BPCO - Mean) / Standard Deviation
Scaled Z-Score: The Z-Score is normalized to fall within a specified range (from -2 to +2), based on the upper and lower threshold inputs.
Important Notes:
Customization: The indicator allows users to adjust the period (window) for calculating the Z-Score, as well as the upper and lower thresholds to suit different timeframes and trading strategies.
Visual Aids: Horizontal lines are drawn to represent the upper and lower threshold levels, making it easy to visualize when the Z-Score crosses critical levels.
Limitations: This indicator relies on historical price data (or BPCO) and assumes that the standard deviation and mean are representative of future price behavior. It does not account for potential market shifts or extreme events that may fall outside historical norms.
Active Addresses Z-ScoreActive Addresses Z-Score Indicator
The Active Addresses Z-Score Indicator is a fundamental analysis tool designed to evaluate the relationship between Bitcoin network activity and its price movements over a specified period. This indicator aims to provide insights into whether the market is showing signs of increasing or decreasing interest in Bitcoin, based on its network usage and activity.
How to Read the Indicator
Orange Line (Price Z-Score):
This line represents the Z-Score of the price change over a defined period (e.g., 28 days). The Z-Score normalizes the price change by comparing it to the historical mean and standard deviation, essentially measuring how far the current price change is from the average.
A positive Z-Score indicates that the price change is above the historical average (a bullish signal), while a negative Z-Score means the price change is below the historical average (a bearish signal).
Gray Line (Active Addresses Z-Score):
This line represents the Z-Score of the change in active addresses over the same period. The Z-Score here normalizes the change in the number of active Bitcoin addresses by comparing it to historical data.
A positive Z-Score suggests that the number of active addresses is increasing more than usual, which can be a sign of increased market activity and potential interest in Bitcoin.
A negative Z-Score suggests that active addresses are decreasing more than usual, which may indicate reduced interest or usage of Bitcoin.
Upper and Lower Threshold Lines:
The upper and lower threshold lines (set by the user) act as Z-Score boundaries. If either the price Z-Score or the active address Z-Score exceeds the upper threshold, it can signal an overbought or overactive condition. Similarly, if the Z-Score falls below the lower threshold, it could indicate an oversold or underactive condition.
These thresholds are customizable by the user, allowing for flexible interpretation based on market conditions.
Indicator Calculation
Price Change Calculation:
The percentage change in the Bitcoin price over a specified lookback period (e.g., 28 days) is calculated as:
Price Change
=
Close
−
Close
Close
Price Change=
Close
Close−Close
This shows the relative price movement during the specified period.
Active Address Change Calculation:
Similarly, the percentage change in active addresses is calculated as:
Active Address Change
=
Active Addresses
−
Active Addresses
Active Addresses
Active Address Change=
Active Addresses
Active Addresses−Active Addresses
This shows the relative change in the number of active Bitcoin addresses over the same period.
Z-Score Calculation:
The Z-Score for both the price and active address changes is calculated as:
𝑍
=
X
−
𝜇
𝜎
Z=
σ
X−μ
Where:
X is the current change (price or active addresses),
μ (mu) is the mean (average) of the historical data over the lookback period,
σ (sigma) is the standard deviation of the historical data.
This Z-Score tells you how far the current value deviates from its historical average, normalized by the volatility (standard deviation).
Smoothing (Optional):
A simple moving average (SMA) is applied to smooth out the Z-Score values to reduce noise and provide a clearer trend.
What the Indicator Does
Signals of Bullish or Bearish Market Behavior:
The Z-Score of Price tells you how strong or weak the price movement is relative to its past performance.
The Z-Score of Active Addresses reveals whether more users are interacting with the Bitcoin network, which can be an indication of growing interest or market activity.
When both the price and active address Z-Scores are high, it may indicate a strong bull market, while low Z-Scores may point to a bear market or decreasing interest.
Overbought/Oversold Conditions:
The upper and lower threshold lines help you visualize when the Z-Scores for either price or active addresses have reached extreme values, signaling potential overbought or oversold conditions.
For example, if the Price Z-Score exceeds the upper threshold (e.g., +2), it might indicate that the price has risen too quickly, and a correction may be due. Conversely, if it falls below the lower threshold (e.g., -2), it may indicate a potential buying opportunity.
Important Note on Activity and Price Movements:
After Rapid Price Increases:
A sharp increase in Bitcoin’s price followed by a spike in active addresses can be interpreted as a bearish signal. High network activity after a rapid price surge might indicate that investors are taking profits or that speculative interest is peaking, potentially signaling an upcoming correction or reversal.
After Extreme Price Declines:
Conversely, high network activity after a significant price drop may indicate a bottoming signal. A surge in active addresses during a price decline could suggest increased buying interest and potential accumulation, signaling that the market may be finding support and a reversal may be imminent.
Customization and Flexibility
The lookback period (default: 28 days) can be adjusted to suit different trading strategies or time horizons.
The smoothing length (default: 7 periods) allows for smoothing the Z-Score, making it easier to detect longer-term trends and reduce noise.
The upper and lower threshold values are fully customizable to adjust the indicator’s sensitivity to market conditions.
Conclusion
The Active Addresses Z-Score Indicator combines network activity with price data to give you a deeper understanding of the Bitcoin market. By analyzing the relationship between price changes and active address changes, this indicator helps you assess whether the market is experiencing unusual activity or if Bitcoin is trending in an extreme overbought or oversold condition.
It is a powerful tool for fundamental analysis and can complement traditional technical indicators for a more comprehensive trading strategy.
15-Min Opening Range Breakout STEP-BY-STEP RULES
1. Define the Opening Range (OR)
Mark the high and low of the first 15-minute candle of the session.
This creates your Opening Range.
Example: London session opens at 08:00 GMT. Use the 08:00–08:15 candle.
2. Set Entry Triggers
Buy Breakout: Place a Buy Stop order 1 pip above the Opening Range high.
Sell Breakout: Place a Sell Stop order 1 pip below the Opening Range low.
⚠️ Only one side should be triggered. Cancel the opposite order once one is active.
3. Set Stop Loss (SL)
For Buy trades:
SL = Opening Range Low - 2 pips
For Sell trades:
SL = Opening Range High + 2 pips
This ensures you give the price enough space, while keeping risk controlled.
4. Set Take Profit (TP)
Use either of these two approaches:
✅ Fixed Risk-Reward (Preferred)
Target 1: TP = 2R (i.e., 2 × SL distance)
Target 2 (optional): Leave runner for 3R or trail stop behind minor S/R
✅ Fixed Pip Target (alternative)
TP = +50 pips
SL = -20 pips
Matches your preferred risk model of 20 SL / 50 TP
5. Trade Management
If no breakout occurs within 1 hour, cancel the pending orders. No trade that day.
If trade triggers but fails to move, consider time-based exit after 2 hours.
Optional: Move SL to breakeven once price moves 1R in your favor.
TrueDelta Candles📖 Description:
TrueDelta Candles is a precision tool for traders who want deeper insight into market sentiment through real-time volume delta analysis. Rather than using traditional volume bars, this indicator colors each chart candle based on the net volume delta—the difference between buying and selling volume—fetched from a lower timeframe.
🚀 Key Features:
🎯 Real Candle Coloring: Colors actual price candles based on delta volume—green (buying pressure), red (selling pressure).
⏱️ Multi-Timeframe Volume Analysis: Automatically selects the appropriate lower timeframe for better delta approximation, or lets you set a custom one.
🔬 Order Flow Insight: Visualizes the tug-of-war between buyers and sellers within each candle.
⚡ Lightweight & Non-Intrusive: No clutter—just clean color overlays on your chart candles.
🔄 Live Updating: Responds instantly as new data arrives.
🧠 Ideal For:
Intraday and scalping strategies.
Momentum and breakout traders.
Order flow enthusiasts looking for a visual edge.
🛠️ How It Works:
Behind the scenes, the script uses ta.requestVolumeDelta() to retrieve granular buy/sell volume data from a lower timeframe. The net delta volume then determines whether the candle is colored green (positive delta) or red (negative delta). This makes it easy to spot when market pressure aligns or diverges from price action.
⚙️ Settings:
Use Custom Timeframe: Manually select the lower timeframe used for delta calculation (e.g., "1", "5").
Default Auto Mode: Automatically adapts to your current chart resolution for optimal data balance.
If you're serious about understanding the real dynamics behind every candle, TrueDelta Candles adds an essential layer of volume-based context that price alone can't offer.
Breakout Dailybreakout - with body - of yesterday's daily high or low.
Script created with ChatGPT.
###################################################################################
Rottura strutturale - con corpo - del massimo o minimo giornaliero di ieri.
Script creato con ChatGPT.
Trader’s One-Liner Reminder⚠️ このインジケーターは日本語でのメッセージ表示に特化しています。英語でのリマインドは含まれていません。
This script displays reminders only in Japanese.
【日本語説明】
本インジケーターは、日本時間(JST)8:00〜翌1:00までの時間帯に合わせて、15分刻みで一言メッセージを表示します。
トレード中の焦りや過信を防ぐための心理的リマインダーとして設計されています。
- 「Frankモード」では、関西弁風のユーモアあるメッセージを自動表示
- 「Customモード」では、全時間帯のメッセージを自分で自由に設定可能
- メッセージはチャート上部中央に、大きな文字・黄色背景で表示され、視認性にも配慮
💡ポジポジ病対策、メンタル強化、時間管理などに最適です。
---
【English Description】
This indicator displays motivational reminders in Japanese every 15 minutes from 8:00 JST to 1:00 JST (the next day).
It is designed to support traders mentally during market hours.
- “Frank mode” automatically shows prewritten humorous messages (in Kansai dialect tone)
- “Custom mode” lets users input their own message for each 15-minute time block
- Messages are shown in large text at the top-center of the chart with a yellow background for clear visibility
💡 Ideal for discipline, overtrading prevention, and improving trading psychology.
---
🔔 This indicator is intended for Japanese-speaking users. If you'd like an English version, feel free to fork and customize it!
Volume candle intraday 90% valid - with alertThe candle with the highest volume of the day and that creates a new daily high or low.
- Only usable on M15 timeframes;
- You can set a range of bars (from the beginning of the day) to ignore;
- "90% valid" means a candle with volume greater than 90% of the last candle with the highest volume of the day (in the script you can change the percentage of valid volumes to define the candle volume, replacing all the "90" with the desired percentage);
- Long volumes are compared to longs and short volumes are compared to shorts;
- Script created with ChatGpt;
The psychology behind this pattern is the following: on the daily high/low, a lot of volumes will enter in a short time, either by absorption: buyers or sellers enter en masse following the trend when it is too late; or by exhaustion: buyers or sellers who entered en masse and late have no more strength to continue pushing the price, they cause a volume peak to buy/sell as much as they could, then their enemies take over forming a high/low).
Happy trading everyone! :)
###################################################################################
La candela con il volume più alto della giornata e che crea un nuovo massimo o minimo giornaliero.
- Utilizzabile solo su timeframe M15;
- Si può impostare un range di barre(da inizio giornata) da ignorare;
- "90% valida" sta per candela con volume superiore del 90% dell'ultima candela con volume più alto della giornata(nello script si può cambiare percentuale di volumi validi per definire candela volume, sostituendo tutti i "90" con la percentuale desiderata);
- I volumi long vengono confrontati con i long e i volumi short con gli short;
- Script creato con ChatGpt;
La psicologia dietro questo pattern è la seguente: sul massimo/minimo giornaliero entreranno tanti volumi in breve tempo, sia per assorbimento: buyers o sellers entrano in massa seguendo il trend quando è troppo tardi; sia per esaurimento: buyers o sellers entrati in massa e in ritardo non hanno più forza per continuare a spingere il prezzo, causano un picco volumetrico per comprare/vendere più che potevano, quindi i loro nemici prendono il sopravvento formando un massimo/minimo).
Buon trading a tutti! :)
BTC Mining Income Oscillator Z-ScoreBTC Mining Income Oscillator (Z-Score)
Overview
The BTC Mining Income Oscillator (Z-Score) is a custom technical indicator that analyzes Bitcoin mining income to help traders identify overbought and oversold conditions. The indicator uses a Z-Score to track deviations in mining income, highlighting periods of high or low mining profitability.
This indicator is made up of:
Z-Score Line (Blue): Measures how far the current mining income deviates from its historical mean.
Mining Income Oscillator (Orange): A scaled value of mining income that oscillates within a specific range to indicate overbought and oversold conditions.
How the Indicator Works
1. Mining Income Calculation
The BTC Mining Income is determined using two main factors:
Block Reward: The number of BTC miners earn for each block mined (currently 3.125 BTC, adjustable in settings).
Transaction Fees: The average transaction fees per block (default is 0.3 BTC).
Blocks per Day: The number of blocks mined per day (default is 144).
The daily mining income in BTC is calculated as:
Mining Income
=
(
Block Reward
+
Transaction Fees
)
×
Blocks per Day
Mining Income=(Block Reward+Transaction Fees)×Blocks per Day
This value is then converted to USD by multiplying it by the current Bitcoin price.
2. Z-Score Calculation
The Z-Score measures how far the current mining income deviates from its mean over a set period (default is 90 days). The Z-Score helps identify when mining income is unusually high or low:
A high Z-Score indicates that the mining income is significantly above the historical mean, signaling overbought conditions.
A low Z-Score indicates that the mining income is significantly below the historical mean, signaling oversold conditions.
The Z-Score is calculated as follows:
Z-Score
=
(
Current Mining Income
−
Mean Income
)
Standard Deviation
Z-Score=
Standard Deviation
(Current Mining Income−Mean Income)
The result is then smoothed over a period (default is 5) to reduce noise and provide a more stable value.
3. Mining Income Oscillator
The mining income is scaled to oscillate between +20 and +90. This oscillation makes it easy to track overbought and oversold conditions in the market:
Values between 85 and 90 indicate overbought conditions (high mining profitability).
Values between 20 and 22 indicate oversold conditions (low mining profitability).
Values between 22 and 85 indicate neutral conditions, where mining profitability is normal.
The mining income oscillator helps traders spot extreme conditions (overbought or oversold) in mining profitability.
How to Read the Indicator
1. Z-Score Line (Blue)
The Z-Score represents how far current mining income is from the historical average.
Above +2: The mining income is unusually high, indicating an overbought market.
Below -2: The mining income is unusually low, indicating an oversold market.
Between -2 and +2: This range is neutral, where the mining income is within the average historical range.
2. Mining Income Oscillator (Orange)
The Mining Income Oscillator is scaled between 20 and 90.
85–90: Overbought conditions, indicating high mining profitability.
20–22: Oversold conditions, indicating low mining profitability.
22–85: Neutral conditions, indicating moderate mining profitability.
3. Background Shading
Red Shading (85–90): Indicates overbought conditions (mining income is unusually high).
Green Shading (20–22): Indicates oversold conditions (mining income is unusually low).
The shaded regions provide a visual guide to spot periods when the market is overbought or oversold.
4. Key Horizontal Lines
0 Line: Represents the neutral level for the Z-Score, where the mining income is at the historical mean.
+2 and -2 Lines: Indicate overbought and oversold conditions for the Z-Score.
90 and 20 Lines: Indicate the upper and lower bounds for the mining income oscillator.
Where the Data Comes From
Bitcoin Price: The current Bitcoin price is pulled directly from the chart.
Block Reward and Transaction Fees: These values are set manually by the user or can be updated dynamically.
Mining Income: Calculated based on the block reward, transaction fees, and current Bitcoin price.
Z-Score and Oscillator Calculations: Both are calculated based on mining income in USD over a defined look-back period.
Best Timeframe for This Indicator
This indicator is designed to work best on the 2-day chart (2D) timeframe. On the 2-day chart, the mining income data, Z-Score, and the oscillator are less sensitive to noise and short-term volatility, providing more reliable signals. While it can be used on other timeframes, the 2-day chart offers the clearest and most stable analysis.
Goldman Sachs Risk Appetite ProxyRisk appetite indicators serve as barometers of market psychology, measuring investors' collective willingness to engage in risk-taking behavior. According to Mosley & Singer (2008), "cross-asset risk sentiment indicators provide valuable leading signals for market direction by capturing the underlying psychological state of market participants before it fully manifests in price action."
The GSRAI methodology aligns with modern portfolio theory, which emphasizes the importance of cross-asset correlations during different market regimes. As noted by Ang & Bekaert (2002), "asset correlations tend to increase during market stress, exhibiting asymmetric patterns that can be captured through multi-asset sentiment indicators."
Implementation Methodology
Component Selection
Our implementation follows the core framework outlined by Goldman Sachs research, focusing on four key components:
Credit Spreads (High Yield Credit Spread)
As noted by Duca et al. (2016), "credit spreads provide a market-based assessment of default risk and function as an effective barometer of economic uncertainty." Higher spreads generally indicate deteriorating risk appetite.
Volatility Measures (VIX)
Baker & Wurgler (2006) established that "implied volatility serves as a direct measure of market fear and uncertainty." The VIX, often called the "fear gauge," maintains an inverse relationship with risk appetite.
Equity/Bond Performance Ratio (SPY/IEF)
According to Connolly et al. (2005), "the relative performance of stocks versus bonds offers significant insight into market participants' risk preferences and flight-to-safety behavior."
Commodity Ratio (Oil/Gold)
Baur & McDermott (2010) demonstrated that "gold often functions as a safe haven during market turbulence, while oil typically performs better during risk-on environments, making their ratio an effective risk sentiment indicator."
Standardization Process
Each component undergoes z-score normalization to enable cross-asset comparisons, following the statistical approach advocated by Burdekin & Siklos (2012). The z-score transformation standardizes each variable by subtracting its mean and dividing by its standard deviation: Z = (X - μ) / σ
This approach allows for meaningful aggregation of different market signals regardless of their native scales or volatility characteristics.
Signal Integration
The four standardized components are equally weighted and combined to form a composite score. This democratic weighting approach is supported by Rapach et al. (2010), who found that "simple averaging often outperforms more complex weighting schemes in financial applications due to estimation error in the optimization process."
The final index is scaled to a 0-100 range, with:
Values above 70 indicating "Risk-On" market conditions
Values below 30 indicating "Risk-Off" market conditions
Values between 30-70 representing neutral risk sentiment
Limitations and Differences from Original Implementation
Proprietary Components
The original Goldman Sachs indicator incorporates additional proprietary elements not publicly disclosed. As Goldman Sachs Global Investment Research (2019) notes, "our comprehensive risk appetite framework incorporates proprietary positioning data and internal liquidity metrics that enhance predictive capability."
Technical Limitations
Pine Script v6 imposes certain constraints that prevent full replication:
Structural Limitations: Functions like plot, hline, and bgcolor must be defined in the global scope rather than conditionally, requiring workarounds for dynamic visualization.
Statistical Processing: Advanced statistical methods used in the original model, such as Kalman filtering or regime-switching models described by Ang & Timmermann (2012), cannot be fully implemented within Pine Script's constraints.
Data Availability: As noted by Kilian & Park (2009), "the quality and frequency of market data significantly impacts the effectiveness of sentiment indicators." Our implementation relies on publicly available data sources that may differ from Goldman Sachs' institutional data feeds.
Empirical Performance
While a formal backtest comparison with the original GSRAI is beyond the scope of this implementation, research by Froot & Ramadorai (2005) suggests that "publicly accessible proxies of proprietary sentiment indicators can capture a significant portion of their predictive power, particularly during major market turning points."
References
Ang, A., & Bekaert, G. (2002). "International Asset Allocation with Regime Shifts." Review of Financial Studies, 15(4), 1137-1187.
Ang, A., & Timmermann, A. (2012). "Regime Changes and Financial Markets." Annual Review of Financial Economics, 4(1), 313-337.
Baker, M., & Wurgler, J. (2006). "Investor Sentiment and the Cross-Section of Stock Returns." Journal of Finance, 61(4), 1645-1680.
Baur, D. G., & McDermott, T. K. (2010). "Is Gold a Safe Haven? International Evidence." Journal of Banking & Finance, 34(8), 1886-1898.
Burdekin, R. C., & Siklos, P. L. (2012). "Enter the Dragon: Interactions between Chinese, US and Asia-Pacific Equity Markets, 1995-2010." Pacific-Basin Finance Journal, 20(3), 521-541.
Connolly, R., Stivers, C., & Sun, L. (2005). "Stock Market Uncertainty and the Stock-Bond Return Relation." Journal of Financial and Quantitative Analysis, 40(1), 161-194.
Duca, M. L., Nicoletti, G., & Martinez, A. V. (2016). "Global Corporate Bond Issuance: What Role for US Quantitative Easing?" Journal of International Money and Finance, 60, 114-150.
Froot, K. A., & Ramadorai, T. (2005). "Currency Returns, Intrinsic Value, and Institutional-Investor Flows." Journal of Finance, 60(3), 1535-1566.
Goldman Sachs Global Investment Research (2019). "Risk Appetite Framework: A Practitioner's Guide."
Kilian, L., & Park, C. (2009). "The Impact of Oil Price Shocks on the U.S. Stock Market." International Economic Review, 50(4), 1267-1287.
Mosley, L., & Singer, D. A. (2008). "Taking Stock Seriously: Equity Market Performance, Government Policy, and Financial Globalization." International Studies Quarterly, 52(2), 405-425.
Oppenheimer, P. (2007). "A Framework for Financial Market Risk Appetite." Goldman Sachs Global Economics Paper.
Rapach, D. E., Strauss, J. K., & Zhou, G. (2010). "Out-of-Sample Equity Premium Prediction: Combination Forecasts and Links to the Real Economy." Review of Financial Studies, 23(2), 821-862.
VWAP Indicator Channel | Multi Timeframe by Osbrah📊 Multi-Timeframe VWAP Indicator (Session / Weekly / Monthly)
This powerful indicator plots the Volume Weighted Average Price (VWAP) across multiple timeframes: intraday session, weekly, and monthly. It's designed to give traders a clear understanding of the market’s fair value over different horizons.
Key Features:
* Display Session VWAP (resets daily)
* Enable Weekly and Monthly VWAPs for broader market context
* Customize colors, styles, and visibility for each VWAP
* Toggle between standard VWAP or anchored to session opens
Use Cases:
* Identify value zones where price tends to gravitate
* Spot institutional levels of interest and potential reversal points
* Align entries with VWAP bounces or breaks
* Combine with EMAs or price action for high-probability setups
Perfect for day traders, swing traders, and institutional-style strategies, this VWAP tool helps you stay aligned with volume-based price dynamics across all market phases.
CANSLIM Từng Bước"CANSLIM Step-by-Step" Indicator Description for TradingView
CANSLIM Step-by-Step - Your Companion for Evaluating Stocks with the CANSLIM Methodology
Welcome, investors, to "CANSLIM Step-by-Step"! This indicator is designed to assist you in analyzing and evaluating stocks based on the seven core criteria of William J. O'Neil's renowned CANSLIM investment methodology.
Purpose of the Indicator:
This tool is not intended to provide fully automated buy/sell recommendations. Instead, it focuses on "digitizing" and visualizing each step in the CANSLIM evaluation process, helping you gain a more comprehensive and detailed overview of potential stocks.
Key Features:
Evaluation of 7 CANSLIM Criteria:
C (Current Quarterly Earnings): Allows manual input for the latest quarterly EPS growth (%) and positive EPS status. It also attempts to fetch data automatically (which may not be stable for all symbols) for comparison.
A (Annual Earnings & ROE): Prioritizes manual input for annual EPS growth rate (CAGR) and current ROE to ensure accuracy.
N (New Highs): Automatically analyzes price action from the chart to determine if the stock is near or making a new 52-week high.
S (Supply and Demand - Volume): Automatically analyzes current trading volume against its average to detect significant surges.
L (Leader or Laggard): You evaluate and input whether the stock is a market or industry leader.
I (Institutional Sponsorship): You evaluate and input the quality and quantity of significant institutional ownership.
M (Market Direction): Automatically analyzes the trend of a reference market index (e.g., VNINDEX) using moving averages.
Prioritized Manual Input for Financial Data: For criteria C and A, the indicator allows and encourages manual input to ensure the highest accuracy, given the inherent limitations of automatically accessing consistently updated financial data via Pine Script.
"Super Compact" Summary Table:
Clearly displays the status (Pass/Fail/N/A) of each criterion using color codes.
Provides specific values for each criterion (e.g., growth percentage, distance to 52-week high, volume ratio).
Aggregates a total score (out of 7) and a star rating (0 to 7 stars) for a quick overview of the stock's CANSLIM compliance.
Customizable Thresholds: You can adjust the evaluation thresholds for various criteria (e.g., minimum EPS growth %, minimum ROE %) to suit your risk appetite and personal standards.
How to Use Effectively:
Step 1: Select the stock symbol you wish to analyze.
Step 2: Open the indicator's settings:
Manually input your research findings for criteria C, A, L, and I.
Adjust thresholds and parameters for N, S, and M if needed.
Select the appropriate market index symbol for criterion M.
Step 3: Observe the summary table in the bottom-right corner of your screen for the overall assessment and detailed breakdown of each criterion.
"CANSLIM Step-by-Step" is a companion tool designed to help you systematize your stock evaluation process according to one of the most successful investment methodologies. Combine this indicator with your knowledge and experience to make informed investment decisions!
Commitment to Ongoing Development
We wish to share that the current "CANSLIM Step-by-Step" indicator is the initial version in our journey to build a more comprehensive CANSLIM stock evaluation support tool.
Our vision is to continuously develop and enhance this indicator with the following goals:
Increase Automation Capabilities: Explore solutions to automatically update certain basic financial data (for criteria C, A) more reliably and consistently, within the technical limits of Pine Script and available data sources.
Add Deeper Analytical Features: Such as visualizing changes in criteria over time, or comparisons with industry peers (where feasible).
Improve User Interface: Make data input and tracking even more intuitive and convenient.
Listen to and Integrate Community Feedback: We highly value all user feedback, bug reports, and feature suggestions to make "CANSLIM Step-by-Step" an increasingly useful tool.
This is a dedicated project, and we are committed to continually working to make "CANSLIM Step-by-Step" an even more powerful assistant for investors following the CANSLIM philosophy.
DXY Z-ScoreThe "DXY Z-Score" indicator measures the US Dollar Index’s (DXY) current price relative to its recent average, normalized by its standard deviation.
It calculates a standardized Z-Score that oscillates around zero, highlighting when the DXY is significantly overbought or oversold.
Key features include:
- The Z-Score line oscillating between fixed upper (+2) and lower (-2) horizontal levels
- A shaded background to emphasize the Z-Score range between these bands
- A dynamic table showing the current Z-Score value linked linearly to the Z-Score plot
This indicator is useful for assessing the strength or weakness of the US Dollar relative to its recent history, providing insights into potential market reversals or trend continuations.
VIX Z-Score (Inverted)📘 Indicator: VIX Z-Score (Inverted) + Table
🔍 Overview
This indicator calculates the Z-Score of the VIX (Volatility Index) and inverts it to identify potential buying opportunities during periods of fear and caution during periods of extreme optimism. The Z-Score is smoothed and visually displayed alongside a dynamic info table.
⚙️ How It Works
VIX Data: The VIX (ticker: CBOE:VIX) is pulled in real time.
Z-Score Calculation:
𝑍
=
(
𝑉
𝐼
𝑋
−
mean
)
standard deviation
Z=
standard deviation
(VIX−mean)
Over a customizable lookback period (default: 50).
Inversion:
Since high VIX usually means fear (often a contrarian buying signal), we invert the Z-Score:
𝑍
inv
=
−
𝑍
Z
inv
=−Z
Smoothing:
An EMA is applied to reduce noise and false signals.
Clamping:
The Z-Score is linearly scaled and capped between +2 and -2 for easy visualization in the info table.
📊 Z-Score Table (Top-Right)
Range Interpretation Table Color
+1.5 to +2 Extreme fear → Buy zone 🟩 Green
+0.5 to +1.5 Moderate fear 🟨 Lime
–0.5 to +0.5 Neutral ⬜ Gray
–0.5 to –1.5 Growing complacency 🟧 Orange
–1.5 to –2 Extreme optimism → Caution 🟥 Red
The current Z-Score (clamped version) is shown in real time on the right-hand info panel.
🧠 How to Use It
+2 Zone (Table: Green):
Market fear is at an extreme. Historically, such conditions are contrarian bullish—possible entry zones.
–2 Zone (Table: Red):
Indicates extreme optimism and low fear. Often a signal to be cautious or take profits.
Middle range (±0.5):
Market is neutral. Avoid major decisions based solely on sentiment here.
🧪 Best Practices
Combine with price action, volume, or trend filters.
Works well on daily or 4H timeframes.
Not a standalone signal—best used to confirm or fade sentiment extremes.
SSRO Z-ScoreSSRO Z-Score Indicator — Description
What it does:
This indicator measures the Stablecoin Supply Ratio (SSR) relative to Bitcoin’s market cap and calculates a normalized Z-Score of this ratio to help identify potential market tops and bottoms in the crypto market.
How it works:
The Stablecoin Supply Ratio (SSR) is calculated by dividing Bitcoin’s market capitalization by the combined market capitalization of major stablecoins (USDT, USDC, TUSD, DAI, FRAX).
The SSR is then smoothed over a user-defined lookback period to reduce noise.
A Z-Score is computed by normalizing the SSR over a specified moving window, which shows how far the current SSR deviates from its historical average in terms of standard deviations.
This Z-Score is further smoothed using an exponential moving average (EMA) to filter short-term volatility.
How to read the Z-Score:
Z-Score = 0: SSR is at its historical average.
Z-Score > 0: SSR is above average, indicating Bitcoin’s market cap is relatively high compared to stablecoin supply, potentially signaling bullish market conditions.
Z-Score < 0: SSR is below average, indicating stablecoin supply is high relative to Bitcoin’s market cap, possibly signaling bearish pressure or increased liquidity waiting to enter the market.
Upper and Lower Bands: These user-defined levels (e.g., +2 and -2) represent thresholds for extreme conditions. Values above the upper band may indicate overbought or overheated market conditions, while values below the lower band may indicate oversold or undervalued conditions.
Additional Features:
A dynamic table displays a linear scaled Z-Score alongside the main plot, clamped between -2 and +2 relative to the upper and lower bands for intuitive interpretation.
Usage Tips:
Combine the SSRO Z-Score with other technical indicators or volume analysis for more reliable signals.
Look for divergence between price and Z-Score extremes as potential reversal signals.
Multi-TF BOS/CHoCH Detectori am abhijit i am devloping this structure maping indicator with alert .
on dated may 12-5-2025. disclaimer-it is only for educational purpose and not giving surety of success use it by your own risk
Asymmetric Coinbase Premium Histogram (Multi-Exchange)This Indicator plots the absolute US Dollar or percentage difference between the Bitcoin Coinbase spot price and the average Bitcoin spot price of 5 different leading exchanges.
US Net Liquidity Tracker with Sentiment & OffsetU.S. Net Liquidity Tracker with Sentiment & Offset - Documentation
This document explains the rationale behind the Pine Script indicator "U.S. Net Liquidity Tracker with Sentiment & Offset" and why it provides an accurate representation of liquidity in the U.S. financial system.
The indicator leverages data from the Federal Reserve's Economic Data (FRED) to calculate net liquidity, offering traders and analysts a tool to assess market conditions influenced by monetary policy.
Purpose of the Indicator
The U.S. Net Liquidity Tracker is designed to measure the amount of liquidity available in the U.S. financial system by accounting for both liquidity injections and drains. Liquidity is a critical factor in financial markets: high liquidity often supports rising asset prices, while low liquidity can signal potential market downturns. This indicator helps users anticipate market trends by providing a clear, data-driven view of net liquidity dynamics.
! raw.githubusercontent.com
Rationale Behind the Indicator
What is U.S. Net Liquidity?
Net liquidity represents the money available in the financial system after subtracting liquidity-draining factors from the total liquidity provided by the Federal Reserve. The indicator calculates this by combining key data points that reflect both the creation and removal of liquidity.
Data Sources
The indicator uses the following FRED datasets:
Fed Balance Sheet (WALCL): Total assets held by the Federal Reserve, including securities from quantitative easing (QE). An expanding balance sheet adds liquidity, while a shrinking one (quantitative tightening, QT) reduces it.
Treasury General Account (WTREGEN): The U.S. Treasury’s cash balance at the Fed. A high balance drains liquidity, while spending releases it into the system.
Overnight Reverse Repurchase Agreements (RRPONTSYD): Short-term operations where the Fed borrows cash from institutions, temporarily reducing available liquidity.
Earnings Remittances (RESPPLLOPNWW): Payments from the Fed to the Treasury, which remove liquidity from circulation.
These components are chosen because they collectively represent the primary sources and drains of liquidity in the U.S. economy, providing a comprehensive view of net liquidity.
Calculation
The core formula for net liquidity is:
global_balance = fed_balance - us_tga_balance - overnight_rrp_balance - earnings_remittances_balance
fed_balance: Total Fed assets (WALCL).
us_tga_balance: Treasury General Account (WTREGEN).
overnight_rrp_balance: Reverse repo operations (RRPONTSYD).
earnings_remittances_balance: Fed remittances to Treasury (RESPPLLOPNWW).
This subtraction isolates the liquidity remaining after accounting for major drains, offering a net perspective on funds available to influence markets.
Additional Features
Smoothing: A Simple Moving Average (SMA) is applied to the net liquidity value to reduce noise and emphasize longer-term trends.
Sentiment Coloring: An Exponential Moving Average (EMA) determines market sentiment:
Bullish (Green): Smoothed liquidity is above the EMA, indicating improving liquidity conditions.
Bearish (Red): Smoothed liquidity is below the EMA, signaling deteriorating conditions.
Offset: Users can shift the liquidity plot forward or backward in time to align it with market data (e.g., S&P 500) for correlation analysis.
Rate of Change (ROC): A plot of the Fed balance sheet’s ROC highlights the pace of monetary policy shifts.
Why This is an Accurate Picture of U.S. Liquidity
The indicator accurately reflects U.S. liquidity for several reasons:
Comprehensive Data:
It incorporates all major liquidity-affecting factors: the Fed’s balance sheet (source) and TGA, reverse repos, and remittances (drains). This holistic approach ensures no significant component is overlooked.
Real-Time Insights:
By pulling data directly from FRED, the indicator reflects current economic conditions, making it relevant for timely decision-making.
Customizability:
Features like toggling components, adjusting smoothing periods, and offsetting the plot allow users to tailor the indicator to their specific analytical needs, enhancing its practical accuracy.
Visual Clarity:
Sentiment coloring and the ROC plot provide intuitive cues about liquidity trends and monetary policy impacts, making complex data actionable.
Conclusion
The "U.S. Net Liquidity Tracker with Sentiment & Offset" is a robust tool for understanding liquidity dynamics in the U.S. financial system. By combining key FRED datasets into a net liquidity calculation, smoothing the results, and adding sentiment and offset features, it delivers an accurate and user-friendly picture of liquidity. This makes it invaluable for traders and analysts seeking to correlate liquidity with market movements and anticipate economic shifts.
Source Code
The source code for this indicator is available on GitHub: ebasurtop/Macro
Disclaimer
All codes and indicators provided by Enrique Basurto are 100% free and open for public use. If you find this work valuable, please consider donating to The Brain Foundation through the Autism Research Coalition to support critical translational research for individuals with autism.
Your contributions help fund vital research initiatives.
Donation Link: Autism Research Coalition
Follow Enrique Basurto on X: @EnriqueBasurto
ADX and DI - Trader FelipeADX and DI - Trader Felipe
This indicator combines the Average Directional Index (ADX) and the Directional Indicators (DI+ and DI-) to help traders assess market trends and their strength. It is designed to provide a clear view of whether the market is in a trending phase (either bullish or bearish) and helps identify potential entry and exit points.
What is ADX and DI?
DI+ (Green Line):
DI+ measures the strength of upward (bullish) price movements. When DI+ is above DI-, it signals that the market is experiencing upward momentum.
DI- (Red Line):
DI- measures the strength of downward (bearish) price movements. When DI- is above DI+, it suggests that the market is in a bearish phase, with downward momentum.
ADX (Blue Line):
ADX quantifies the strength of the trend, irrespective of whether it is bullish or bearish. The higher the ADX, the stronger the trend:
ADX > 20: Indicates a trending market (either up or down).
ADX < 20: Indicates a weak or sideways market with no clear trend.
Threshold Line (Gray Line):
This horizontal line, typically set at 20, represents the threshold for identifying whether the market is trending or not. If ADX is above 20, the market is considered to be in a trend. If ADX is below 20, it suggests that the market is not trending and is likely in a consolidation phase.
Summary of How to Use the Indicator:
Trend Confirmation: Use ADX > 20 to confirm a trending market. If ADX is below 20, avoid trading.
Long Entry: Enter a long position when DI+ > DI- and ADX > 20.
Short Entry: Enter a short position when DI- > DI+ and ADX > 20.
Avoid Sideways Markets: Do not trade when ADX is below 20. Look for other strategies for consolidation phases.
Exit Strategy: Exit the trade if ADX starts to decline or if the DI lines cross in the opposite direction.
Combine with Other Indicators: Use additional indicators like RSI, moving averages, or support/resistance to filter and confirm signals.