Extended Altman Z-Score ModelThe Extended Altman Z-Score Model represents a significant advancement in financial analysis and risk assessment, building upon the foundational work of Altman (1968) while incorporating contemporary data analytics approaches as proposed by Fung (2023). This sophisticated model enhances the traditional bankruptcy prediction framework by integrating additional financial metrics and modern analytical techniques, offering a more comprehensive approach to identifying financially distressed companies.
The model's architecture is built upon two distinct yet complementary scoring systems. The traditional Altman Z-Score components form the foundation, including Working Capital to Total Assets (X1), which measures a company's short-term liquidity and operational efficiency. Retained Earnings to Total Assets (X2) provides insight into the company's historical profitability and reinvestment capacity. EBIT to Total Assets (X3) evaluates operational efficiency and earning power, while Market Value of Equity to Total Liabilities (X4) assesses market perception and leverage. Sales to Total Assets (X5) measures asset utilization efficiency.
These traditional components are enhanced by extended metrics introduced by Fung (2023), which provide additional layers of financial analysis. The Cash Ratio (X6) offers insights into immediate liquidity and financial flexibility. Asset Composition (X7) evaluates the quality and efficiency of asset utilization, particularly in working capital management. The Debt Ratio (X8) provides a comprehensive view of financial leverage and long-term solvency, while the Net Profit Margin (X9) measures overall profitability and operational efficiency.
The scoring system employs a sophisticated formula that combines the traditional Z-Score with weighted additional metrics. The traditional Z-Score is calculated as 1.2X1 + 1.4X2 + 3.3X3 + 0.6X4 + 1.0X5, while the extended components are weighted as follows: 0.5 * X6 + 0.3 * X7 - 0.4 * X8 + 0.6 * X9. This enhanced scoring mechanism provides a more nuanced assessment of a company's financial health, incorporating both traditional bankruptcy prediction metrics and modern financial analysis approaches.
The model categorizes companies into three distinct risk zones, each with specific implications for financial stability and required actions. The Safe Zone (Score > 3.0) indicates strong financial health, with low probability of financial distress and suitability for conservative investment strategies. The Grey Zone (Score between 1.8 and 3.0) suggests moderate risk, requiring careful monitoring and additional fundamental analysis. The Danger Zone (Score < 1.8) signals high risk of financial distress, necessitating immediate attention and potential risk mitigation strategies.
In practical application, the model requires systematic and regular monitoring. Users should track the Extended Score on a quarterly basis, monitoring changes in individual components and comparing results with industry benchmarks. Component analysis should be conducted separately, identifying specific areas of concern and tracking trends in individual metrics. The model's effectiveness is significantly enhanced when used in conjunction with other financial metrics and when considering industry-specific factors and macroeconomic conditions.
The technical implementation in Pine Script v6 provides real-time calculations of both traditional and extended scores, offering visual representation of risk zones, detailed component breakdowns, and warning signals for critical values. The indicator automatically updates with new financial data and provides clear visual cues for different risk levels, making it accessible to both technical and fundamental analysts.
However, as noted by Fung (2023), the model has certain limitations that users should consider. It may not fully account for industry-specific factors, requires regular updates of financial data, and should be used in conjunction with other analysis tools. The model's effectiveness can be enhanced by incorporating industry-specific benchmarks and considering macroeconomic factors that may affect financial performance.
References:
Altman, E.I. (1968) 'Financial ratios, discriminant analysis and the prediction of corporate bankruptcy', The Journal of Finance, 23(4), pp. 589-609.
Li, L., Wang, B., Wu, Y. and Yang, Q., 2020. Identifying poorly performing listed firms using data analytics. Journal of Business Research, 109, pp.1–12. doi.org
Analisi fondamentale
Simulated OI Proxy with Moving Average🧠 Simulated Open Interest (OI) Proxy with Moving Average
This custom TradingView indicator estimates market participation and positioning by simulating Open Interest (OI) using a proxy derived from price change and volume movement — useful especially when OI data is unavailable (e.g., NSE stocks or options).
📊 Concept & Logic:
Since TradingView doesn’t provide real OI data for many symbols (like Indian equities), this script uses a smart proxy:
✅ Simulated OI Conditions:
Long Buildup (Green bar):
Price is rising and volume is increasing → suggests fresh buying.
Short Buildup (Red bar):
Price is falling and volume is increasing → suggests new shorts are entering.
Short Covering (Blue bar):
Price is rising but volume is falling → suggests shorts are exiting positions.
Long Unwinding (Orange bar):
Price is falling and volume is dropping → suggests long positions are closing.
Neutral (Gray):
No strong directional signal.
Each condition is assigned a numeric value for analysis:
Long Buildup = +1
Short Buildup = -1
Short Covering = +0.5
Long Unwinding = -0.5
Neutral = 0
📈 Simulated OI Moving Average (Yellow Line):
To remove short-term noise, we apply a Simple Moving Average (SMA) over the simulated OI values (default: 21 periods). This line helps you:
Identify dominant positioning trends (bullish or bearish).
Use it as a signal filter in your trading strategies.
🔧 Customization:
OI MA Period: Adjust how smooth or reactive the moving average should be.
You can change the logic or combine this with EMA, RSI, or price action tools for a complete trading system.
🔍 Use Cases:
Traders in markets where real OI data is not available (like Indian stocks/options).
To analyze buildup and unwinding behavior without relying on exchange-fed OI.
As a momentum filter or signal enhancer in broader strategies.
📌 Note:
This is a proxy indicator, not a substitute for actual Open Interest. But it’s highly effective when used alongside price action and trend filters.
Volume-Gated Contango/Backwardation (Front vs Back)A volume-gated term-structure indicator that waits for real front-month liquidity before plotting your front/back percent spread, highlighting contango (> 0 %) versus backwardation (< 0 %). It smooths the spread with an adjustable moving average, marks the exact roll-in bar, and subtly shades the background to reflect regime shifts. Tune the volume threshold, lookbacks, and MA to match any futures contract’s trading rhythm. Perfect for futures traders who need data-driven roll timing and a clear, at-a-glance view of carry dynamics.
Thai Gold BahtIndicator Name: Thai Gold Baht
Short Title: Thai Gold Baht
Purpose
This indicator calculates and visualizes the real-time price of 1 Thai Gold Baht (15.244 grams) based on the global gold price ( XAU/USD ) and the USD/THB exchange rate .
Users can customize gold weight and purity to simulate the local Thai gold market price.
What it does
Retrieves live gold price per troy ounce in USD
Retrieves current USD to Thai Baht exchange rate
Converts the value using user-defined weight and purity
Displays result as a real-time chart
Shows calculation details in the Data Window
Ideal for
Traders tracking Thai gold based on international prices
Analysts comparing local and global bullion markets
Anyone needing a configurable, transparent gold price conversion
Pine Script Functionality
// Uses XAU/USD and USD/THB as inputs
// Calculates 1 Baht Gold (96.5% default purity)
// Outputs the value in THB as a chart line
ชื่ออินดิเคเตอร์: Thai Gold Baht
ชื่อย่อ: Thai Gold Baht
วัตถุประสงค์
อินดิเคเตอร์นี้ใช้คำนวณและแสดงราคาทองคำไทย 1 บาท (15.244 กรัม) แบบเรียลไทม์
โดยอ้างอิงจากราคาทองคำในตลาดโลก ( XAU/USD ) และอัตราแลกเปลี่ยน USD/THB
ผู้ใช้สามารถกำหนดน้ำหนักทองและความบริสุทธิ์เองได้ เพื่อจำลองราคาทองคำในประเทศไทยอย่างแม่นยำ
สิ่งที่อินดิเคเตอร์นี้ทำ
ดึงราคาทองคำแบบเรียลไทม์ต่อทรอยออนซ์ในสกุลเงิน USD
ดึงอัตราแลกเปลี่ยน USD → THB แบบเรียลไทม์
คำนวณราคาจากน้ำหนักและเปอร์เซ็นต์ความบริสุทธิ์ที่ผู้ใช้กำหนด
แสดงผลลัพธ์เป็นกราฟแบบเรียลไทม์ในหน่วยบาทไทย
แสดงรายละเอียดการคำนวณในหน้าต่าง Data Window ของ TradingView
เหมาะสำหรับ
นักเทรดที่ต้องการติดตามราคาทองคำไทยจากราคาทองคำตลาดโลก
นักวิเคราะห์ที่เปรียบเทียบราคาทองคำในประเทศและต่างประเทศ
ผู้ใช้งานที่ต้องการการแปลงราคาทองคำระหว่างประเทศให้โปร่งใสและปรับแต่งได้
การทำงานของ Pine Script
// ใช้ข้อมูล XAU/USD และ USD/THB เป็นอินพุต
// คำนวณราคาทองคำไทย 1 บาท (ความบริสุทธิ์เริ่มต้นที่ 96.5%)
// แสดงผลเป็นเส้นกราฟของราคาทองคำในหน่วยบาทไทย
COT Index - DisaggregatedAn invite-only TradingView script that calculates the classic Disaggregated COT Index—transforming net long-short positions from the aggregate CFTC report into a 0–100 oscillator. Updated each Friday with new data, it provides a clean overbought/oversold signal you can overlay on any futures chart without fuss.
COT Index - FinancialAn invite-only TradingView script that calculates the classic Financial COT Index—transforming net long-short positions from the aggregate CFTC report into a 0–100 oscillator. Updated each Friday with new data, it provides a clean overbought/oversold signal you can overlay on any futures chart without fuss.
COT Index - LegacyAn invite-only TradingView script that calculates the classic Legacy COT Index—transforming net long-short positions from the aggregate CFTC report into a 0–100 oscillator. Updated each Friday with new data, it provides a clean overbought/oversold signal you can overlay on any futures chart without fuss.
COT Raw Data - DisaggregatedAn invite‐only TradingView script that delivers the original Disaggregated COT raw dataset—showing gross long and short positions, net long-short balances, and total open interest from the aggregate CFTC report. Updated every Friday, it gives you unfiltered, week-by-week data you can pull directly onto any futures chart for deep back-testing or live analysis.
COT Raw Data -FinancialAn invite‐only TradingView script that delivers the original Traders in Financial Futures COT raw dataset—showing gross long and short positions, net long-short balances, and total open interest from the aggregate CFTC report. Updated every Friday, it gives you unfiltered, week-by-week data you can pull directly onto any futures chart for deep back-testing or live analysis.
COT Raw Data - LegacyAn invite‐only TradingView script that delivers the original Legacy COT raw dataset—showing gross long and short positions, net long-short balances, and total open interest from the aggregate CFTC report. Updated every Friday, it gives you unfiltered, week-by-week data you can pull directly onto any futures chart for deep back-testing or live analysis.
RSV % Change - SelectRSV (Relative Strength Valuation) Model
Built exactly on Bernd Skorupinski’s original framework, the RSV Model first computes each asset’s percentage change over a user-defined period, then measures the spread between that change and the equivalent move in a chosen benchmark (DXY by default, or bonds, gold, or BTC). It normalizes this spread over a rolling lookback window to produce a 0–100 RSV reading, then recentres it into a –100 to +100 standardized score—so you see only the true valuation-adjusted momentum. Readings above +75 flag overvalued extremes; readings below –75 expose undervalued opportunities. With adjustable length and lookback settings, it delivers the identical edge Bernd Skorupinski’s trusts, stripped of lag and noise.
COT Raw Data - DisaggregatedAn invite‐only TradingView script that delivers the original Disaggregated COT raw dataset—showing gross long and short positions, net long-short balances, and total open interest from the aggregate CFTC report. Updated every Friday, it gives you unfiltered, week-by-week data you can pull directly onto any futures chart for deep back-testing or live analysis.
COT Raw Data -FinancialAn invite‐only TradingView script that delivers the original Traders in Financial Futures COT raw dataset—showing gross long and short positions, net long-short balances, and total open interest from the aggregate CFTC report. Updated every Friday, it gives you unfiltered, week-by-week data you can pull directly onto any futures chart for deep back-testing or live analysis.
COT Raw Data - LegacyAn invite‐only TradingView script that delivers the original Legacy COT raw dataset—showing gross long and short positions, net long-short balances, and total open interest from the aggregate CFTC report. Updated every Friday, it gives you unfiltered, week-by-week data you can pull directly onto any futures chart for deep back-testing or live analysis.
COT Index - LegacyAn invite-only TradingView script that calculates the classic Legacy COT Index—transforming net long-short positions from the aggregate CFTC report into a 0–100 oscillator. Updated each Friday with new data, it provides a clean overbought/oversold signal you can overlay on any futures chart without fuss.
COT Index - FinancialAn invite-only TradingView script that calculates the classic Financial COT Index—transforming net long-short positions from the aggregate CFTC report into a 0–100 oscillator. Updated each Friday with new data, it provides a clean overbought/oversold signal you can overlay on any futures chart without fuss.
COT Index - DisaggregatedAn invite-only TradingView script that calculates the classic Disaggregated COT Index—transforming net long-short positions from the aggregate CFTC report into a 0–100 oscillator. Updated each Friday with new data, it provides a clean overbought/oversold signal you can overlay on any futures chart without fuss.
RSV % Change - SelectRSV (Relative Strength Valuation) Model
Built exactly on Bernd Skorupinski’s original framework, the RSV Model first computes each asset’s percentage change over a user-defined period, then measures the spread between that change and the equivalent move in a chosen benchmark (DXY by default, or bonds, gold, or BTC). It normalizes this spread over a rolling lookback window to produce a 0–100 RSV reading, then recentres it into a –100 to +100 standardized score—so you see only the true valuation-adjusted momentum. Readings above +75 flag overvalued extremes; readings below –75 expose undervalued opportunities. With adjustable length and lookback settings, it delivers the identical edge Bernd Skorupinski’s trusts, stripped of lag and noise.
Market Cap & Turnover (in Cr)This script will suggest Market cap & Close price X volume in Rs crore
can be use to find out liquidity rush
Volume Change % Display1- Current bar's volume change %
2- Previous bar's volume change %
* Each line uses its own color based on volume rising or falling.
* Keeps the layout compact and readable.
CK Trader Pro sessions plus LSMALSMA Multi-Timeframe Indicator
The LSMA Multi-Timeframe Indicator is a powerful tool designed to enhance trend analysis by incorporating Least Squares Moving Average (LSMA) calculations across multiple timeframes. This indicator displays LSMA values from the 1-minute, 5-minute, 15-minute, and 1-hour charts, allowing traders to gain deeper insight into the overall trend structure and potential areas of support or resistance.
By visualizing LSMA across different timeframes, traders can:
✅ Identify Key Support & Resistance – Higher timeframe LSMA levels often act as strong barriers where price reacts.
✅ Enhance Trend Confirmation – A confluence of LSMAs pointing in the same direction strengthens confidence in a trend.
✅ Spot Reversals & Trend Shifts Early – Watching lower timeframe LSMAs in relation to higher ones can signal potential shifts before they fully develop.
This indicator is ideal for traders looking to align short-term entries with longer-term trend dynamics, providing an edge in both intraday and swing trading strategies
CK Session Tracker – Global Market Session Levels
The CK Session Tracker is a precision-built TradingView indicator designed to map out the most critical times in the market — the Asia, EU, and US sessions. This tool automatically plots the open, close, high, and low of each major session, giving traders a crystal-clear view of market structure, key liquidity zones, and session-based momentum shifts.
🔍 Features:
🕒 Automatic Session Markers – Visualize the exact open and close times of Asia, Europe, and US sessions directly on your chart.
📈 Session Highs & Lows – Instantly spot where price reacted during each session, helping identify breakouts, reversals, or liquidity grabs.
🌐 Global Market Awareness – Designed to adapt to futures, forex, and crypto across all time zones.
🎯 Smart Trading Zones – Use session data to pinpoint high-probability setups during overlaps or session handoffs.
Perfect for intraday traders, ICT strategy followers, and anyone focused on session-based movement. The CK Session Tracker gives you the edge of institutional timing — all on one chart..
FA Dashboard: Valuation, Profitability & SolvencyFundamental Analysis Dashboard: A Multi-Dimensional View of Company Quality
This script presents a structured and customizable dashboard for evaluating a company’s fundamentals across three key dimensions: Valuation, Profitability, and Solvency & Liquidity.
Unlike basic fundamental overlays, this dashboard consolidates multiple financial indicators into visual tables that update dynamically and are grouped by category. Each ratio is compared against configurable thresholds, helping traders quickly assess whether a company meets certain value investing criteria. The tables use color-coded checkmarks and fail marks (✔️ / ❌) to visually signal pass/fail evaluations.
▶️ Key Features
Valuation Ratios:
Earnings Yield: EBIT / EV
EV / EBIT and EV / FCF: Enterprise value metrics for profitability
Price-to-Book, Free Cash Flow Yield, PEG Ratio
Profitability Ratios:
Return on Invested Capital (ROIC), ROE, Operating, Net & Gross Margins, Revenue Growth
Solvency & Liquidity Ratios:
Debt to Equity, Debt to EBITDA, Current Ratio, Quick Ratio, Altman Z-Score
Each of these metrics is calculated using request.financial() and can be viewed using either annual (FY) or quarterly (FQ) data, depending on user preference.
🧠 How to Use
Add the script to any stock chart.
Select your preferred data period (FY or FQ).
Adjust thresholds if desired to match your personal investing strategy.
Review the visual dashboard to see which metrics the company passes or fails.
💡 Why It’s Useful
This tool is ideal for traders or long-term investors looking to filter stocks using fundamental criteria. It draws inspiration from principles used by Benjamin Graham, Warren Buffett, and Joel Greenblatt, offering a fast and informative way to screen quality businesses.
This is not a repackaged built-in or autogenerated script. It’s a custom-built, interactive tool tailored for fundamental analysis using official financial data provided via Pine Script’s request.financial().
Spent Output Profit Ratio Z-Score | Vistula LabsOverview
The Spent Output Profit Ratio (SOPR) Z-Score indicator is a sophisticated tool designed by Vistula Labs to help cryptocurrency traders analyze market sentiment and identify potential trend reversals. It leverages on-chain data from Glassnode to calculate the Spent Output Profit Ratio (SOPR) for Bitcoin and Ethereum, transforming this metric into a Z-Score for easy interpretation.
What is SOPR?
Spent Output Profit Ratio (SOPR) measures the profit ratio of spent outputs (transactions) on the blockchain:
SOPR > 1: Indicates that, on average, coins are being sold at a profit.
SOPR < 1: Suggests that coins are being sold at a loss.
SOPR = 1: Break-even point, often seen as a key psychological level.
SOPR provides insights into holder behavior—whether they are locking in profits or cutting losses—making it a valuable gauge of market sentiment.
How It Works
The indicator applies a Z-Score to the SOPR data to normalize it relative to its historical behavior:
Z-Score = (Smoothed SOPR - Moving Average of Smoothed SOPR) / Standard Deviation of Smoothed SOPR
Smoothed SOPR: A moving average (e.g., WMA) of SOPR over a short period (default: 30 bars) to reduce noise.
Moving Average of Smoothed SOPR: A longer moving average (default: 180 bars) of the smoothed SOPR.
Standard Deviation: Calculated over a lookback period (default: 200 bars).
This Z-Score highlights how extreme the current SOPR is compared to its historical norm, helping traders spot significant deviations.
Key Features
Data Source:
Selectable between BTC and ETH, using daily SOPR data from Glassnode.
Customization:
Moving Average Types: Choose from SMA, EMA, DEMA, RMA, WMA, or VWMA for both smoothing and main averages.
Lengths: Adjust the smoothing period (default: 30) and main moving average length (default: 180).
Z-Score Lookback: Default is 200 bars.
Thresholds: Set levels for long/short signals and overbought/oversold conditions.
Signals:
Long Signal: Triggered when Z-Score crosses above 1.02, suggesting potential upward momentum.
Short Signal: Triggered when Z-Score crosses below -0.66, indicating potential downward momentum.
Overbought/Oversold Conditions:
Overbought: Z-Score > 2.5, signaling potential overvaluation.
Oversold: Z-Score < -2.0, indicating potential undervaluation.
Visualizations:
Z-Score Plot: Teal for long signals, magenta for short signals.
Threshold Lines: Dashed for long/short, solid for overbought/oversold.
Candlestick Coloring: Matches signal colors.
Arrows: Green up-triangles for long entries, red down-triangles for short entries.
Background Colors: Magenta for overbought, teal for oversold.
Alerts:
Conditions for Long Opportunity, Short Opportunity, Overbought, and Oversold.
Usage Guide
Select Cryptocurrency: Choose BTC or ETH.
Adjust Moving Averages: Customize types and lengths for smoothing and main averages.
Set Thresholds: Define Z-Score levels for signals and extreme conditions.
Monitor Signals: Use color changes, arrows, and background highlights to identify opportunities.
Enable Alerts: Stay informed without constant chart watching.
Interpretation
High Z-Score (>1.02): SOPR is significantly above its historical mean, potentially indicating overvaluation or strong bullish momentum.
Low Z-Score (<-0.66): SOPR is below its mean, suggesting undervaluation or bearish momentum.
Extreme Conditions: Z-Scores above 2.5 or below -2.0 highlight overbought or oversold markets, often preceding reversals.
Conclusion
The SOPR Z-Score indicator combines on-chain data with statistical analysis to provide traders with a clear, actionable view of market sentiment. Its customizable settings, visual clarity, and alert system make it an essential tool for both novice and experienced traders seeking an edge in the cryptocurrency markets.