OPEN-SOURCE SCRIPT
已更新 ADR% / ATR / Dynamic LoD–HoD Table

This indicator displays a clean data table showing ADR%, ATR, and a dynamic LoD/HoD distance value based on daily trend conditions.
When price is above the 21-day or 50-day moving average, the indicator shows the distance from the Low of Day.
When price is below BOTH daily moving averages, it automatically switches to showing distance from the High of Day.
The table updates in real-time and gives a fast, volatility-based view of where price sits inside the day’s range.
Features
• ADR% (Average Daily Range Percentage)
• ATR (Average True Range)
• Automatic LoD → HoD switching based on daily trend
• Customizable colors and layout
• Clean, space-efficient table format
• Designed for intraday and volatility-focused traders
When price is above the 21-day or 50-day moving average, the indicator shows the distance from the Low of Day.
When price is below BOTH daily moving averages, it automatically switches to showing distance from the High of Day.
The table updates in real-time and gives a fast, volatility-based view of where price sits inside the day’s range.
Features
• ADR% (Average Daily Range Percentage)
• ATR (Average True Range)
• Automatic LoD → HoD switching based on daily trend
• Customizable colors and layout
• Clean, space-efficient table format
• Designed for intraday and volatility-focused traders
版本注释
🧠 Original Indicator (What it was built for)Your original script was a daily volatility + structure dashboard, showing:
1. ADR%
Measures average daily range as a percentage
Used to understand how much a stock typically moves in a day
2. ATR (Daily)
True volatility in raw price terms
Optional display in the table
3. LoD / HoD Distance (Normalized)
Shows how far price is from:
Low of Day (LoD) in bullish conditions
High of Day (HoD) in bearish conditions
Expressed in ATR-normalized % terms
Helps gauge “room left to move” intraday relative to volatility
4. Trend Filter (Simple Regime Logic)
Uses:
SMA 21
SMA 50
If price is below both → bearish regime
This flips whether you focus on:
HoD (bearish)
LoD (bullish)
5. Table Output (Top Right)
Clean dashboard showing:
ADR%
ATR
Distance to HoD/LoD
🔧 What We Added (New Feature)
⭐ “Max Entry” / “Optimal Entry”
This is the major upgrade.
We introduced a volatility-based entry cap using ATR:
Logic added:
Uses 50% of ATR
Anchored from:
Low of Day (for longs)
High of Day (for shorts)
📌 Formulas added:
Long setup:
Max Long Entry = LoD + (ATR × 0.5)
Short setup:
Max Short Entry = HoD - (ATR × 0.5)
🧠 What this changes conceptually
Before:
You only knew volatility and distance
Now:
You also know where NOT to chase price beyond
This turns your indicator into a:
“Execution boundary tool” instead of just a volatility dashboard
📊 New Behavior in the Table
You now see:
ADR%
ATR
LoD/HoD distance
Max Entry (renamed from “Optimal Entry”)
So the table now answers:
“How much does this move normally… and what is my disciplined entry limit today?”
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。