YL / RL Professional Version 3 - Multi-Market Trading LevelsYL / RL Professional V3 — Multi-Market Trading Levels
I designed this simple indicator to help me implement the RocketScooter Levels in TradingView.
YL / RL Professional V3 is a customizable horizontal-level indicator designed for traders who track key reference levels across Nasdaq and S&P 500 futures.
The indicator allows users to enter separate groups of trading levels for:
MNQ and NQ
MES and ES
Levels entered for MNQ automatically display on NQ, while levels entered for MES automatically display on ES. This eliminates duplicate data entry when switching between micro and full-sized futures contracts.
Included level types
Yellow Levels
Red Levels
DD Band Levels
MHP
Dynamic MHP
HP
Dynamic HP
Bull Zone Bottom
HG
Bear Zone Top
Main features
Comma-separated entry for multiple Yellow, Red and DD Band levels
Separate Nasdaq and S&P 500 level groups
Automatic ticker detection
Shared levels between MNQ/NQ and MES/ES
Custom colors, line widths and transparency
Solid, dashed and dotted line styles
Optional price labels
Adjustable label size and placement
Duplicate-level removal
Automatic level sorting
Show or hide individual level groups
Optional touch alerts
On-chart status panel showing the active market and number of displayed levels
How it works
Enter Nasdaq levels once in the MNQ/NQ settings section. Those levels will appear automatically on both MNQ and NQ charts.
Enter S&P 500 levels once in the MES/ES settings section. Those levels will appear automatically on both MES and ES charts.
When the chart symbol changes, the indicator automatically displays the correct level set and removes levels belonging to the other market.
Supported symbols
MNQ
NQ
MES
ES
The indicator supports continuous contracts and standard dated futures contracts, provided TradingView identifies the symbol root as MNQ, NQ, MES or ES.
Alerts
Touch alerts can be enabled for Yellow Levels, Red Levels, DD Bands and named levels. To receive alerts, create a TradingView alert and select:
Any alert() function call
Important note
This indicator does not calculate or generate trading levels. All levels are entered manually by the user based on their own analysis, methodology or trading plan.
Open-source notice
This script is published as open source so traders can review, customize and improve it for their own use. Please credit the original author when sharing modified versions.
Disclaimer: This indicator is provided for informational and educational purposes only. It is not financial advice and does not guarantee trading results. Indicatore

Indicatore

Bo3li.trading Scalper//@version=6
indicator(
title = "Bo3li.trading Scalper",
shorttitle = "Bo3li.trading",
overlay = true,
max_lines_count = 100,
max_labels_count = 100,
max_boxes_count = 20
)
//====================================================
// إعدادات الدعم والمقاومة ومناطق العرض والطلب
//====================================================
pivotLeft = input.int(
5,
"قوة المنطقة من اليسار",
minval = 1,
group = "الدعم والمقاومة"
)
pivotRight = input.int(
5,
"قوة المنطقة من اليمين",
minval = 1,
group = "الدعم والمقاومة"
)
atrLength = input.int(
14,
"فترة ATR",
minval = 1,
group = "الدعم والمقاومة"
)
zoneSizeATR = input.float(
0.30,
"سُمك منطقة العرض والطلب",
minval = 0.05,
step = 0.05,
group = "الدعم والمقاومة"
)
showZones = input.bool(
true,
"إظهار مناطق العرض والطلب",
group = "الدعم والمقاومة"
)
showSupportResistance = input.bool(
true,
"إظهار خطوط الدعم والمقاومة",
group = "الدعم والمقاومة"
)
//====================================================
// إعدادات فلتر الدخول
//====================================================
useTrendFilter = input.bool(
true,
"استخدام فلتر الاتجاه",
group = "فلتر الدخول"
)
emaFastLength = input.int(
20,
"EMA السريع",
minval = 1,
group = "فلتر الدخول"
)
emaSlowLength = input.int(
50,
"EMA البطيء",
minval = 1,
group = "فلتر الدخول"
)
useRSIFilter = input.bool(
true,
"استخدام فلتر RSI",
group = "فلتر الدخول"
)
rsiLength = input.int(
14,
"فترة RSI",
minval = 1,
group = "فلتر الدخول"
)
buyRSILevel = input.int(
52,
"أقل RSI للشراء",
minval = 1,
maxval = 99,
group = "فلتر الدخول"
)
sellRSILevel = input.int(
48,
"أعلى RSI للبيع",
minval = 1,
maxval = 99,
group = "فلتر الدخول"
)
//====================================================
// إعدادات الأهداف ووقف الخسارة
//====================================================
// على الذهب:
// 1 Pip = 0.10 دولار من حركة السعر
// 50 Pip = 5 دولارات
// 100 Pip = 10 دولارات
// 150 Pip = 15 دولاراً
pipSize = input.float(
0.10,
"قيمة Pip بالسعر",
minval = 0.00001,
step = 0.01,
tooltip = "للذهب: 100 Pip تساوي حركة 10 دولارات",
group = "الأهداف ووقف الخسارة"
)
tpStepPips = input.int(
50,
"المسافة بين كل TP",
minval = 1,
group = "الأهداف ووقف الخسارة"
)
slPips = input.int(
50,
"SL بالـ Pip",
minval = 1,
group = "الأهداف ووقف الخسارة"
)
tp1Pips = tpStepPips
tp2Pips = tpStepPips * 2
tp3Pips = tpStepPips * 3
projectionBars = input.int(
40,
"طول خطوط الصفقة",
minval = 5,
maxval = 200,
group = "الأهداف ووقف الخسارة"
)
//====================================================
// إعدادات المظهر
//====================================================
showEMAs = input.bool(
true,
"إظهار المتوسطات",
group = "المظهر"
)
showSignals = input.bool(
true,
"إظهار إشارات الشراء والبيع",
group = "المظهر"
)
showWatermark = input.bool(
true,
"إظهار Bo3li.trading بالخلفية",
group = "المظهر"
)
//====================================================
// الحسابات
//====================================================
atrValue = ta.atr(atrLength)
zoneThickness = atrValue * zoneSizeATR
emaFast = ta.ema(close, emaFastLength)
emaSlow = ta.ema(close, emaSlowLength)
rsiValue = ta.rsi(close, rsiLength)
pivotHigh = ta.pivothigh(
high,
pivotLeft,
pivotRight
)
pivotLow = ta.pivotlow(
low,
pivotLeft,
pivotRight
)
//====================================================
// تخزين آخر دعم ومقاومة
//====================================================
var float resistancePrice = na
var float supportPrice = na
var float supplyTop = na
var float supplyBottom = na
var float demandTop = na
var float demandBottom = na
if not na(pivotHigh)
resistancePrice := pivotHigh
supplyTop := pivotHigh
supplyBottom := pivotHigh - zoneThickness
if not na(pivotLow)
supportPrice := pivotLow
demandTop := pivotLow + zoneThickness
demandBottom := pivotLow
//====================================================
// مناطق العرض والطلب
//====================================================
var box supplyBox = na
var box demandBox = na
var label supplyLabel = na
var label demandLabel = na
if not na(pivotHigh)
if not na(supplyBox)
box.delete(supplyBox)
if not na(supplyLabel)
label.delete(supplyLabel)
if showZones
supplyBox := box.new(
left = bar_index - pivotRight,
top = supplyTop,
right = bar_index,
bottom = supplyBottom,
border_color = color.new(color.red, 25),
border_width = 1,
bgcolor = color.new(color.red, 88),
extend = extend.right
)
supplyLabel := label.new(
x = bar_index - pivotRight,
y = supplyTop,
text = "منطقة عرض",
style = label.style_label_down,
color = color.new(color.red, 10),
textcolor = color.white,
size = size.small
)
if not na(pivotLow)
if not na(demandBox)
box.delete(demandBox)
if not na(demandLabel)
label.delete(demandLabel)
if showZones
demandBox := box.new(
left = bar_index - pivotRight,
top = demandTop,
right = bar_index,
bottom = demandBottom,
border_color = color.new(color.green, 25),
border_width = 1,
bgcolor = color.new(color.green, 88),
extend = extend.right
)
demandLabel := label.new(
x = bar_index - pivotRight,
y = demandBottom,
text = "منطقة طلب",
style = label.style_label_up,
color = color.new(color.green, 10),
textcolor = color.white,
size = size.small
)
if not showZones
if not na(supplyBox)
box.delete(supplyBox)
supplyBox := na
if not na(demandBox)
box.delete(demandBox)
demandBox := na
if not na(supplyLabel)
label.delete(supplyLabel)
supplyLabel := na
if not na(demandLabel)
label.delete(demandLabel)
demandLabel := na
//====================================================
// خطوط الدعم والمقاومة البرتقالية
//====================================================
plot(
showSupportResistance ? resistancePrice : na,
title = "المقاومة",
color = color.orange,
linewidth = 2,
style = plot.style_stepline
)
plot(
showSupportResistance ? supportPrice : na,
title = "الدعم",
color = color.orange,
linewidth = 2,
style = plot.style_stepline
)
//====================================================
// المتوسطات المتحركة
//====================================================
plot(
showEMAs ? emaFast : na,
title = "EMA السريع",
color = color.aqua,
linewidth = 1
)
plot(
showEMAs ? emaSlow : na,
title = "EMA البطيء",
color = color.purple,
linewidth = 2
)
//====================================================
// شروط الدخول
//====================================================
bullTrend = emaFast > emaSlow and close > emaFast
bearTrend = emaFast < emaSlow and close < emaFast
bullRSI = rsiValue >= buyRSILevel
bearRSI = rsiValue <= sellRSILevel
buyTrendAllowed = not useTrendFilter or bullTrend
sellTrendAllowed = not useTrendFilter or bearTrend
buyRSIAllowed = not useRSIFilter or bullRSI
sellRSIAllowed = not useRSIFilter or bearRSI
// الشراء بعد كسر المقاومة والإغلاق فوقها
rawBuySignal =
not na(resistancePrice) and
ta.crossover(close, resistancePrice)
// البيع بعد كسر الدعم والإغلاق تحته
rawSellSignal =
not na(supportPrice) and
ta.crossunder(close, supportPrice)
buySignal =
barstate.isconfirmed and
rawBuySignal and
buyTrendAllowed and
buyRSIAllowed
sellSignal =
barstate.isconfirmed and
rawSellSignal and
sellTrendAllowed and
sellRSIAllowed
//====================================================
// خطوط الصفقة
//====================================================
var line entryLine = na
var line tp1Line = na
var line tp2Line = na
var line tp3Line = na
var line slLine = na
var label entryLabel = na
var label tp1Label = na
var label tp2Label = na
var label tp3Label = na
var label slLabel = na
//====================================================
// صفقة شراء
//====================================================
if buySignal
if not na(entryLine)
line.delete(entryLine)
if not na(tp1Line)
line.delete(tp1Line)
if not na(tp2Line)
line.delete(tp2Line)
if not na(tp3Line)
line.delete(tp3Line)
if not na(slLine)
line.delete(slLine)
if not na(entryLabel)
label.delete(entryLabel)
if not na(tp1Label)
label.delete(tp1Label)
if not na(tp2Label)
label.delete(tp2Label)
if not na(tp3Label)
label.delete(tp3Label)
if not na(slLabel)
label.delete(slLabel)
float entryPrice = close
float tp1Price = entryPrice + tp1Pips * pipSize
float tp2Price = entryPrice + tp2Pips * pipSize
float tp3Price = entryPrice + tp3Pips * pipSize
float slPrice = entryPrice - slPips * pipSize
entryLine := line.new(
x1 = bar_index,
y1 = entryPrice,
x2 = bar_index + projectionBars,
y2 = entryPrice,
color = color.blue,
width = 3
)
tp1Line := line.new(
x1 = bar_index,
y1 = tp1Price,
x2 = bar_index + projectionBars,
y2 = tp1Price,
color = color.green,
width = 2,
style = line.style_dashed
)
tp2Line := line.new(
x1 = bar_index,
y1 = tp2Price,
x2 = bar_index + projectionBars,
y2 = tp2Price,
color = color.green,
width = 2,
style = line.style_dashed
)
tp3Line := line.new(
x1 = bar_index,
y1 = tp3Price,
x2 = bar_index + projectionBars,
y2 = tp3Price,
color = color.green,
width = 2
)
slLine := line.new(
x1 = bar_index,
y1 = slPrice,
x2 = bar_index + projectionBars,
y2 = slPrice,
color = color.red,
width = 2
)
entryLabel := label.new(
x = bar_index + projectionBars,
y = entryPrice,
text = "دخول شراء",
style = label.style_label_left,
color = color.blue,
textcolor = color.white
)
tp1Label := label.new(
x = bar_index + projectionBars,
y = tp1Price,
text = "TP1 - " + str.tostring(tp1Pips) + " Pip",
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
tp2Label := label.new(
x = bar_index + projectionBars,
y = tp2Price,
text = "TP2 - " + str.tostring(tp2Pips) + " Pip",
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
tp3Label := label.new(
x = bar_index + projectionBars,
y = tp3Price,
text = "TP3 - " + str.tostring(tp3Pips) + " Pip",
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
slLabel := label.new(
x = bar_index + projectionBars,
y = slPrice,
text = "SL - " + str.tostring(slPips) + " Pip",
style = label.style_label_left,
color = color.red,
textcolor = color.white
)
//====================================================
// صفقة بيع
//====================================================
if sellSignal
if not na(entryLine)
line.delete(entryLine)
if not na(tp1Line)
line.delete(tp1Line)
if not na(tp2Line)
line.delete(tp2Line)
if not na(tp3Line)
line.delete(tp3Line)
if not na(slLine)
line.delete(slLine)
if not na(entryLabel)
label.delete(entryLabel)
if not na(tp1Label)
label.delete(tp1Label)
if not na(tp2Label)
label.delete(tp2Label)
if not na(tp3Label)
label.delete(tp3Label)
if not na(slLabel)
label.delete(slLabel)
float entryPrice = close
float tp1Price = entryPrice - tp1Pips * pipSize
float tp2Price = entryPrice - tp2Pips * pipSize
float tp3Price = entryPrice - tp3Pips * pipSize
float slPrice = entryPrice + slPips * pipSize
entryLine := line.new(
x1 = bar_index,
y1 = entryPrice,
x2 = bar_index + projectionBars,
y2 = entryPrice,
color = color.blue,
width = 3
)
tp1Line := line.new(
x1 = bar_index,
y1 = tp1Price,
x2 = bar_index + projectionBars,
y2 = tp1Price,
color = color.green,
width = 2,
style = line.style_dashed
)
tp2Line := line.new(
x1 = bar_index,
y1 = tp2Price,
x2 = bar_index + projectionBars,
y2 = tp2Price,
color = color.green,
width = 2,
style = line.style_dashed
)
tp3Line := line.new(
x1 = bar_index,
y1 = tp3Price,
x2 = bar_index + projectionBars,
y2 = tp3Price,
color = color.green,
width = 2
)
slLine := line.new(
x1 = bar_index,
y1 = slPrice,
x2 = bar_index + projectionBars,
y2 = slPrice,
color = color.red,
width = 2
)
entryLabel := label.new(
x = bar_index + projectionBars,
y = entryPrice,
text = "دخول بيع",
style = label.style_label_left,
color = color.blue,
textcolor = color.white
)
tp1Label := label.new(
x = bar_index + projectionBars,
y = tp1Price,
text = "TP1 - " + str.tostring(tp1Pips) + " Pip",
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
tp2Label := label.new(
x = bar_index + projectionBars,
y = tp2Price,
text = "TP2 - " + str.tostring(tp2Pips) + " Pip",
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
tp3Label := label.new(
x = bar_index + projectionBars,
y = tp3Price,
text = "TP3 - " + str.tostring(tp3Pips) + " Pip",
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
slLabel := label.new(
x = bar_index + projectionBars,
y = slPrice,
text = "SL - " + str.tostring(slPips) + " Pip",
style = label.style_label_left,
color = color.red,
textcolor = color.white
)
//====================================================
// إشارات الدخول
//====================================================
plotshape(
showSignals and buySignal,
title = "إشارة شراء",
text = "شراء",
style = shape.labelup,
location = location.belowbar,
color = color.green,
textcolor = color.white,
size = size.small
)
plotshape(
showSignals and sellSignal,
title = "إشارة بيع",
text = "بيع",
style = shape.labeldown,
location = location.abovebar,
color = color.red,
textcolor = color.white,
size = size.small
)
//====================================================
// خلفية Bo3li.trading
//====================================================
var table watermark = table.new(
position.middle_center,
1,
1
)
if barstate.islast
table.cell(
watermark,
0,
0,
showWatermark ? "Bo3li.trading" : "",
text_color = color.new(color.gray, 82),
text_size = size.huge,
bgcolor = color.new(color.white, 100)
)
//====================================================
// التنبيهات
//====================================================
alertcondition(
buySignal,
title = "Bo3li.trading - شراء",
message = "إشارة شراء من مؤشر Bo3li.trading بعد كسر المقاومة"
)
alertcondition(
sellSignal,
title = "Bo3li.trading - بيع",
message = "إشارة بيع من مؤشر Bo3li.trading بعد كسر الدعم"
) Indicatore

Macro Panel - Risk-On 0-8 [Galin]Macro Panel - Risk-On 0-8
What it does
Turns "how's the market feeling?" into a number, computed the same way every single day: eight binary rules, one point each. 8/8 = everything supports risk. 0/8 = nothing does. The panel shows the full checklist with a pass/fail mark per rule and a color-coded header; the score is also plotted as a stepline - a historical regime curve, so you can scroll back and see every transition of the past years. The indicator is symbol-independent: add it to any chart (a daily SPY chart is the natural home) and it reads the market, not the chart.
Why it matters
Setups don't fail because they were bad setups - they fail because they were taken in the wrong market. Position sizing needs a systematic input, and "feel" drifts exactly when it matters most: after a winning streak and during a scary tape. A fixed eight-rule score can't drift. It also can't be argued with at 9:31 AM.
The eight rules - one point each
1. SPY above its 20-day SMA - tactical trend
2. SPY above its 50-day SMA - intermediate trend
3. QQQ above its 20-day SMA - growth participating
4. IWM above its 50-day SMA - small-cap risk appetite
5. RSP beating SPY over 1 month - breadth beneath the megacaps
6. VIX below a threshold (default 20, adjustable) - volatility calm
7. HYG above its 50-day SMA - credit not stressed
8. SPY 1-month return positive - momentum
Four trend rules, one breadth, one volatility, one credit, one momentum - each catches a different way markets break. Oil, gold, the dollar and rates are deliberately NOT in the score: they are context, not gates. A real macro shock shows up through VIX and SPY anyway - counting it twice double-weights fear.
Reading it
The total is the throttle; the composition is the story. A 6/8 missing its trend points (SPY, QQQ) is a different market from a 6/8 missing its insurance points (VIX, HYG): the first says the tape is broken, the second says the tape is fine and the nerves haven't signed off yet. The panel shows you which mark is missing - that's why it displays all eight rows instead of just the sum.
Suggested bands: 7-8 full risk | 5-6 selective | 3-4 half size | 0-2 no new longs. One rule overrides the total: rule 1 off (SPY below its 20-day) = no new entries, whatever the sum says.
Alerts
Three built in: Kill switch - SPY lost its 20-day | Score dropped to 4 or below | Score entered the 7-8 band. The regime calls you; you don't have to check it.
Settings
VIX calm threshold (default 20) | checklist panel on/off | panel position.
Notes
Chart indicator, designed for daily charts. The score plots with dotted band lines at the 7-8 / 5-6 / 3-4 boundaries. Not intended for the Pine Screener - it needs six data requests and the screener allows five. Indicatore

Indicatore

Luxara Break & Bounce Teaching View V27Luxara Break & Bounce Teaching View V27 is an educational TradingView indicator designed to help traders identify high-probability breakouts, pullbacks, and bounce opportunities using structured price action.
The script visually highlights key market behavior by identifying support and resistance levels, potential breakout zones, bounce confirmations, and trend direction to improve trade timing and decision-making.
Features
Dynamic support and resistance detection
Breakout identification
Bounce confirmation zones
Trend direction filtering
Clean visual chart overlays
Educational labels and signals
Designed for forex, indices, commodities, crypto, and stocks
Works across multiple timeframes
Purpose
This indicator is intended as a teaching and educational tool to help traders better understand market structure, price action, and disciplined trade execution. It does not guarantee profitable trades and should be used alongside sound risk management and personal market analysis.
Disclaimer
This script is provided for educational purposes only and should not be considered financial or investment advice. Trading involves substantial risk, and past performance does not guarantee future results. Users are responsible for their own trading decisions.
Developed by Luxara Gold
Helping traders build discipline through structure, consistency, and education. Indicatore

BIAS Day ver0.1 - NASDAQ London and New York Session BiasBIAS Day ver0.1
BIAS Day ver0.1 is an open-source intraday context indicator designed to estimate directional bias separately for the London and New York sessions.
The indicator uses an ICT-style analytical framework based on the completed Asia range, liquidity sweeps, return into the range and Change in State of Delivery confirmation.
It does not provide complete trade setups, entry signals, stop-loss levels or guaranteed price predictions. Its purpose is to provide directional context that traders can combine with their own higher-timeframe analysis, liquidity objectives and Points of Interest.
Core methodology
The script builds the Asia range between 20:00 and 00:00 New York time.
After the Asia range is completed, it monitors whether price:
• trades above the Asia High or below the Asia Low,
• returns inside the completed Asia range,
• produces a completed directional CISD confirmation.
A bullish sequence requires:
1. a liquidity sweep below the Asia Low,
2. a return above the Asia Low,
3. a subsequent bullish CISD confirmation.
A bearish sequence requires:
1. a liquidity sweep above the Asia High,
2. a return below the Asia High,
3. a subsequent bearish CISD confirmation.
When valid bullish and bearish sequences are both present, the script uses the most recent completed confirmation.
If no complete sequence is available, or the confirmations cannot provide a clear direction, the indicator displays NEUTRAL.
London Bias
London Bias is calculated at 03:00 New York time.
The calculation uses only information completed before the bar beginning at 03:00. The London model uses completed 1-hour CISD confirmation.
The London chart label remains visible until 08:30 New York time. The stored London result remains available in the information table after the chart label is removed.
New York Bias at 09:00
The first New York Bias is calculated at 09:00 New York time using information completed through 08:59.
The New York model uses completed 5-minute and 15-minute CISD confirmations.
The result is displayed on the chart and in the information table.
New York Bias update
At 09:50 New York time, the existing New York Bias remains visible.
The label and information table display an UPDATING status while retaining the previously calculated direction. The indicator does not remove the New York label during this update period.
At 10:00 New York time, the script recalculates the New York Bias using information completed through 09:59.
The existing chart label is then updated to show the new 10:00 result. The direction may remain unchanged or change according to the newly completed liquidity and CISD sequence.
The New York label can be hidden manually through the chart-label setting.
Displayed information
The indicator can display:
• the London Bias,
• the New York Bias,
• LONG, SHORT or NEUTRAL direction,
• the detected liquidity and CISD model,
• the expected opposing liquidity objective,
• the UPDATING status before the 10:00 New York recalculation,
• a compact information table.
Chart labels and the information table can be enabled or disabled independently.
Bias interpretation
LONG means that the completed liquidity and CISD sequence supports bullish intraday delivery.
SHORT means that the completed liquidity and CISD sequence supports bearish intraday delivery.
NEUTRAL means that the required sequence has not been completed or that the available information does not provide a clear directional result.
The displayed target represents the opposing side of the completed Asia range:
• H-Asia / BSL for a bullish model,
• L-Asia / SSL for a bearish model.
The displayed target is a contextual liquidity objective, not a guaranteed take-profit level.
Time zone
All session calculations use the America/New_York time zone.
This allows the session schedule to follow New York daylight-saving-time changes without requiring manual seasonal adjustments.
User interface translation
The script currently uses Polish input labels. Their English meanings are:
• Zakres Asia - czas New York: Asia range - New York time
• Minimalne wybicie poziomu - ticki: Minimum level break - ticks
• Pokaż znaczniki BIAS na wykresie: Show BIAS labels on chart
• Pokaż tabelę BIAS: Show BIAS table
• Pozycja tabeli: Table position
• Rozmiar tekstu tabeli: Table text size
• Prawy górny: Top right
• Prawy dolny: Bottom right
• Lewy górny: Top left
• Lewy środek: Middle left
• Mały: Small
• Normalny: Normal
Table headings:
• Sesja: Session
• Model: Model
• Cel: Target
• Aktualizacja: Update
Limitations
This indicator is a contextual analytical tool and not a standalone trading system.
Its calculations depend on the symbol's available market data, the broker or data provider, the chart timeframe and the availability of overnight session data.
Different CFD, futures or index data feeds may produce different Asia ranges, liquidity sweeps and CISD confirmation times.
The script does not guarantee future market direction, profitability, signal accuracy or trading performance.
The indicator should be used together with independent market analysis and appropriate risk management.
This script is an independent implementation inspired by ICT-style liquidity and market-delivery concepts. It is not affiliated with or endorsed by ICT, TTrades, TradingView or any broker.
This publication is provided for analytical and educational purposes only and does not constitute investment advice.
Open-source license
The source code is published under the GPL-3.0 license, as declared in the script source header. Indicatore

1-Minute Session Volatility Dashboard v4JT Session Volatility Dashboard (Open Source)
The JT Session Volatility Dashboard is a lightweight utility designed for traders who want to quickly understand the largest 1-minute price movements during the current trading session.
Unlike ATR or volatility indicators that measure averages, this indicator focuses on the largest actual 1-minute impulse candle of the active session. This provides a practical benchmark for evaluating today's volatility and setting realistic expectations for pullbacks, stops, and trade management.
The indicator performs all calculations using 1-minute data, regardless of the timeframe of your chart. Whether you're viewing a 1-minute, 5-minute, 15-minute, hourly, or daily chart, the dashboard continues to analyze the underlying 1-minute candles.
Features
Calculates the Largest 1-Minute Candle of the current session.
Displays the Largest Bullish 1-Minute Candle.
Displays the Largest Bearish 1-Minute Candle.
Calculates 50% and 25% retracement values of the largest candle for quick reference.
Automatically detects and displays the current trading session:
RTH (Regular Trading Hours)
AS (Asia Session)
LO (London Open)
Closed
User-configurable session time ranges.
Dashboard can be positioned anywhere on the chart.
Adjustable dashboard text size.
Works on all symbols including:
NQ
MNQ
ES
MES
and virtually any other market available on TradingView.
Why I Built This
I wanted a simple way to answer a question I ask every trading day:
"What is the largest 1-minute candle we've had during this session?"
Knowing this provides an immediate sense of the market's current volatility. Instead of relying solely on ATR, this dashboard shows the largest real impulse move of the day, making it easier to judge whether current price action is relatively quiet or unusually aggressive.
The 25% and 50% reference levels are included because they often serve as useful benchmarks for evaluating pullbacks after large impulsive moves.
Perfect For
Futures Traders
Scalpers
Day Traders
ICT Traders
Order Flow Traders
Bookmap Users
Price Action Traders
Open Source
This script is 100% Open Source.
Feel free to:
Study the code
Modify it
Improve it
Build upon it for your own trading
If you make enhancements that benefit the community, I encourage you to publish your own version or share your improvements.
Feedback
If you find this indicator useful, please consider:
Giving it a 👍 Like
Marking it as a Favorite
Leaving feedback or suggestions for future improvements
I hope it helps you better understand session volatility and improve your trading decisions.
Happy Trading! Indicatore

Indicatore

Indicatore

Forward P/E (MUST COMPLETE STEP 1 FOR INDICATOR TO WORK)Forward P/E Valuation Indicator (MUST COMPLETE STEP 1 FOR THE INDICATOR TO WORK)
1. Set up the indicator
Use the indicator on a 1-day chart. Its one- and three-year calculations assume daily bars.
First, add these TradingView indicators to your chart:
a. P/E forward
b. Price/earnings to growth ratio, usually shown as PEG ratio
c. Then add the custom Forward P/E Valuation indicator.
Open the "Forward P/E Valuation indicator" settings → Inputs and select:
P/E forward → Choose the P/E forward from the dropdown
Price/earnings to growth ratio → Choose the PEG ratio from the dropdown
After selecting the correct sources, click to add a checkmark to the following boxes:
a. P/E forward source linked correctly
b. PEG source linked correctly
Now, the "Forward P/E Valuation" indicator will work.
2. Recommended settings
The default settings are appropriate for most stocks:
Chart band lookback: 3 Years
Forward EPS trend threshold: 2%
Primary-driver lookback: 21 bars
Primary-driver threshold: 3%
Growth-supported premium threshold: 15%
Growth-supportive PEG: 1.5×
Use the three-year lookback for the main interpretation. Switch to one year only when you want to emphasize the stock’s recent valuation regime.
How to read the dashboard:
Read the first four rows first. They summarize the model’s conclusion.
Overall Valuation Status
This compares the current forward P/E with its selected historical range.
Rank
Status
0%–5% = Deep Discount
Above 5%–10% = Cheap
Above 10%–25% = Below Normal
Above 25%–Below 75% = Normal
75%–Below 90% = Above Normal
90%–Below 95% = Expensive
95%–100% = Extreme Expensive
A low percentile means the forward P/E is low relative to its own history. It does not automatically mean the stock is undervalued.
Valuation + Growth Signal
This combines valuation, growth, estimate direction, and PEG.
Signal
Meaning
Attractive Discount
Historically inexpensive with supportive growth or rising estimates
Potential Value
Cheap, but growth confirmation is limited
Value-Trap Risk
Cheap while growth or estimates are deteriorating
Growth-Supported Premium
Expensive, but strong growth may justify the premium
Multiple Risk
Expensive without enough growth support
High-Risk Premium
Expensive while estimates or growth are deteriorating
Improving Fundamentals
Normal valuation with rising estimates
Balanced
Normal valuation with stable estimates
The strongest favorable reading is Attractive Discount. The most concerning is High-Risk Premium.
Valuation + Estimate Direction
This gives a simpler valuation-versus-estimates interpretation.
Reading
Interpretation
Discount + Upgrades
Favorable valuation with improving estimates
Discount + Stable Estimates
Potential value, but no estimate catalyst
Discount + Cuts
Possible value trap
Normal + Upgrades
Improving fundamentals at a normal valuation
Premium + Upgrades
Expensive but supported by estimate improvement
Premium + Cuts
Highest-risk combination
Primary Driver
This explains what caused the recent movement over approximately 21 trading days.
Driver
Meaning
Earnings-Led Advance
Price rose mainly because forward EPS improved
Price + Estimate Expansion
Both estimates and the valuation multiple improved
Price-Led Multiple Expansion
Price rose without much earnings improvement
Estimate Upgrades / Price Lag
Estimates improved, but price has not responded
Price-Led Multiple Compression
Price fell more than estimates, making valuation cheaper
Estimate Cuts
Forward earnings expectations weakened
Price Up Despite Estimate Cuts
Price rose while estimates declined; caution
Stable / Consolidation
No major price, EPS, or P/E movement
The Context column shows the actual price, EPS, and P/E percentage changes used in the classification.
Supporting dashboard rows
TradingView Forward P/E
This is the directly linked TradingView forward-P/E value. It drives the historical ranks, medians, bands, and valuation status.
Implied Forward EPS
Calculated as:
Implied Forward EPS=Stock PriceForward P/E\text{Implied Forward EPS} = \frac{\text{Stock Price}}{\text{Forward P/E}}Implied Forward EPS=Forward P/EStock Price
Example:
210÷21=$10.00210\div21=\$10.00210÷21=$10.00
This is the earnings denominator implied by TradingView’s forward-P/E reading.
Current P/E Ratio
Calculated from:
Price÷Trailing-12-Month EPS\text{Price}\div\text{Trailing-12-Month EPS}Price÷Trailing-12-Month EPS
A forward P/E materially below the current P/E generally indicates expected earnings growth.
Forward EPS Growth Proxy
Compares implied forward EPS with the latest reported fiscal-year diluted EPS.
General interpretation:
Negative: expected earnings deterioration
0%–10%: limited growth
10%–15%: moderate growth
Above 15%: strong growth
This is a proxy, not a perfect analyst-consensus growth measure.
PEG Ratio
The PEG value comes from the linked TradingView PEG indicator.
Below 1.0×: low valuation relative to growth
1.0×–1.5×: generally growth supportive
1.5×–2.0×: moderate premium
Above 2.0×: valuation increasingly dependent on sustained growth
Do not use PEG alone. Cyclical or temporarily depressed earnings can distort it.
1Y / 3Y P/E Rank
Shows where the current forward P/E falls relative to its one- and three-year history.
Example:
12% / 38%
The stock is inexpensive compared with the past year, but closer to normal compared with the past three years.
1Y / 3Y Median P/E
Shows the stock’s typical forward P/E over each period.
If the current P/E is below both medians, the stock is trading below its recent historical norms.
Forward EPS Trend
Rising: latest detected revision above +2%
Stable: between −2% and +2%
Falling: below −2%
Rising estimates generally strengthen a favorable valuation signal. Falling estimates weaken it.
Estimate Freshness
Fresh: 0–100 days
Aging: 101–180 days
Stale: more than 180 days
This measures how long it has been since the model detected a meaningful change in implied forward EPS. It is not necessarily the exact analyst-revision date.
Model Confidence
High: 80%–100%
Medium: 60%–79%
Low: below 60%
Confidence reflects source links, historical coverage, available EPS data, freshness, and use of a daily chart.
Low confidence means insufficient data—not necessarily a negative stock outlook.
Two practical examples
Favorable setup
Overall Valuation: Cheap
Valuation + Growth: Attractive Discount
Valuation + Estimate Direction: Discount + Upgrades
Primary Driver: Earnings-Led Advance
Forward EPS Trend: Rising
Confidence: High
Interpretation: the stock is historically inexpensive, estimates are improving, and earnings rather than pure multiple expansion are supporting the move.
Warning setup
Overall Valuation: Expensive
Valuation + Growth: High-Risk Premium
Valuation + Estimate Direction: Premium + Cuts
Primary Driver: Price Up Despite Estimate Cuts
Forward EPS Trend: Falling
Confidence: High
Interpretation: the stock is historically expensive while earnings expectations are weakening. Price strength is being supported primarily by multiple expansion, which increases downside risk.
Best quick-reading rule
The most favorable combination is:
Discount + Upgrades + Attractive Discount + Earnings-Led Advance
The most concerning combination is:
Premium + Cuts + High-Risk Premium + Price Up Despite Estimate Cuts
Here is the code:
//@version=6
indicator("Forward P/E Linked Metrics ", shorttitle="Forward PE", overlay=false, max_bars_back=2000, precision=2)
// ============================================================================
// PURPOSE
// ============================================================================
// This version links only the TradingView plots that are available through
// input.source():
//
// Required linked sources:
// 1. TradingView "P/E forward"
// 2. TradingView "Price/earnings to growth ratio" / "PEG ratio"
//
// The regular current P/E is calculated internally:
// Current P/E = Current price / TTM EPS
//
// The model recovers the forward EPS denominator from the linked forward P/E:
// Implied forward EPS = Current price / Linked forward P/E
//
// If the linked P/E-forward plot is TradingView's live price-to-forward-EPS
// series, this inversion recovers the underlying forward EPS estimate while
// preserving an exact match with TradingView's displayed forward P/E.
//
// Use primarily on a 1D chart so 252 and 756 bars approximate 1 and 3 years.
//
// Added decision framework:
// 1. Overall Valuation Status
// 2. Valuation + Growth Signal
// 3. Valuation + Estimate Direction
// 4. Primary Driver
// ============================================================================
// 1. LINK TRADINGVIEW METRICS
// ============================================================================
grpLinks = "1. Link TradingView Metrics"
forwardPESource = input.source(
close,
"P/E forward",
tooltip="Select the plot from TradingView's built-in P/E forward indicator.",
group=grpLinks,
display=display.none)
pegRatioSource = input.source(
close,
"Price/earnings to growth ratio",
tooltip="Select the plot from TradingView's PEG ratio indicator.",
group=grpLinks,
display=display.none)
confirmForwardPELinked = input.bool(
false,
"P/E forward source linked correctly",
group=grpLinks,
display=display.none)
confirmPEGLinked = input.bool(
false,
"PEG source linked correctly",
group=grpLinks,
display=display.none)
// ============================================================================
// 2. MODEL SETTINGS
// ============================================================================
grpModel = "2. Model Settings"
minValidEPS = input.float(
0.01,
"Minimum valid implied forward EPS",
minval=0.0001,
step=0.01,
group=grpModel,
display=display.none)
maxValidEPS = input.float(
1000.0,
"Maximum valid implied forward EPS",
minval=1.0,
step=10.0,
group=grpModel,
display=display.none)
minValidPE = input.float(
0.1,
"Minimum valid P/E",
minval=0.0,
step=0.1,
group=grpModel,
display=display.none)
maxValidPE = input.float(
500.0,
"Maximum valid P/E",
minval=1.0,
step=5.0,
group=grpModel,
display=display.none)
maxValidPEG = input.float(
100.0,
"Maximum valid PEG",
minval=1.0,
step=1.0,
group=grpModel,
display=display.none)
chartLookback = input.string(
"3 Years",
"Chart band lookback",
options= ,
group=grpModel,
display=display.none)
trendThreshold = input.float(
2.0,
"Forward EPS revision trend threshold %",
minval=0.0,
step=0.25,
group=grpModel,
display=display.none)
revisionDetectionPct = input.float(
0.05,
"Minimum implied EPS change counted as a revision %",
minval=0.001,
step=0.01,
group=grpModel,
display=display.none)
freshDays = input.int(
100,
"Fresh estimate: maximum calendar days",
minval=1,
group=grpModel,
display=display.none)
staleDays = input.int(
180,
"Aging estimate: maximum calendar days",
minval=2,
group=grpModel,
display=display.none)
primaryDriverLookback = input.int(
21,
"Primary driver lookback bars",
minval=5,
maxval=252,
group=grpModel,
display=display.none)
primaryDriverThreshold = input.float(
3.0,
"Primary driver movement threshold %",
minval=0.5,
step=0.5,
group=grpModel,
display=display.none)
growthSupportThreshold = input.float(
15.0,
"Growth-supported premium threshold %",
minval=0.0,
step=1.0,
group=grpModel,
display=display.none)
attractivePEGThreshold = input.float(
1.5,
"PEG threshold considered growth supportive",
minval=0.1,
step=0.1,
group=grpModel,
display=display.none)
// ============================================================================
// 3. VISUALS & DASHBOARD
// ============================================================================
grpVisual = "3. Visuals & Dashboard"
showMedianLine = input.bool(
true,
"Show historical median",
group=grpVisual,
display=display.none)
showPercentileBands = input.bool(
true,
"Show percentile bands",
group=grpVisual,
display=display.none)
showNormalZoneFill = input.bool(
true,
"Fill normal valuation zone",
group=grpVisual,
display=display.none)
showExtremeBackground = input.bool(
false,
"Highlight 5th / 95th percentile extremes",
group=grpVisual,
display=display.none)
showDashboard = input.bool(
true,
"Show dashboard",
group=grpVisual,
display=display.none)
dashboardPosition = input.string(
"Top Right",
"Dashboard position",
options= ,
group=grpVisual,
display=display.none)
// ============================================================================
// CONSTANTS
// ============================================================================
bars1Y = 252
bars3Y = 756
dayMs = 86400000.0
selectedLength = chartLookback == "1 Year" ? bars1Y : bars3Y
// ============================================================================
// COLOR PALETTE — LIGHT CHART / DARK DASHBOARD
// ============================================================================
clrSlate0 = color.rgb(45, 52, 64)
clrSlate1 = color.rgb(55, 62, 74)
clrSlate2 = color.rgb(69, 76, 88)
clrText = color.rgb(248, 249, 251)
clrMuted = color.rgb(205, 211, 220)
clrDarkText = color.rgb(42, 49, 60)
clrGreenText = color.rgb(18, 145, 88)
clrRedText = color.rgb(211, 52, 69)
clrAmberText = color.rgb(181, 112, 8)
clrTeal = color.rgb(35, 190, 208)
clrAqua = color.rgb(70, 198, 235)
clrBlue = color.rgb(72, 116, 235)
clrGreen = color.rgb(40, 178, 109)
clrAmber = color.rgb(245, 179, 48)
clrOrange = color.rgb(245, 153, 36)
clrRed = color.rgb(235, 74, 91)
clrGrayLine = color.rgb(116, 125, 140)
clrLightCyan = color.rgb(126, 216, 233)
clrLightBlue = color.rgb(202, 232, 242)
clrLightGray = color.rgb(205, 209, 215)
clrLightMint = color.rgb(214, 241, 226)
clrLightAmber = color.rgb(250, 232, 192)
clrLightRed = color.rgb(249, 220, 225)
// ============================================================================
// HELPERS
// ============================================================================
f_valid_eps(_value) =>
not na(_value) and _value >= minValidEPS and _value <= maxValidEPS ? _value : na
f_valid_pe(_value) =>
not na(_value) and _value >= minValidPE and _value <= maxValidPE ? _value : na
f_valid_peg(_value) =>
not na(_value) and _value > 0.0 and _value <= maxValidPEG ? _value : na
f_x(_value) =>
na(_value) ? "n/a" : str.tostring(_value, "#.##") + "x"
f_pct(_value) =>
na(_value) ? "n/a" : str.tostring(_value, "#.##") + "%"
f_eps(_value) =>
na(_value) ? "n/a" : str.tostring(_value, "#.##")
f_rank_text(_value) =>
na(_value) ? "n/a" : str.tostring(_value, "#") + "%"
f_position(_selection) =>
_selection == "Top Left" ? position.top_left :
_selection == "Bottom Right" ? position.bottom_right :
_selection == "Bottom Left" ? position.bottom_left :
position.top_right
f_rank_color(_rank, _ready) =>
color _result = clrGrayLine
if _ready and not na(_rank)
if _rank >= 95
_result := clrRed
else if _rank >= 90
_result := clrOrange
else if _rank >= 75
_result := clrAmber
else if _rank <= 5
_result := clrBlue
else if _rank <= 10
_result := clrAqua
else if _rank <= 25
_result := clrTeal
else
_result := clrGrayLine
_result
f_rank_fill_color(_rank, _ready) =>
color _result = clrLightGray
if _ready and not na(_rank)
if _rank >= 95
_result := clrLightRed
else if _rank >= 75
_result := clrLightAmber
else if _rank <= 25
_result := clrLightCyan
else
_result := clrLightGray
_result
// ============================================================================
// LINKED METRICS
// ============================================================================
linkedForwardPE = confirmForwardPELinked ? f_valid_pe(forwardPESource) : na
linkedPEG = confirmPEGLinked ? f_valid_peg(pegRatioSource) : na
// Regular trailing P/E calculated internally using TradingView's documented
// price-to-TTM-EPS method.
epsTTMRaw = request.financial(
syminfo.tickerid,
"EARNINGS_PER_SHARE",
"TTM",
gaps=barmerge.gaps_off,
ignore_invalid_symbol=true,
currency=syminfo.currency)
epsTTM = f_valid_eps(epsTTMRaw)
currentPERatio = f_valid_pe(
not na(epsTTM) and epsTTM > 0.0 ? close / epsTTM : na)
// Invert TradingView's linked forward P/E to recover its implied forward EPS.
impliedForwardEPS = f_valid_eps(
not na(linkedForwardPE) and linkedForwardPE > 0.0 ? close / linkedForwardPE : na)
// Latest annual diluted EPS is used only as a baseline for a growth proxy.
priorFYDilutedEPSRaw = request.financial(
syminfo.tickerid,
"EARNINGS_PER_SHARE_DILUTED",
"FY",
gaps=barmerge.gaps_off,
ignore_invalid_symbol=true,
currency=syminfo.currency)
priorFYDilutedEPS = f_valid_eps(priorFYDilutedEPSRaw)
forwardEPSGrowthProxy =
not na(impliedForwardEPS) and not na(priorFYDilutedEPS) and priorFYDilutedEPS > 0.0 ?
((impliedForwardEPS / priorFYDilutedEPS) - 1.0) * 100.0 :
na
// The PEG identity is PEG = P/E ÷ growth rate. When both linked metrics are
// available, this recovers the growth rate implicit in TradingView's PEG.
pegImpliedGrowthPct =
not na(currentPERatio) and not na(linkedPEG) and linkedPEG > 0.0 ?
currentPERatio / linkedPEG :
na
// ============================================================================
// IMPLIED FORWARD EPS TREND AND FRESHNESS
// ============================================================================
impliedEPSChangePct =
not na(impliedForwardEPS) and
not na(impliedForwardEPS ) and
impliedForwardEPS != 0.0 ?
((impliedForwardEPS / impliedForwardEPS ) - 1.0) * 100.0 :
na
impliedEPSChanged =
not na(impliedEPSChangePct) and
math.abs(impliedEPSChangePct) >= revisionDetectionPct
var float latestPublishedEstimate = na
var float priorPublishedEstimate = na
var int lastEstimateUpdateTime = na
if impliedEPSChanged
priorPublishedEstimate := latestPublishedEstimate
latestPublishedEstimate := impliedForwardEPS
lastEstimateUpdateTime := time
// Seed the latest available estimate without falsely labeling it a revision.
if na(latestPublishedEstimate) and not na(impliedForwardEPS)
latestPublishedEstimate := impliedForwardEPS
estimateRevisionPct =
not na(latestPublishedEstimate) and
not na(priorPublishedEstimate) and
priorPublishedEstimate != 0.0 ?
((latestPublishedEstimate / priorPublishedEstimate) - 1.0) * 100.0 :
na
string estimateTrendText = "No prior revision"
color estimateTrendColor = clrMuted
if not na(estimateRevisionPct)
if estimateRevisionPct > trendThreshold
estimateTrendText := "Rising"
estimateTrendColor := clrGreen
else if estimateRevisionPct < -trendThreshold
estimateTrendText := "Falling"
estimateTrendColor := clrRed
else
estimateTrendText := "Stable"
estimateTrendColor := clrAmber
estimateAgeDays =
not na(lastEstimateUpdateTime) ?
(time - lastEstimateUpdateTime) / dayMs :
na
string freshnessText = "No revision date"
color freshnessColor = clrMuted
if not na(estimateAgeDays)
if estimateAgeDays <= freshDays
freshnessText := "Fresh"
freshnessColor := clrGreen
else if estimateAgeDays <= staleDays
freshnessText := "Aging"
freshnessColor := clrAmber
else
freshnessText := "Stale"
freshnessColor := clrRed
// ============================================================================
// HISTORICAL RANKS AND MEDIANS — 1Y / 3Y ONLY
// ============================================================================
var int validHistoryBars = 0
validHistoryBars := not na(linkedForwardPE) ? nz(validHistoryBars ) + 1 : 0
has1Y = validHistoryBars >= bars1Y
has3Y = validHistoryBars >= bars3Y
hasSelectedHistory = validHistoryBars >= selectedLength
rank1YRaw = ta.percentrank(linkedForwardPE, bars1Y)
rank3YRaw = ta.percentrank(linkedForwardPE, bars3Y)
median1YRaw = ta.percentile_linear_interpolation(linkedForwardPE, bars1Y, 50)
median3YRaw = ta.percentile_linear_interpolation(linkedForwardPE, bars3Y, 50)
rank1Y = has1Y ? rank1YRaw : na
rank3Y = has3Y ? rank3YRaw : na
median1Y = has1Y ? median1YRaw : na
median3Y = has3Y ? median3YRaw : na
selectedRankRaw = ta.percentrank(linkedForwardPE, selectedLength)
selectedP95Raw = ta.percentile_linear_interpolation(linkedForwardPE, selectedLength, 95)
selectedP90Raw = ta.percentile_linear_interpolation(linkedForwardPE, selectedLength, 90)
selectedP50Raw = ta.percentile_linear_interpolation(linkedForwardPE, selectedLength, 50)
selectedP10Raw = ta.percentile_linear_interpolation(linkedForwardPE, selectedLength, 10)
selectedP05Raw = ta.percentile_linear_interpolation(linkedForwardPE, selectedLength, 5)
selectedRank = hasSelectedHistory ? selectedRankRaw : na
selectedP95 = hasSelectedHistory ? selectedP95Raw : na
selectedP90 = hasSelectedHistory ? selectedP90Raw : na
selectedP50 = hasSelectedHistory ? selectedP50Raw : na
selectedP10 = hasSelectedHistory ? selectedP10Raw : na
selectedP05 = hasSelectedHistory ? selectedP05Raw : na
// ============================================================================
// DECISION FRAMEWORK
// ============================================================================
// Overall valuation status is based on the selected 1Y or 3Y percentile rank.
string overallValuationText = "Insufficient history"
color overallValuationColor = clrGrayLine
color overallValuationBg = clrLightGray
if not na(linkedForwardPE) and hasSelectedHistory and not na(selectedRank)
if selectedRank >= 95
overallValuationText := "Extreme Expensive"
overallValuationColor := clrRed
overallValuationBg := clrLightRed
else if selectedRank >= 90
overallValuationText := "Expensive"
overallValuationColor := clrOrange
overallValuationBg := clrLightAmber
else if selectedRank >= 75
overallValuationText := "Above Normal"
overallValuationColor := clrAmber
overallValuationBg := clrLightAmber
else if selectedRank <= 5
overallValuationText := "Deep Discount"
overallValuationColor := clrBlue
overallValuationBg := clrLightCyan
else if selectedRank <= 10
overallValuationText := "Cheap"
overallValuationColor := clrAqua
overallValuationBg := clrLightCyan
else if selectedRank <= 25
overallValuationText := "Below Normal"
overallValuationColor := clrTeal
overallValuationBg := clrLightCyan
else
overallValuationText := "Normal"
overallValuationColor := clrGrayLine
overallValuationBg := clrLightGray
cheapValuation = hasSelectedHistory and not na(selectedRank) and selectedRank <= 25
premiumValuation = hasSelectedHistory and not na(selectedRank) and selectedRank >= 75
veryExpensiveValuation = hasSelectedHistory and not na(selectedRank) and selectedRank >= 90
growthPositive =
(not na(forwardEPSGrowthProxy) and forwardEPSGrowthProxy >= 10.0) or
estimateTrendText == "Rising"
growthStrong =
(not na(forwardEPSGrowthProxy) and forwardEPSGrowthProxy >= growthSupportThreshold) or
(not na(linkedPEG) and linkedPEG <= attractivePEGThreshold)
growthWeak =
(not na(forwardEPSGrowthProxy) and forwardEPSGrowthProxy <= 0.0) or
estimateTrendText == "Falling"
// Combines valuation, expected growth, estimate direction, and linked PEG.
string valuationGrowthText = "Awaiting data"
color valuationGrowthColor = clrGrayLine
color valuationGrowthBg = clrLightGray
if hasSelectedHistory and not na(selectedRank)
if cheapValuation
if growthWeak
valuationGrowthText := "Value-Trap Risk"
valuationGrowthColor := clrRed
valuationGrowthBg := clrLightRed
else if growthPositive or growthStrong
valuationGrowthText := "Attractive Discount"
valuationGrowthColor := clrGreen
valuationGrowthBg := clrLightMint
else
valuationGrowthText := "Potential Value"
valuationGrowthColor := clrTeal
valuationGrowthBg := clrLightCyan
else if premiumValuation
if growthWeak
valuationGrowthText := "High-Risk Premium"
valuationGrowthColor := clrRed
valuationGrowthBg := clrLightRed
else if growthStrong
valuationGrowthText := "Growth-Supported Premium"
valuationGrowthColor := clrAmber
valuationGrowthBg := clrLightAmber
else
valuationGrowthText := "Multiple Risk"
valuationGrowthColor := clrOrange
valuationGrowthBg := clrLightAmber
else
if estimateTrendText == "Rising"
valuationGrowthText := "Improving Fundamentals"
valuationGrowthColor := clrGreen
valuationGrowthBg := clrLightMint
else if estimateTrendText == "Falling"
valuationGrowthText := "Estimate Deterioration"
valuationGrowthColor := clrRed
valuationGrowthBg := clrLightRed
else
valuationGrowthText := "Balanced"
valuationGrowthColor := clrGrayLine
valuationGrowthBg := clrLightGray
// A direct matrix combining the valuation regime with estimate direction.
string valuationEstimateText = "Awaiting data"
color valuationEstimateColor = clrGrayLine
color valuationEstimateBg = clrLightGray
if hasSelectedHistory and not na(selectedRank)
string valuationBucket = cheapValuation ? "Discount" : premiumValuation ? "Premium" : "Normal"
string directionBucket = estimateTrendText == "Rising" ? "Upgrades" : estimateTrendText == "Falling" ? "Cuts" : "Stable Estimates"
valuationEstimateText := valuationBucket + " + " + directionBucket
if cheapValuation and estimateTrendText == "Rising"
valuationEstimateColor := clrGreen
valuationEstimateBg := clrLightMint
else if cheapValuation and estimateTrendText == "Falling"
valuationEstimateColor := clrRed
valuationEstimateBg := clrLightRed
else if premiumValuation and estimateTrendText == "Falling"
valuationEstimateColor := clrRed
valuationEstimateBg := clrLightRed
else if premiumValuation and estimateTrendText == "Rising"
valuationEstimateColor := clrAmber
valuationEstimateBg := clrLightAmber
else if estimateTrendText == "Rising"
valuationEstimateColor := clrGreen
valuationEstimateBg := clrLightMint
else if estimateTrendText == "Falling"
valuationEstimateColor := clrRed
valuationEstimateBg := clrLightRed
else
valuationEstimateColor := clrGrayLine
valuationEstimateBg := clrLightGray
// Primary driver compares price, implied forward EPS, and forward P/E changes.
priceChangePct =
not na(close ) and close != 0.0 ?
((close / close ) - 1.0) * 100.0 :
na
forwardEPSChangePct =
not na(impliedForwardEPS) and
not na(impliedForwardEPS ) and
impliedForwardEPS != 0.0 ?
((impliedForwardEPS / impliedForwardEPS ) - 1.0) * 100.0 :
na
forwardPEChangePct =
not na(linkedForwardPE) and
not na(linkedForwardPE ) and
linkedForwardPE != 0.0 ?
((linkedForwardPE / linkedForwardPE ) - 1.0) * 100.0 :
na
string primaryDriverText = "Insufficient data"
color primaryDriverColor = clrGrayLine
color primaryDriverBg = clrLightGray
if not na(priceChangePct) and not na(forwardEPSChangePct) and not na(forwardPEChangePct)
bool priceUp = priceChangePct > primaryDriverThreshold
bool priceDown = priceChangePct < -primaryDriverThreshold
bool epsUp = forwardEPSChangePct > primaryDriverThreshold
bool epsDown = forwardEPSChangePct < -primaryDriverThreshold
bool peUp = forwardPEChangePct > primaryDriverThreshold
bool peDown = forwardPEChangePct < -primaryDriverThreshold
if priceUp and epsUp
primaryDriverText := peUp ? "Price + Estimate Expansion" : "Earnings-Led Advance"
primaryDriverColor := clrGreen
primaryDriverBg := clrLightMint
else if priceDown and epsDown
primaryDriverText := peDown ? "Price + Estimate Deterioration" : "Estimate Cuts Dominate"
primaryDriverColor := clrRed
primaryDriverBg := clrLightRed
else if priceUp and epsDown
primaryDriverText := "Price Up Despite Estimate Cuts"
primaryDriverColor := clrOrange
primaryDriverBg := clrLightAmber
else if priceDown and epsUp
primaryDriverText := "Estimate Upgrades / Price Lag"
primaryDriverColor := clrTeal
primaryDriverBg := clrLightCyan
else if peUp and priceUp
primaryDriverText := "Price-Led Multiple Expansion"
primaryDriverColor := clrAmber
primaryDriverBg := clrLightAmber
else if peDown and priceDown
primaryDriverText := "Price-Led Multiple Compression"
primaryDriverColor := clrTeal
primaryDriverBg := clrLightCyan
else if epsUp
primaryDriverText := "Estimate Upgrades"
primaryDriverColor := clrGreen
primaryDriverBg := clrLightMint
else if epsDown
primaryDriverText := "Estimate Cuts"
primaryDriverColor := clrRed
primaryDriverBg := clrLightRed
else if peUp
primaryDriverText := "Multiple Expansion"
primaryDriverColor := clrAmber
primaryDriverBg := clrLightAmber
else if peDown
primaryDriverText := "Multiple Compression"
primaryDriverColor := clrTeal
primaryDriverBg := clrLightCyan
else
primaryDriverText := "Stable / Consolidation"
primaryDriverColor := clrGrayLine
primaryDriverBg := clrLightGray
// ============================================================================
// MODEL CONFIDENCE
// ============================================================================
chartIsDaily = timeframe.isdaily and timeframe.multiplier == 1
int confidenceScore = 0
confidenceScore += not na(linkedForwardPE) ? 40 : 0
confidenceScore += has3Y ? 25 : has1Y ? 15 : 0
confidenceScore += not na(impliedForwardEPS) ? 10 : 0
// Internally calculated trailing P/E contributes to confidence when available.
confidenceScore += not na(currentPERatio) ? 5 : 0
confidenceScore += not na(linkedPEG) ? 5 : 0
confidenceScore +=
not na(estimateAgeDays) ?
estimateAgeDays <= freshDays ? 10 :
estimateAgeDays <= staleDays ? 5 : 1 :
0
confidenceScore += chartIsDaily ? 5 : 0
confidenceScore := int(math.max(0, math.min(100, confidenceScore)))
string confidenceLevel =
confidenceScore >= 80 ? "High" :
confidenceScore >= 60 ? "Medium" :
"Low"
color confidenceColor =
confidenceScore >= 80 ? clrGreen :
confidenceScore >= 60 ? clrAmber :
clrRed
historyCoverageText =
has3Y ? "Full 3Y" :
has1Y ? "1Y available" :
"Limited"
sourceStatusText =
confirmForwardPELinked and confirmPEGLinked ? "2/2 linked" :
confirmForwardPELinked ? "1/2 linked" :
"Set P/E forward source"
// ============================================================================
// DISPLAY TEXT
// ============================================================================
rankText = f_rank_text(rank1Y) + " / " + f_rank_text(rank3Y)
medianText = f_x(median1Y) + " / " + f_x(median3Y)
estimateTrendContext =
na(estimateRevisionPct) ?
"Awaiting second revision" :
"Last revision: " + f_pct(estimateRevisionPct)
freshnessContext =
na(estimateAgeDays) ?
"No implied EPS revision observed" :
str.tostring(estimateAgeDays, "#") + " calendar days"
confidenceContext =
historyCoverageText + " / " + (chartIsDaily ? "1D chart" : "Use 1D chart")
overallValuationContext =
na(selectedRank) ?
"Selected rank unavailable" :
chartLookback + " rank: " + f_rank_text(selectedRank)
valuationGrowthContext =
"Growth: " + f_pct(forwardEPSGrowthProxy) + " / PEG: " + f_x(linkedPEG)
valuationEstimateContext =
overallValuationText + " / EPS trend: " + estimateTrendText
primaryDriverContext =
"Price " + f_pct(priceChangePct) + " / EPS " + f_pct(forwardEPSChangePct) + " / P/E " + f_pct(forwardPEChangePct)
// ============================================================================
// PLOTS
// ============================================================================
lineColor = f_rank_color(selectedRank, hasSelectedHistory)
plot(
linkedForwardPE,
title="Linked TradingView Forward P/E",
color=lineColor,
linewidth=3,
display=display.pane)
medianPlot = plot(
showMedianLine ? selectedP50 : na,
title="Selected Historical Median",
color=color.new(clrGrayLine, 5),
linewidth=2,
display=display.pane)
upperPlot = plot(
showPercentileBands ? selectedP90 : na,
title="Selected 90th Percentile",
color=color.new(clrOrange, 20),
linewidth=1,
display=display.pane)
lowerPlot = plot(
showPercentileBands ? selectedP10 : na,
title="Selected 10th Percentile",
color=color.new(clrAqua, 20),
linewidth=1,
display=display.pane)
plot(
showPercentileBands ? selectedP95 : na,
title="Selected 95th Percentile",
color=color.new(clrRed, 10),
linewidth=1,
display=display.pane)
plot(
showPercentileBands ? selectedP05 : na,
title="Selected 5th Percentile",
color=color.new(clrBlue, 10),
linewidth=1,
display=display.pane)
fill(
upperPlot,
lowerPlot,
color=showPercentileBands and showNormalZoneFill ? color.new(clrAqua, 91) : na,
title="Historical Normal Zone")
isExtremeExpensive = hasSelectedHistory and selectedRank >= 95
isDeepDiscount = hasSelectedHistory and selectedRank <= 5
bgcolor(
showExtremeBackground and isExtremeExpensive ? color.new(clrRed, 90) :
showExtremeBackground and isDeepDiscount ? color.new(clrBlue, 90) :
na)
// ============================================================================
// DASHBOARD
// ============================================================================
var table dash = table.new(
f_position(dashboardPosition),
3,
15,
border_width=1,
border_color=color.new(clrMuted, 75))
if showDashboard and barstate.islast
color bgHeader = clrSlate0
color bgDark = clrSlate1
color bgMed = clrSlate2
color peBg = f_rank_fill_color(selectedRank, hasSelectedHistory)
color epsBg = clrLightGray
color currentPEBg = clrLightBlue
color growthBg = not na(forwardEPSGrowthProxy) and forwardEPSGrowthProxy >= 0 ? clrLightMint : clrLightRed
color pegBg = clrLightBlue
color rankBg = f_rank_fill_color(selectedRank, hasSelectedHistory)
color medianBg = clrLightGray
color trendBg = estimateTrendText == "Rising" ? clrLightMint : estimateTrendText == "Falling" ? clrLightRed : clrLightAmber
color freshBg = freshnessText == "Fresh" ? clrLightMint : freshnessText == "Aging" ? clrLightAmber : freshnessText == "Stale" ? clrLightRed : clrLightGray
color confBg = confidenceScore >= 80 ? clrLightMint : confidenceScore >= 60 ? clrLightAmber : clrLightRed
table.cell(dash, 0, 0, "Metric", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgHeader)
table.cell(dash, 1, 0, "Current", text_color=clrText, text_size=size.small, text_halign=text.align_center, bgcolor=bgHeader)
table.cell(dash, 2, 0, "Context", text_color=clrText, text_size=size.small, text_halign=text.align_right, bgcolor=bgHeader)
table.cell(dash, 0, 1, "Overall Valuation Status", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgDark)
table.cell(dash, 1, 1, overallValuationText, text_color=overallValuationColor, text_size=size.normal, text_halign=text.align_center, bgcolor=overallValuationBg)
table.cell(dash, 2, 1, overallValuationContext, text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgDark)
table.cell(dash, 0, 2, "Valuation + Growth Signal", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgMed)
table.cell(dash, 1, 2, valuationGrowthText, text_color=valuationGrowthColor, text_size=size.normal, text_halign=text.align_center, bgcolor=valuationGrowthBg)
table.cell(dash, 2, 2, valuationGrowthContext, text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgMed)
table.cell(dash, 0, 3, "Valuation + Estimate Direction", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgDark)
table.cell(dash, 1, 3, valuationEstimateText, text_color=valuationEstimateColor, text_size=size.normal, text_halign=text.align_center, bgcolor=valuationEstimateBg)
table.cell(dash, 2, 3, valuationEstimateContext, text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgDark)
table.cell(dash, 0, 4, "Primary Driver", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgMed)
table.cell(dash, 1, 4, primaryDriverText, text_color=primaryDriverColor, text_size=size.small, text_halign=text.align_center, bgcolor=primaryDriverBg)
table.cell(dash, 2, 4, primaryDriverContext, text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgMed)
table.cell(dash, 0, 5, "TradingView Forward P/E", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgDark)
table.cell(dash, 1, 5, f_x(linkedForwardPE), text_color=clrDarkText, text_size=size.normal, text_halign=text.align_center, bgcolor=peBg)
table.cell(dash, 2, 5, "Direct linked P/E forward plot", text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgDark)
table.cell(dash, 0, 6, "Implied Forward EPS", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgMed)
table.cell(dash, 1, 6, f_eps(impliedForwardEPS), text_color=clrDarkText, text_size=size.normal, text_halign=text.align_center, bgcolor=epsBg)
table.cell(dash, 2, 6, "Price ÷ linked forward P/E", text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgMed)
table.cell(dash, 0, 7, "Current P/E Ratio", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgDark)
table.cell(dash, 1, 7, f_x(currentPERatio), text_color=clrDarkText, text_size=size.normal, text_halign=text.align_center, bgcolor=currentPEBg)
table.cell(dash, 2, 7, "Price ÷ trailing 12M EPS", text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgDark)
table.cell(dash, 0, 8, "Forward EPS Growth Proxy", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgMed)
table.cell(dash, 1, 8, f_pct(forwardEPSGrowthProxy), text_color=not na(forwardEPSGrowthProxy) and forwardEPSGrowthProxy >= 0 ? clrGreenText : clrRedText, text_size=size.normal, text_halign=text.align_center, bgcolor=growthBg)
table.cell(dash, 2, 8, "Implied forward EPS vs prior FY", text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgMed)
table.cell(dash, 0, 9, "PEG Ratio", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgDark)
table.cell(dash, 1, 9, f_x(linkedPEG), text_color=clrDarkText, text_size=size.normal, text_halign=text.align_center, bgcolor=pegBg)
table.cell(dash, 2, 9, na(pegImpliedGrowthPct) ? "Direct linked PEG plot" : "TTM P/E ÷ PEG = " + f_pct(pegImpliedGrowthPct), text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgDark)
table.cell(dash, 0, 10, "1Y / 3Y P/E Rank", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgMed)
table.cell(dash, 1, 10, rankText, text_color=clrDarkText, text_size=size.small, text_halign=text.align_center, bgcolor=rankBg)
table.cell(dash, 2, 10, "Lower percentile = cheaper", text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgMed)
table.cell(dash, 0, 11, "1Y / 3Y Median P/E", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgDark)
table.cell(dash, 1, 11, medianText, text_color=clrDarkText, text_size=size.small, text_halign=text.align_center, bgcolor=medianBg)
table.cell(dash, 2, 11, "Linked forward P/E history", text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgDark)
table.cell(dash, 0, 12, "Forward EPS Trend", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgMed)
table.cell(dash, 1, 12, estimateTrendText, text_color=estimateTrendText == "Rising" ? clrGreenText : estimateTrendText == "Falling" ? clrRedText : clrAmberText, text_size=size.normal, text_halign=text.align_center, bgcolor=trendBg)
table.cell(dash, 2, 12, estimateTrendContext, text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgMed)
table.cell(dash, 0, 13, "Estimate Freshness", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgDark)
table.cell(dash, 1, 13, freshnessText, text_color=freshnessText == "Fresh" ? clrGreenText : freshnessText == "Aging" ? clrAmberText : freshnessText == "Stale" ? clrRedText : clrDarkText, text_size=size.normal, text_halign=text.align_center, bgcolor=freshBg)
table.cell(dash, 2, 13, freshnessContext, text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgDark)
table.cell(dash, 0, 14, "Model Confidence", text_color=clrText, text_size=size.small, text_halign=text.align_left, bgcolor=bgMed)
table.cell(dash, 1, 14, confidenceLevel + " (" + str.tostring(confidenceScore) + "%)", text_color=confidenceScore >= 80 ? clrGreenText : confidenceScore >= 60 ? clrAmberText : clrRedText, text_size=size.normal, text_halign=text.align_center, bgcolor=confBg)
table.cell(dash, 2, 14, sourceStatusText + " / " + confidenceContext, text_color=clrMuted, text_size=size.small, text_halign=text.align_right, bgcolor=bgMed)
if not showDashboard and barstate.islast
table.clear(dash, 0, 0, 2, 14)
// ============================================================================
// ALERTS
// ============================================================================
crossedAbove90 = ta.crossover(selectedRank, 90)
crossedBelow10 = ta.crossunder(selectedRank, 10)
enteredExpensive = hasSelectedHistory and crossedAbove90
enteredCheap = hasSelectedHistory and crossedBelow10
newEstimateIncrease = impliedEPSChanged and not na(estimateRevisionPct) and estimateRevisionPct > trendThreshold
newEstimateDecrease = impliedEPSChanged and not na(estimateRevisionPct) and estimateRevisionPct < -trendThreshold
newStaleEstimate =
not na(estimateAgeDays) and
not na(estimateAgeDays ) and
estimateAgeDays > staleDays and
estimateAgeDays <= staleDays
newAttractiveDiscount =
valuationGrowthText == "Attractive Discount" and
valuationGrowthText != "Attractive Discount"
newValueTrapRisk =
valuationGrowthText == "Value-Trap Risk" and
valuationGrowthText != "Value-Trap Risk"
newHighRiskPremium =
valuationGrowthText == "High-Risk Premium" and
valuationGrowthText != "High-Risk Premium"
alertcondition(
enteredExpensive,
title="Forward P/E Entered Expensive Zone",
message="Linked TradingView forward P/E entered the selected lookback's 90th-percentile expensive zone.")
alertcondition(
enteredCheap,
title="Forward P/E Entered Cheap Zone",
message="Linked TradingView forward P/E entered the selected lookback's 10th-percentile cheap zone.")
alertcondition(
newEstimateIncrease,
title="Implied Forward EPS Increased",
message="The forward EPS implied by TradingView's linked forward P/E increased by more than the configured trend threshold.")
alertcondition(
newEstimateDecrease,
title="Implied Forward EPS Decreased",
message="The forward EPS implied by TradingView's linked forward P/E decreased by more than the configured trend threshold.")
alertcondition(
newStaleEstimate,
title="Implied Forward EPS Became Stale",
message="The implied forward EPS has not changed within the configured stale-data threshold.")
alertcondition(
newAttractiveDiscount,
title="Attractive Discount Signal",
message="Forward P/E is historically discounted while growth and estimate direction remain supportive.")
alertcondition(
newValueTrapRisk,
title="Value-Trap Risk Signal",
message="Forward P/E is historically discounted, but growth or forward EPS estimates are deteriorating.")
alertcondition(
newHighRiskPremium,
title="High-Risk Premium Signal",
message="Forward P/E is historically elevated while growth or forward EPS estimates are deteriorating.")
Indicatore

Indicatore

Indicatore

Credit Stress (HY OAS Z-Score)中文說明
信用壓力指標(Credit Stress – HY OAS Z-Score )
本指標追蹤美國高收益債(垃圾債)信用利差的標準化程度,用以觀察信用市場對違約風險的定價變化,是判斷市場風險偏好的重要總經指標之一。
計算方式
資料來源為 FRED 公布的 ICE BofA 美國高收益債期權調整利差(BAMLH0A0HYM2),每日更新。將原始利差數值轉換成過去約一年(252個交易日)的 z-score,標準化後的數值代表目前利差偏離自身近一年平均值的程度(以標準差為單位),而非原始的基點數字。
如何使用
紅色區域(z-score > 1.5):利差顯著擴大,代表信用市場正在為違約風險要求更高補償,是市場風險意識升高的訊號,歷史上常與股市轉弱同步或稍微領先出現。
綠色區域(z-score < -1):利差異常收窄,代表信用市場對風險的定價過度寬鬆,這不是「安全」訊號,而是提醒風險偏好可能已經過熱,是留意泡沫跡象的參考,而非進場依據。
建議關注穿越0軸的方向(利差轉為擴大或收窄的轉折點),比單看目前處於哪個顏色區間更有參考價值。
圖表下方的灰色背景代表 NBER 官方認定的美國經濟衰退期,取自 FRED:USREC。
注意事項
本指標更新頻率雖為每日,但反映的是總經層級的風險情緒轉變,不適合當作短線進出場的精確訊號,較適合搭配保證金負債、淨流動性等指標一起觀察,綜合判斷市場所處的槓桿-流動性-信用週期階段。
z-score 的滾動窗口(252日)為固定值,未經過歷史事件的參數最佳化,選擇這個長度是基於避免對少數幾次歷史危機過度擬合的考量,而非「回測表現最好」的結果。使用者可依自己想觀察的時間尺度自行調整。
本指標為簡化模型,僅反映信用市場單一面向,不構成投資建議。
English Description
Credit Stress Indicator (HY OAS Z-Score)
This indicator tracks the standardized level of U.S. high-yield (junk bond) credit spreads, used to observe how credit markets are pricing default risk — a key macro gauge of overall market risk appetite.
Methodology
Data is sourced from FRED's ICE BofA US High Yield Index Option-Adjusted Spread (BAMLH0A0HYM2), updated daily. The raw spread is converted into a z-score using a roughly one-year (252 trading day) rolling window, expressing how far the current spread deviates from its own recent average, measured in standard deviations rather than raw basis points.
How to use it
Red zone (z-score > 1.5): Spreads are widening significantly — credit markets are demanding greater compensation for default risk. This signals rising risk aversion and has historically tended to move in tandem with, or slightly ahead of, equity market weakness.
Green zone (z-score < -1): Spreads are unusually tight — credit markets are pricing risk with unusual complacency. This is not a "safe" signal; rather, it's a warning that risk appetite may be overheated, useful for spotting potential bubble conditions rather than as an entry signal.
Focus on directional crossovers through the zero line (the point where spreads start widening or tightening) — this tends to carry more information than the current absolute zone.
The gray background marks official NBER-designated U.S. recession periods, sourced from FRED:USREC.
Notes
Although the underlying data updates daily, this indicator reflects macro-level shifts in risk sentiment and is not intended for precise short-term trade timing. It's best used alongside margin debt and net liquidity indicators to build a fuller picture of where the market sits in the leverage-liquidity-credit cycle.
The 252-day rolling window is a fixed value, deliberately not optimized against historical crisis events, in order to avoid overfitting to a small number of past episodes. Users can adjust it to match their own preferred time horizon.
This is a simplified model reflecting a single dimension of credit markets; it does not constitute investment advice. Indicatore

Fed Net Liquidity中文說明
聯準會淨流動性指標(Fed Net Liquidity)
本指標追蹤美國金融體系中「可流通資金」的多寡,用以觀察總體資金環境對風險資產(如美股)的支撐或壓力。
計算方式
淨流動性 = 聯準會總資產(WALCL)− 隔夜逆回購餘額(RRPONTSYD)− 財政部一般帳戶餘額(WTREGEN),三者皆取自 FRED(聖路易斯聯邦準備銀行)。邏輯是:聯準會擴表會注入資金,但若這些資金被停在逆回購工具或財政部帳戶裡未流通,就不算真正進入市場的「有效流動性」,因此需要扣除這兩項。
如何使用
淨流動性線位於20週均線之上(綠色區塊):資金環境偏寬鬆,對股市傾向有利。
淨流動性線位於20週均線之下(紅色區塊):資金正被抽離,對股市傾向不利。
建議關注轉折點(由紅翻綠或反之),而非絕對數值高低,轉折對市場情緒的參考意義通常大於水位本身。
本指標更新頻率為週,不適合作為短線進出場訊號,較適合用於中長期總體資金環境的背景判斷,需搭配其他技術面或基本面分析綜合使用。
注意事項
數據更新頻率有落差(WALCL、TGA為週資料,RRP為日資料),圖表顯示上會呈現階梯狀變化。本指標為簡化模型,未納入全球其他央行資金流動、企業獲利、利率政策等其他重要變數,僅供教育與研究參考,不構成投資建議。
English Description
Fed Net Liquidity Indicator
This indicator tracks the amount of freely circulating liquidity in the U.S. financial system, used to gauge whether the macro funding environment is supportive of or a headwind for risk assets such as U.S. equities.
Methodology
Net Liquidity = Fed Total Assets (WALCL) − Overnight Reverse Repo balance (RRPONTSYD) − Treasury General Account balance (WTREGEN), all sourced from FRED (Federal Reserve Bank of St. Louis). The logic: Fed balance sheet expansion injects liquidity, but funds parked in the reverse repo facility or the Treasury's account aren't actually circulating in markets, so both are subtracted to isolate "usable" liquidity.
How to use it
Net Liquidity line above its 20-week MA (green zone): liquidity conditions are loosening, generally supportive for equities.
Net Liquidity line below its 20-week MA (red zone): liquidity is being drained, generally a headwind for equities.
Focus on inflection points (line crossing from red to green or vice versa) rather than absolute levels — the direction change tends to carry more signal value than the level itself.
Data updates weekly, so this is not suited for short-term entry/exit timing. It works best as a macro backdrop indicator for medium- to long-term positioning, combined with other technical or fundamental analysis.
Notes
Update frequencies differ across components (WALCL and TGA are weekly; RRP is daily), which produces a stair-step pattern on the chart. This is a simplified model that does not account for other major variables such as global central bank liquidity, corporate earnings, or interest rate policy. For educational and research purposes only; not investment advice. Indicatore

Indicatore

Indicatore

Indicatore

Indicatore

Indicatore

Indicatore

Indicatore

Indicatore
