Gas/Oil SpreadGas/Oil Spread Analyzer with Static Overbought/Oversold Zones
This indicator measures the spread between the actual price of natural gas and its oil-based equivalent, derived from a defined oil/gas ratio. It helps traders identify potential mispricings and mean-reversion opportunities between the two energy commodities.
Key Features:
- Calculates spread: Gas Price – Oil-Based Equivalent Price
- Supports dynamic or static oil/gas ratio
- Plots a smoothed version of the spread (SMA)
- Displays static overbought and oversold zones to highlight extreme deviations
Use Cases:
- Detect overvalued or undervalued gas relative to oil
- Spot potential reversion setups in intermarket trading
- Evaluate energy market dislocations and hedging opportunities
Fundamental Analysis
Oil/gas ratio MAOil/Gas Ratio-Based Equivalent Price
This indicator calculates the gas-equivalent price based on the current oil price and a defined oil/gas ratio. It helps identify relative overvaluation or undervaluation of natural gas compared to oil.
Features:
- Choose between a static or dynamic (SMA-based) oil/gas ratio
- Displays the fair value of gas derived from oil prices
- Works with any oil ticker symbol (e.g. BRENT, USOIL, etc.)
Useful for traders analyzing intermarket relationships and looking for relative value signals between energy commodities.
AI-123's BTC vs Gold (Lag Correlation)
DISCLAIMER
I made this indicator with the help of ChatGPT and using what I have learned so far from The Pine Script Mastery Course, LOTS of edits based on what I have learned so far had to be made as well as additions and modifications to my liking thanks to what I have learned so far. I am aware this already exists but I have done my best to make a first ever script/indicator while learning how to properly publish as well, so please bear that in mind.
Overview
This indicator analyzes the correlation between Bitcoin (BTC) and Gold (XAUUSD), with a customizable lag applied to the Gold price, providing insight into the macro relationship between these two assets.
It is designed for traders and investors who want to track how Bitcoin and Gold move in relation to each other, particularly when Gold is lagged by a specific number of days.
Key Features:
BTC and Gold (Lagged) Price Overlay: Display Bitcoin (BTC) and Gold (XAUUSD) prices on the chart, with an adjustable lag applied to the Gold price.
Rolling Correlation Calculation: Measures the correlation between Bitcoin and lagged Gold prices over a customizable lookback period.
Adjustable Lag: The number of days that Gold is lagged relative to Bitcoin is fully customizable (default: 20 days).
Customizable Correlation Length: Allows you to choose the lookback period for the correlation (default: 50 days), providing flexibility for short-term or long-term analysis.
Normalized Plotting: Prices of Bitcoin and Gold are normalized for better visual alignment with the correlation values. BTC is divided by 1000, and Gold by 100.
Correlation Scaling: The correlation value is amplified by 10 for better visual clarity and comparison with price data.
Zero Line: Horizontal line representing a correlation of 0, making it easier to identify positive or negative correlation shifts.
Maximum Correlation Lines: Horizontal lines at +10 and -10 values for extreme correlation scenarios.
Input Settings:
Gold Symbol: Customize the Gold ticker (default: OANDA:XAUUSD).
Bitcoin Symbol: Customize the Bitcoin ticker (default: BINANCE:BTCUSDT).
Lag (in trading days): Adjust the number of trading days to lag the Gold price relative to Bitcoin (default: 20).
Correlation Length (days): Set the number of days over which the rolling correlation is calculated (default: 50).
How to Use:
Price Comparison: The BTC (Spot) and Lagged Gold plots give you a side-by-side visual comparison of the two assets, normalized for clarity.
Correlation Line: The correlation line helps you gauge the strength and direction of the relationship between BTC and lagged Gold. Positive values indicate a strong positive correlation, while negative values indicate a negative correlation.
Visual Analysis: Watch how the correlation shifts with changes in lag and correlation length to identify potential market dynamics between Bitcoin and Gold.
Potential Applications:
Macro Trading: Track how Bitcoin and Gold behave in relation to each other during periods of economic uncertainty or inflation.
Sentiment Analysis: Use the correlation data to understand the sentiment between digital and traditional assets.
Strategic Timing: Identify potential opportunities where Bitcoin and Gold show a strong correlation or diverge based on the lag adjustment.
Understanding Macro Trends/Correlations.
Disclaimer:
This indicator is for informational purposes only. The correlation between Bitcoin and Gold does not guarantee future performance, and users should conduct their own research and use risk management strategies when making trading decisions.
Notes: This script uses historical data, so results may vary across different timeframes.
Customization options allow users to adjust the lag and correlation length to better fit their trading strategy.
Future Enhancements: Additional Correlation Line: A second correlation line for different lengths of lag or different assets.
Color-Coding of Correlation: Future updates may include color-coded correlation strength, visually indicating positive or negative correlation more effectively.
Kimchi premium with BTC gap [BIGTAKER]📊 Kimchi Premium with BTC gap
The BIGTAKER Kimchi Premium Indicator is a real-time tool that accurately tracks and visualizes the price discrepancy (Kimchi Premium) between the Korean KRW markets (Upbit or Bithumb) and global cryptocurrency exchanges.
In addition to displaying the premium on altcoins, it compares the difference against Bitcoin's premium and highlights abnormal divergence through signal alerts and visual cues.
🔧 Key Features
KRW Market Selection
Users can select either Upbit or Bithumb as the reference Korean exchange. Only altcoins listed on the selected exchange will be analyzed and shown.
Multi-Exchange Global Pricing
The global reference price is not fixed to a single exchange like Binance. Instead, the indicator dynamically uses the price data from the exchange that the user opens on TradingView — such as OKX, BYBIT, BITGET, GATE.IO, MEXC, and more.
If the global symbol is supported on TradingView, the corresponding market price is retrieved and converted into KRW using the FX rate, allowing real-time global-vs-Korea price comparison.
Accurate Premium Calculation
Altcoin Premium = ((KRW Price - Global Price in KRW) / Global Price in KRW) × 100
BTC Premium = ((BTC_KRW - BTC_USDT×FX) / (BTC_USDT×FX)) × 100
Premium Gap Signal Alerts
When the gap between altcoin premium and Bitcoin premium exceeds a user-defined threshold (e.g., 3%), the chart highlights the bar with a yellow background, and a signal alert is triggered.
Visual Data Representation
Bar colors automatically change based on premium intensity
BTC Kimchi Premium and Coinbase-Binance Premium lines are plotted together
The latest candle shows a label with the coin name and premium value
Integrated Alerts
Fully compatible with TradingView alerts — allowing users to receive instant notifications when the premium gap crosses the defined threshold.
⚙️ User Settings
Select Exchange: Choose domestic KRW market (Upbit / Bithumb)
Premium Gap Threshold (%): Set the minimum gap between altcoin and BTC premium to trigger signals (default: 3%)
🧠 Use Cases
Premium Gap Trading Strategies
Identify altcoins with unusually high premium divergence compared to BTC and take positions based on mean-reversion logic.
Market Overheating Detection
Detect abnormal buying pressure or local overvaluation when an altcoin’s premium rapidly expands beyond normal ranges.
Tracking Global vs. Korean Market Flow
Monitor capital flows by comparing KRW market premiums to real-time global market pricing.
PRIME 2.0PRIME 2.0 — Precision Entry Tool
PRIME 2.0 is a smart price action-based indicator designed for intraday traders who want to catch high-probability moves during the London session. It uses a combination of market structure shifts (CHOCH – Change of Character) and session-based timing to identify potential entries.
🔍 Key Features:
Session-Based Logic: Activates after the London market opens, filtering noise from other sessions.
CHOCH Detection: Spots shifts in market structure by identifying crossover and crossunder of candle highs/lows.
Visual Entry Points: Plots real-time entry points based on structure change.
🧠 Who Is It For?
Scalpers and day traders
Traders who follow Smart Money Concepts (SMC)
Anyone looking to improve entry precision without clutter
⚠️ Disclaimer:
This indicator does not generate buy/sell signals or exit points. It is meant to be used as a tool within a broader trading strategy. Combine it with your own risk management and market knowledge for best results
Balancelink : Partition Function 1.0This script computes the partition function values 𝑝(𝑛) using Euler’s Pentagonal Number Theorem and displays them in a horizontally wrapped table directly on the chart. The partition function is a classic function in number theory that counts the number of ways an integer 𝑛 can be expressed as a sum of positive integers, disregarding the order of the summands.
Key Features
Efficient Calculation:
The script computes 𝑝(𝑛) for all orders from 0 up to a user-defined maximum (set by the "End Order" input). The recursive computation leverages Euler’s Pentagonal Number Theorem, ensuring the function is calculated correctly for each order.
Display Range Selection:
Users can select a specific range of orders (for example, from 𝑛 = 100 to 𝑛 = 200 to display.) This means you can focus on a particular segment of the partition function results without cluttering the chart.
Horizontally Wrapped Table:
The partition values are organized into a clean, horizontal table with a customizable number of columns per row (default is 20). When the number of values exceeds the maximum columns, the table automatically wraps onto a new set of rows for better readability.
Medium Text Size:
The table cells use a medium (normal) text size for easy viewing and clarity.
How to Use
Inputs:
Start Order (n): The starting index from which you want to display the partition function (default is 100).
End Order (n): The ending index up to which the partition function values will be displayed (default is 200).
Max Columns Per Row: Determines how many results are shown per row before wrapping to the next (default is 20).
Calculation:
The script calculates all 𝑝(𝑛) values from 0 up to the specified "End Order". It then extracts and displays only the values in the chosen range.
Visualization:
The computed values are shown in a neatly arranged table at the top right of your TradingView chart, making it simple to scroll through and inspect the partition function values.
Use Cases
Educational & Research:
Ideal for educators and students exploring concepts of integer partitions and number theory.
Data Analysis & Pattern Recognition:
Useful for those interested in the behavior and growth of partition numbers as 𝑛 increases.
Risk-On / Risk-Off MeterThe risk on/off meter helps you assess the market's overall risk sentiment.
Try using it on the VIX daily chart.
The calculation is based on the following values:
Risk-On Assets
spx dax nas100 copper oil audusd nzdusd btc audjpy
Risk-Off Assets
gold usdjpy usdchf vix us02y us10y us30y dxy
Below a calculated value of 25, Risk Of is displayed as being above a value of 65 Risk On. The neutral market phase is in between. The indicator is used purely as a market sentiment indicator and does not provide any trading recommendations.
Yield Curve 1.2Yield Curve is a macroeconomic analysis tool designed to visualize and interpret changes in the shape of government bond yield curves across major economies.
Use it in any 1H Chart
It tracks the difference between 10-year and 2-year government bond yields for key countries (e.g. US, EUR, JPY, AUD, GBP, etc.) and compares the current yield levels to their values recorded every Monday at 2:00 UTC. Based on this comparison, the indicator categorizes the yield curve movement into common market regimes such as:
Bull Flattener
Bear Steepener
Parallel Shift
and others.
Each regime gives insight into how markets are adjusting their expectations for future interest rates, economic growth, or central bank policy.
The indicator presents this analysis in a clear table format, showing:
Current and Monday yields
Yield changes (in basis points)
Yield spread (10Y - 2Y)
Detected regime type
A simplified grade and brief explanation for each case
Color coding is used throughout the table to help visually distinguish between steepening, flattening, and parallel shift scenarios.
3 Way ValuationThe 3 Way Valuation (3WV) is a composite oscillator that evaluates market conditions by combining a diverse range of metrics into a single smoothed value between 0 and 1. It draws from multiple domains, including momentum, trend strength, volatility, risk-adjusted return ratios, and volume-based analytics to offer a well-rounded view of an asset’s relative positioning.
At its core, 3WV integrates three statistical approaches: Percentile Ranking to assess how current values compare to historical distributions, Z-Score Normalization to measure deviation from the average, and Empirical CDF (ECDF) to estimate the probability of observing a value based on past behavior. These methods are applied across all selected metrics, then normalized and averaged for a comprehensive market sentiment score.
Users can tailor the smoothing level and choose whether to include volume-based components for enhanced filtering. The indicator highlights potential overbought and oversold conditions with customizable thresholds, making it a versatile tool for timing entries, exits, or confirming broader strategies.
Retirement Portfolio Dashboard1. Set It Up
Paste the script into the Pine Script editor in TradingView
Add to chart (use a daily chart for any TSX ticker)
Configure the inputs on the right panel:
Choose your ETF tickers (default: VFV, XAW, XIC)
Enter your target allocations (U.S., Global, Canada, Cash)
Set your current portfolio value and contribution plan
Adjust your expected return and rebalance trigger
📊 2. What It Tracks
💼 Allocation Overview
Target vs. actual % for each asset class
CAD value of each component
Performance YTD based on Jan 2nd start
Drift % to see how far each asset has deviated
📈 Growth Forecast
Future value projection with contributions
Weighted return (based on typical historical returns)
Inflation-adjusted real return (assuming 2% inflation)
⚠ Rebalancing
If any drift exceeds your set threshold (e.g., 5%), the script:
Highlights the issue in red
Displays "⚠ Rebalance Suggested"
Triggers a TradingView alert if you've activated it
🔔 3. Set Up Alerts
Go to Alerts > Create Alert
Choose your script from the dropdown
Under Condition, select "Rebalance Alert"
Choose your desired alert type (popup, email, webhook, etc.)
✅ 4. How to Use It Effectively
Task What to Do
Monitor allocations Check dashboard weekly or monthly
Spot imbalances Use Drift % and Status (green/red)
Forecast retirement growth Adjust contributions, return rate, and horizon
Prepare to rebalance Use alerts when drift > threshold
Tune assumptions Change expected returns or inflation rate as needed
💡 Tips
You can edit return assumptions (e.g., make Global equity more conservative)
Use this on a “blank” ticker (like TSX:XIC) so you don't overlay the chart
Copy values from your broker or retirement account to update real allocations
OverUnder Yield Spread🗺️ OverUnder is a structural regime visualizer , engineered to diagnose the shape, tone, and trajectory of the yield curve. Rather than signaling trades directly, it informs traders of the world they’re operating in. Yield curve steepening or flattening, normalizing or inverting — each regime reflects a macro pressure zone that impacts duration demand, liquidity conditions, and systemic risk appetite. OverUnder abstracts that complexity into a color-coded compression map, helping traders orient themselves before making risk decisions. Whether you’re in bonds, currencies, crypto, or equities, the regime matters — and OverUnder makes it visible.
🧠 Core Logic
Built to show the slope and intent of a selected rate pair, the OverUnder Yield Spread defaults to 🇺🇸US10Y-US2Y, but can just as easily compare global sovereign curves or even dislocated monetary systems. This value is continuously monitored and passed through a debounce filter to determine whether the curve is:
• Inverted, or
• Steepening
If the curve is flattening below zero: the world is bracing for contraction. Policy lags. Risk appetite deteriorates. Duration gets bid, but only as protection. Stocks and speculative assets suffer, regardless of positioning.
📍 Curve Regimes in Bull and Bear Contexts
• Flattening occurs when the short and long ends compress . In a bull regime, flattening may reflect long-end demand or fading growth expectations. In a bear regime, flattening often precedes or confirms central bank tightening.
• Steepening indicates expanding spread . In a bull context, this may signal healthy risk appetite or early expansion. In a bear or crisis context, it may reflect aggressive front-end cuts and dislocation between short- and long-term expectations.
• If the curve is steepening above zero: the world is rotating into early expansion. Risk assets behave constructively. Bond traders position for normalization. Equities and crypto begin trending higher on rising forward expectations.
🖐️ Dynamically Colored Spread Line Reflects 1 of 4 Regime States
• 🟢 Normal / Steepening — early expansion or reflation
• 🔵 Normal / Flattening — late-cycle or neutral slowdown
• 🟠 Inverted / Steepening — policy reversal or soft landing attempt
• 🔴 Inverted / Flattening — hard contraction, credit stress, policy lag
🍋 The Lemon Label
At every bar, an anchored label floats directly on the spread line. It displays the active regime (in plain English) and the precise spread in percent (or basis points, depending on resolution). Colored lemon yellow, neither green nor red, the label is always legible — a design choice to de-emphasize bias and center the data .
🎨 Fill Zones
These bands offer spatial, persistent views of macro compression or inversion depth.
• Blue fill appears above the zero line in normal (non-inverted) conditions
• Red fill appears below the zero line during inversion
🧪 Sample Reading: 1W chart of TLT
OverUnder reveals a multi-year arc of structural inversion and regime transition. From mid-2021 through late 2023, the spread remains decisively inverted, signaling persistent flattening and credit stress as bond prices trended sharply lower. This prolonged inversion aligns with a high-volatility phase in TLT, marked by lower highs and an accelerating downtrend, confirming policy lag and macro tightening conditions.
As of early 2025, the spread has crossed back above the zero baseline into a “Normal / Steepening” regime (annotated at +0.56%), suggesting a macro inflection point. Price action remains subdued, but the shift in yield structure may foreshadow a change in trend context — particularly if follow-through in steepening persists.
🎭 Different Traders Respond Differently:
• Bond traders monitor slope change to anticipate policy pivots or recession signals.
• Equity traders use regime shifts to time rotations, from growth into defense, or from contraction into reflation.
• Currency traders interpret curve steepening as yield compression or divergence depending on region.
• Crypto traders treat inversion as a liquidity vacuum — and steepening as an early-phase risk unlock.
🛡️ Can It Compare Different Bond Markets?
Yes — with caveats. The indicator can be used to compare distinct sovereign yield instruments, for example:
• 🇫🇷FR10Y vs 🇩🇪DE10Y - France vs Germany
• 🇯🇵JP10Y vs 🇺🇸US10Y - BoJ vs Fed policy curves
However:
🙈 This no longer visualizes the domestic yield curve, but rather the differential between rate expectations across regions
🙉 The interpretation of “inversion” changes — it reflects spread compression across nations , not within a domestic yield structure
🙊 Color regimes should then be viewed as relative rate positioning , not absolute curve health
🙋🏻 Example: OverUnder compares French vs German 10Y yields
1. 🇫🇷 Change the long-duration ticker to FR10Y
2. 🇩🇪 Set the short-duration ticker to DE10Y
3. 🤔 Interpret the result as: “How much higher is France’s long-term borrowing cost vs Germany’s?”
You’ll see steepening when the spread rises (France decoupling), flattening when the spread compresses (convergence), and inversions when Germany yields rise above France’s — historically rare and meaningful.
🧐 Suggested Use
OverUnder is not a signal engine — it’s a context map. Its value comes from situating any trade idea within the prevailing yield regime. Use it before entries, not after them.
• On the 1W timeframe, OverUnder excels as a macro overlay. Yield regime shifts unfold over quarters, not days. Weekly structure smooths out rate volatility and reveals the true curvature of policy response and liquidity pressure. Use this view to orient your portfolio, define directional bias, or confirm long-duration trend turns in assets like TLT, SPX, or BTC.
• On the 1D timeframe, the indicator becomes tactically useful — especially when aligning breakout setups or trend continuations with steepening or flattening transitions. Daily views can also identify early-stage regime cracks that may not yet be visible on the weekly.
• Avoid sub-daily use unless you’re anchoring a thesis already built on higher timeframe structure. The yield curve is a macro construct — it doesn’t oscillate cleanly at intraday speeds. Shorter views may offer clarity during event-driven spikes (like FOMC reactions), but they do not replace weekly context.
Ultimately, OverUnder helps you decide: What kind of world am I trading in? Use it to confirm macro context, avoid fighting the curve, and lean into trades aligned with the broader pressure regime.
Rotation Phase Signal OnlyHow to Use the “Rotation Phase Signal Only” Script
(Floating Dashboard Version)
This version gives you a clean, unobtrusive way to monitor the market regime and rotation instructions on any chart — whether you’re tracking your dividend ETFs, growth funds, or defensive positions.
✅ What It Does
This script tracks:
SPY:TLT — Stocks vs. Bonds (macro equity trend)
QQQ:XLU — Growth vs. Defensive (sector risk appetite)
It calculates weekly EMAs of these ratios to determine which phase we are in:
Phase Signal Interpretation Reallocation Action
GROWTH Stocks & growth sectors lead Add MTUM, VUN, XMTM / Trim income assets
INCOME Stocks weak, growth holding Add HHIS, HYLD, QQQY / Trim growth
DEFENSIVE Bonds and defensives lead Add HPYT, HPYT.U, ZGLD / Exit most equity
NEUTRAL Mixed or unclear signals Hold / minor rebalancing only
🧱 Key Features of This Version
Feature Description
📊 Floating Table Always visible in the top-right corner of the chart
🔄 Dynamic Updates Adjusts weekly as the regime changes
✅ Use On Any Ticker You can run this on DFN, QQQY, HYLD, etc.
🔔 Built-In Alerts Alerts trigger when the phase changes
🗓️ Weekly Workflow (Suggested)
Open Your Main Chart
Use this on any ticker — your dividend ETFs, growth ETF, or even individual stocks.
Check the Floating Table
PHASE: The current regime (GROWTH, INCOME, DEFENSIVE, or NEUTRAL)
ADD: What ETFs to accumulate
SELL: What ETFs or sectors to trim or rotate out of
Take Action
Rebalance or allocate new capital based on the table guidance.
Set Alerts (Optional)
Click “🔔 Alerts” in TradingView
Set up alerts for when the Phase changes
Example: “Alert me when Phase = DEFENSIVE”
🔔 Example Alert Setup
Click on Alerts
Choose:
Condition: Rotation Phase Signal Only
Value: GROWTH or INCOME or DEFENSIVE
Choose alert type: pop-up, email, webhook, etc.
💡 Pro Tips
Use this alongside your Dividend or Income Dashboards for smarter reinvestment decisions.
Rotation Phase TriggerHow to Use the Full Rotation Phase Trigger Tool (non-floating version)
This version is ideal for macro-level market context, helping you decide when to rotate between growth, income, and defensive positions using visual cues directly on the chart.
🧱 Components Recap (Non-Floating Version)
ROC Histograms:
SPY:TLT ROC (green bars): Measures equity strength vs. bonds
QQQ:XLU ROC (blue bars): Measures growth vs. defensive rotation
EMA Trend Filter:
Uses a fast/slow EMA crossover on both ratios to confirm the trend
When both are rising → confirms GROWTH phase
Phase Background Colors:
🟩 Green = GROWTH
🟧 Orange = INCOME
🟥 Red = DEFENSIVE
No color = NEUTRAL
Instruction Labels:
Show what sectors to add and what to sell (with ETF tickers)
Alert Conditions:
Can be linked to email, SMS, or app notifications
Triggered when phase changes
✅ Weekly Workflow
Every Monday (or Weekend Prep)
1. Open SPY on a Weekly Chart
This tool is designed around the U.S. equity vs bond regime
Always keep SPY as the main chart for best alignment
2. Check the Background Color
Instantly tells you what regime you're in:
Green → rotate into growth ETFs
Orange → stick to or buy income-generating ETFs
Red → get defensive, raise cash, or buy bond/hedge ETFs
3. Read the Labels
Top label = phase status (e.g., GROWTH)
Bottom label = action instructions:
What ETFs to accumulate (MTUM, VUN, HYLD, etc.)
What sectors or funds to rotate out of
4. Look at Momentum Histograms
Confirms whether the regime shift is gaining strength
Larger bars = stronger conviction
Diverging directions? Wait for confirmation
🔁 Tactical Rotation Plan
Phase Add Trim/Sell
GROWTH MTUM, VUN, XMTM, HXS, VTI HYLD, HHIS, HPYT
INCOME HYLD, HHIS, QQQY, DFN, DGS MTUM, VUN
DEFENSIVE HPYT, HPYT.U, ZGLD, GDE All equities
NEUTRAL Nothing new, rebalance if needed Excess risk positions
🔔 Alert Setup (Optional)
You can create alerts in TradingView using:
Right-click chart → "Add Alert"
Use condition: "Rotation Phase Trigger" → "GROWTH" / "INCOME" / "DEFENSIVE"
Choose notification method (popup, app, email, etc.)
💡 Pro Tips
Use this version on SPY weekly only — for best signal clarity
Fair value and MOSShowing the fair value and margin of safety for a Stock.
Works best with 12 months timeframe.
The calculations are based on historical data for multiple years, up to 10 years.
You will see the following as numbers at the indicator line:
- Forward EPS Growth in %
- Forward PE Calculated
- Forward PE Estimated
The two lines will be shown in green if they are above the current price and in red if the price is bellow the lines.
- The upper line shows the fair value of the stock, calculated with 15% (or 4x in 10 years) expected EPS growth for your investment.
- The lower line shows the margin of safety, calculated at 50% of the fair value.
You can adjust the values at "Forward EPS Growth in %" and "Expected future PE" in order to show your fair price and the price with margin of safety.
Simple Fundamental Analysis Fundamental Analysis
This indicator provides comprehensive fundamental analysis directly on your chart, displaying key financial metrics in a color-coded table format. It goes beyond basic metrics by calculating fair value estimates and generating buy/sell signals based on overall fundamental health.
Key features:
14 essential fundamental metrics including EPS, P/E Ratio, PEG Ratio, and valuation ratios
Fair value calculation (PE × EPS) showing potential under/overvaluation
Value gap percentage to quickly identify investment opportunities
Color-coded values (green for healthy, red for concerning)
Automatic buy/sell/neutral signals based on overall fundamental analysis
Percentage rating showing the strength of buy/sell signals
This tool helps traders and investors make informed decisions based on fundamental data rather than just technical indicators. Perfect for value investors looking to identify fundamentally sound companies trading at attractive prices.
Disclaimer
This indicator is provided for informational and educational purposes only. The buy/sell signals and fundamental analysis presented are not investment advice or recommendations to buy, sell, or hold any security.
The financial data used is sourced from TradingView's database and may not always be current or accurate. Some metrics may be unavailable for certain stocks, which could affect the overall rating. Different industries have different norms for "good" metrics - what's healthy for one sector may not be for another.
The fair value calculation uses a standard PE ratio of 15, which may not be appropriate for all companies or industries. High-growth companies typically command higher multiples, while mature companies may trade at lower multiples.
Past performance is not indicative of future results. Always conduct your own research and consider consulting a financial advisor before making investment decisions.
Blended Net Liquidity CorrelationThis indicator visualizes a customizable net liquidity metric based on key U.S. Federal Reserve and Treasury data from FRED. It allows users to blend two liquidity models:
• With WALCL: Incorporates the Fed’s total balance sheet (WALCL) — ideal for capturing long-term structural liquidity from QE/QT.
• Without WALCL: Excludes the balance sheet and focuses on short-term operational flows like RRP, TGA, BTFP, and commercial lending.
Use the “Weight on WALCL” slider to find your optimal blend. A setting of 1.0 uses only WALCL, 0.0 uses only short-term flows, and any value in between gives a mix.
The indicator also calculates the correlation between net liquidity and price over various timeframes:
• 30D, 60D, 90D, 180D
• 1Y, 1.5Y, 2Y
• A custom length (default 3 years)
Constant Valuation Multiple LevelsThis indicator adds price levels at constant multiples based on your preferred valuation metric. The settings provides options for setting this metric while Operational Income is the default one.
This indicator is not perfect as it relies on historical earnings data but does not have forecast data (not available in pinescript), thus its not a guide for future price level. It also does not account for "adjusted" earnings which may skew levels for some quarters.
However this script provides a quick way to see the stock price against your preferred valuation multiple to see if it's undervalued and worth investigating further for quality and earnings forecast.
Days Live CounterThis quite simply tracks how many days an asset has been on Trading View for.
The indicator calculates the day count based on the timestamp of the first visible bar in your current chart view. Since monthly charts generally load data from further back in time than daily or intraday charts, they'll show a larger day count.
This isn't a bug in the indicator - it's correctly counting the days from the first bar it can see in each timeframe.
BeSight Mega SpotBeSight Mega Spot – Zone Based Price Grid Indicator
สคริปต์นี้ถูกออกแบบมาเพื่อช่วยเทรดเดอร์มองเห็นโซนราคาสำคัญที่ราคาอาจเกิดปฏิกิริยา โดยอ้างอิงจากระดับราคาที่ลงท้ายด้วย 0 และ 5 (เช่น 1350, 1355, 1360 เป็นต้น) ซึ่งมักเป็นระดับที่มีการตั้งคำสั่งซื้อขายจำนวนมากในตลาด
BeSight Mega Spot – Zone-Based Price Grid Indicator
This indicator is designed to help traders visualize key price zones where the market often reacts, based on price levels ending with 0 or 5 (e.g., 1350, 1355, 1360). These levels are commonly used for pending orders, liquidity, or price clustering zones.
It displays horizontal grid lines at fixed step intervals (default: every 5 points), covering the entire visible price range of the chart. Each price level is labeled for better clarity and planning.
🟦 Blue lines: Price levels ending in 0
⬜ Gray lines: Price levels ending in 5
This tool is useful for identifying potential institutional behavior zones, price consolidation, accumulation/distribution areas, or psychological support/resistance levels.
🧠 Notes:
- This indicator is not a buy/sell signal tool or predictive system.
- It works best when used in conjunction with other technical tools such as Supply/Demand zones or Smart Money Concepts (SMC) analysis.
- Compatible with all instruments: stocks, futures, forex, crypto, etc.
✅ How to use:
1. Add the indicator to your chart
2. Observe how price interacts with the 0/5 grid zones
3. Use the lines to assist with breakout, retest, or reversal planning
4. Combine with price action or other indicators for higher precision
✨ Developed by BeSight – A Community Of Traders
---------------------------------------------------------------------------------------
อินดิเคเตอร์นี้จะแสดงเส้นแนวนอนแบบตาราง (Grid) ที่แบ่งช่วงราคาออกเป็นระยะ ๆ ตามค่าที่ผู้ใช้กำหนด เช่น ทุก ๆ 5 จุด และครอบคลุมช่วงราคาทั้งหมดของกราฟ โดยแสดงเป็นเส้นแบบ dotted พร้อมป้ายราคาเพื่อให้มองเห็นได้ชัดเจน
🟦 เส้นสีน้ำเงิน: แสดงระดับราคาที่ลงท้ายด้วย 0
⬜ เส้นสีเทา: แสดงระดับราคาที่ลงท้ายด้วย 5
เหมาะสำหรับผู้ที่ต้องการดูโซนราคา "หยุดพัก / เก็บของ / เปิดโพซิชัน" ซึ่งอาจสะท้อนพฤติกรรมของผู้เล่นรายใหญ่หรือสถาบันในตลาด
🧠 ข้อควรรู้:
- อินดิเคเตอร์นี้ไม่ได้บอกจุดเข้าเทรดหรือการคาดการณ์ แต่ช่วยในการวางแผนแนวรับ-แนวต้านร่วมกับเครื่องมือวิเคราะห์อื่น ๆ
- รองรับทุกสินทรัพย์ที่มีหน่วยราคาคงที่ (หุ้น, ฟิวเจอร์ส, ฟอเร็กซ์, คริปโต ฯลฯ)
✅ วิธีใช้งาน:
1. เพิ่มอินดิเคเตอร์นี้ลงบนกราฟ
2. ใช้เส้น Grid เป็นแนวประกอบในการดูพฤติกรรมราคา เช่น การหยุดลง, การเบรกแนว, การกลับตัว
3. ผสมผสานกับโซน Demand/Supply หรือโซน SMC เพื่อความแม่นยำ
✨ พัฒนาโดย BeSight – คอมมูนิตี้ของเทรดเดอร์ตัวจริง
Buffett Indicator with Historical Bubbles (Clean)The Buffett Indicator is a trusted macroeconomic gauge that compares the total US stock market capitalization to the nation’s GDP. Popularized by Warren Buffett, this metric highlights periods of overvaluation and undervaluation in the market.
This tool offers a clean and accurate visualization of the Buffett Indicator, enhanced with historical bubble annotations for key market events:
Dot-com Bubble (2000)
Global Financial Crisis Peak (2007)
COVID-19 Pre-crash Peak (2020)
Post-COVID Bull Market Peak (2021)
Features:
Dynamic Buffett Ratio (%) calculation using Wilshire 5000 Index as the market cap proxy.
Customizable GDP input for accuracy (update quarterly).
Visual thresholds for fair value, undervaluation, and overvaluation zones.
Historical event markers for educational and analytical context.
Optimized to display clearly across all timeframes: Daily, Weekly, Monthly.
How to Use:
Manually update the GDP input as new data is released.
Use this indicator for macro-level market sentiment analysis and valuation tracking.
Combine with other tools and risk management strategies for comprehensive market insights.
Disclaimer:
This indicator is for educational purposes only. It does not constitute financial advice. Always perform your own research and analysis.
Version: 1.0
we ask Allah reconcile and repay
#BuffettIndicator #MarketValuation #MacroAnalysis #BubbleDetector #LongTermInvestor #USMarket #Wilshire5000 #TradingViewScript
The Silver Lining – GSR🍯 This tool converts the Gold/Silver Ratio (GSR) into a precision timing lens for short-term traders operating inside digital silver markets. It reveals structural dominance, trend exhaustion, and regime inflection by comparing the GSR to its smoothed baseline and historical percentile rhythm. On high timeframes (1D+), it reflects macroeconomic sentiment shifts 📈.
🧐 The lower the timeframe, the higher the alpha; the 15m and 1h charts are where you will the hidden pots of gold. For LTF traders, it becomes a hyper-responsive bias filter — especially when paired with volatility-based confirmation systems like SUPeR TReND 2.718, as shown.
🧠 The core logic compares the GSR (gold ÷ silver) against a user-defined moving average (VWMA or EMA). A color-coded fill shifts based on direction: amber when gold leads, teal when silver gains strength. Percentile bands (20th, 50th, 80th) map structural zones — helping traders anchor trades based on confluence, not hype.
📊 In the example chart, four theoretical long trades are shown on the 1h chart, manually drawn on the 15m timeframe. Each begins when the GSR reverses from the 80th percentile or breaks below its MA. The trades occur precisely as silver tested support, with confirmation from SUPeR TReND’s trend shift. Although idealized, these aren’t guesses — they are compression-to-expansion sequences backed by macro relative strength flow. Several yielded gains exceeding 4%.
🏆 Best-case long trades occur when GSR rotates down through the 50th percentile and silver catches a reactive bid. Shorts appear when GSR rises through the upper percentile band while silver fails to hold key intraday levels. The percentile bands function like behavioral tiers:
🥈 Below 20th = Silver Dominance
⚠️ Around 50th = Crossover Area
🥇 Above 80th = Gold Dominance
🥈 Why silver? It’s faster, more emotional, and more manipulated than gold — which paradoxically makes it more tradable on low timeframes. Its range-bound nature is ideal for rinse-and-repeat systems. Because we trade the derivative (XAGUSD), there’s no friction or delivery constraint — just price action, clean and liquid.
⚖️ The underlying strategy isn’t just technical; it’s alchemical. The system begins with short-term trading in digital silver and funnels gains into physical gold — converting volatility into wealth. Over time, this establishes a perpetual motion model: when profits allow, trade silver, extract value, cash out and convert into gold. The account stays active, and the hedge keeps growing.
🔁 The Silver Lining isn’t a signal engine. It’s a structural overlay. It tells you when the market’s invisible bias is shifting — so your tactics stay aligned with macro rhythm.
🌊 Silver moves fast. Gold moves first. The Silver Lining helps you bridge that gap — with clarity, confluence, and edge.
Risk-On vs Risk-Off Meter (Pro)Risk-On vs Risk-Off Meter (Pro)
This macro-based tool analyzes capital flows across key assets to gauge overall market risk sentiment. It does not use ES, SPY, or stock data directly—making it a powerful confirmation tool for ES traders looking to align with macro forces.
🔹 Core Idea:
Tracks capital rotation between copper/gold, bonds, dollar, crude oil, VIX, and yield spreads to generate a normalized risk score (0–1). This score reflects whether macro money is flowing into risk or safety.
🔹 Use:
Use this indicator as confirmation of directional bias when scalping or day trading ES.
– Green Zone (>0.75): Risk-On environment. Favor long setups.
– Red Zone (<0.45): Risk-Off. Favor short setups or stand aside.
– Yellow Zone: Neutral, use caution.
– Divergence Alerts: Signals when ES price disagrees with macro risk trend—potential reversals or exhaustion zones.
HOT TO USE
– Combine with your existing price action or order flow signals
– Avoid trading against the macro sentiment unless strong setup
– Use divergence as a heads-up for fading or exiting trades
This gives you a macro-informed lens to validate or filter your entries.
Fundamental Fair Value RangeFundamental Fair Value Range (FFV Range)
Purpose:
This indicator aims to estimate a company's intrinsic fair value range based on its historical valuation patterns and current financial health. It analyzes multiple fundamental valuation metrics to provide a comprehensive perspective, helping traders identify potential overvaluation or undervaluation relative to the company's own historical norms.
How It Works:
Data Collection: The script gathers historical financial data for the company over a user-defined number of past quarters ( Number of Quarters to Average ). It retrieves key metrics like Earnings Per Share (EPS), Book Value Per Share (BVPS), Sales Per Share, Free Cash Flow (FCF) Per Share, Tangible Book Value Per Share (TBVPS), EBITDA, Operating Cash Flow (OCF) Per Share, Enterprise Value (EV), and Net Debt. It also pulls current TTM (Trailing Twelve Months) data, forward estimates (EPS, Sales), risk metrics (Debt-to-Equity, Altman Z-Score), and dividend yield.
Historical Ratio Calculation: For each of the past quarters where data is available, the script calculates standard valuation ratios (P/E, P/B, P/S, P/FCF, P/TBV, EV/EBITDA, P/CF) using the closing price at that time and the relevant financial data. Ratios are capped ( Maximum Ratio Cap ) to prevent extreme outliers from skewing results.
Central Tendency: The script calculates the historical central tendency (either the median or mean , selectable by the user) for each valuation ratio based on the collected historical data points. Median is generally preferred to reduce the impact of outliers, but the mean option is available.
Individual Metric Fair Values: Using the current financial data (TTM EPS, BVPS, Sales/Share, etc.) and the calculated historical average ratio , the script estimates a fair value based on each individual metric . For example:
P/E Fair Value = Current EPS * Historical Average P/E Ratio
P/S Fair Value = Current Sales Per Share * Historical Average P/S Ratio
(...and so on for P/B, P/FCF, P/TBV, and P/CF.)
Forward-Looking Adjustments & Blending:
P/E: Calculates fair value using both TTM EPS and Forward EPS estimates. These two values are then blended (averaged) to incorporate future expectations. If only one is available, that one is used.
EV/EBITDA: Calculates fair value based on TTM EBITDA and also based on estimated future EBITDA (derived from Sales Estimates and historical EBITDA margin). These are then blended . The calculation converts the Enterprise Value back to an estimated equity value per share by subtracting Net Debt.
P/S: Also calculates a forward-looking P/S fair value using Sales Estimates, which is considered alongside the TTM version when weighting.
Weighted Composite Fair Value:
The script combines the individual fair value estimates into a single composite value using a weighted average .
User-Defined Weights: You assign weights to each metric (P/E, P/S, P/FCF, P/B, P/TBV, EV/EBITDA, P/CF) via the script settings.
Dynamic Weighting: The weights for P/E, P/S, and P/FCF can be set differently depending on whether the company's current TTM EPS is positive or negative. This allows the model to emphasize sales or cash flow metrics more heavily for unprofitable companies, where P/E is less meaningful.
Risk Adjustment: The composite fair value is adjusted downwards (multiplied by 0.9 for each condition met) if:
Debt-to-Equity ratio exceeds 1.5 (indicating higher leverage risk).
Altman Z-Score is below 1.8 (indicating higher bankruptcy risk).
Dividend Adjustment: The risk-adjusted fair value is then potentially increased based on the company's dividend yield. The yield is added to the value (up to a maximum adjustment of 5% - MAX_DIV_ADJ ) to reflect the value returned to shareholders via dividends. Final Fair Value = Risk-Adjusted Value * (1 + Capped Dividend Yield) .
Confidence Range: A range is calculated around the Final Fair Value. This range is determined by the standard deviation of the individual fair value components that were actually used (had valid data and positive weights) in the composite calculation. A wider range suggests less agreement between the different valuation methods.
Valuation Signal: The script compares the current closing price to the calculated Final Fair Value and the Confidence Range, using Average True Range (ATR) based thresholds near the fair value:
Very Undervalued: Price is below the Lower Bound of the confidence range.
Undervalued: Price is below the Final Fair Value minus an ATR-based buffer.
Fairly Valued: Price is near the Final Fair Value (within the ATR buffer).
Overvalued: Price is above the Final Fair Value plus an ATR-based buffer.
Very Overvalued: Price is above the Upper Bound of the confidence range.
Features & Customization:
Multi-Metric Analysis: Incorporates P/E, P/B, P/S, P/FCF, P/TBV, EV/EBITDA, and P/CF.
Historical Basis: Choose Median or Mean for historical ratio calculation and set the lookback period (number of quarters).
Flexible Weighting: Customize the importance of each metric. Crucially, set different weights for P/E, P/S, and P/FCF based on profitability (EPS > 0 or EPS ≤ 0).
Forward Data Integration: Blends TTM and forward estimates for P/E and EV/EBITDA.
Risk & Dividend Adjustments: Automatically discounts for high debt/low Altman Z-score and premiums for dividend yield (capped).
Clear Visualization:
Plots the Final Fair Value line on the chart.
Plots the Upper and Lower Confidence Bounds (based on standard deviation).
Fills the area between bounds to show the Confidence Range.
Informative Data Table:
Displays the calculated fair value for key individual metrics, their historical average ratios, and current underlying financial values (like EPS, BVPS).
Shows risk metrics (Debt/Equity, Altman Z).
Clearly presents the Final Composite Fair Value, the Confidence Range, the current Valuation Signal (e.g., "Undervalued"), and the percentage difference between the current price and the fair value.
Simple/Full Mode: Option to display a condensed table with only the summary results or the full detailed breakdown.
Display Options: Adjust table position, text size, and switch between light/dark themes for better readability.
How to Use:
Apply the indicator to a stock chart on TradingView.
Configure Settings:
Go into the indicator settings ( Gear Icon ⚙️).
- Calculation Parameters: Set the Number of Quarters to Average (e.g., 20 for 5 years) and choose Use Mean Instead of Median if desired. Adjust Maximum Ratio Cap if needed.
- Valuation Weights: This is crucial. Adjust the weights based on the industry, company maturity, and your valuation philosophy. Consider giving higher weights to metrics commonly used for that sector. Use the separate weights for positive/negative EPS scenarios thoughtfully. For instance, for unprofitable tech stocks, you might assign zero weight to P/E and higher weights to P/S or EV/EBITDA (negative EPS weights).
- Display Options: Choose table mode, position, size, and theme.
Interpret the Output:
- Observe the plotted Fair Value line relative to the current price.
- Note the Confidence Range (shaded area). A wider range indicates more uncertainty or divergence between valuation methods.
- Check the Valuation status in the table (e.g., "Undervalued", "Overvalued").
- Use the % from Fair Value in the table for a quick gauge of deviation.
- Review the individual metric fair values in the full table mode to understand which factors are driving the composite value.
Considerations:
Historical Data Dependence: The model heavily relies on past valuation patterns repeating. Significant changes in a company's business model, market, or industry may make historical ratios less relevant.
Parameter Sensitivity: The calculated fair value is sensitive to the chosen weights and the historical lookback period. Experiment and use values that make sense for your analysis style and the specific stock.
Data Quality: The accuracy of the output depends entirely on the accuracy and availability of the underlying financial data provided by TradingView for the specific ticker. Data may be missing or contain errors for some stocks.
Not Financial Advice: This indicator provides a model-based estimation of fair value. It should be used as one tool among many in your investment decision-making process, not as a sole buy/sell signal. Always conduct thorough due diligence.