OPEN-SOURCE SCRIPT
已更新 ADX with 20 Threshold

I wanted an ADX with a threshold line so I created an indicator.
ADX (20 Threshold) Cheat-Sheet
Purpose: Filter trades by trend strength.
Indicator: ADX (derived from DMI) with optional +DI/−DI lines.
Key Rules:
ADX > 20: Trend is strong → trade OK
ADX < 20: Trend is weak/choppy → avoid trades
Optional +DI / −DI: Shows momentum direction
HTF Use: Stable trend confirmation
LTF Use: Optional filter with EMA slope for entries
Tips:
Combine with EMAs or MACD for directional bias.
ADX does not indicate direction, only strength.
Best used to avoid low-probability trades in sideways markets.
ADX (20 Threshold) Cheat-Sheet
Purpose: Filter trades by trend strength.
Indicator: ADX (derived from DMI) with optional +DI/−DI lines.
Key Rules:
ADX > 20: Trend is strong → trade OK
ADX < 20: Trend is weak/choppy → avoid trades
Optional +DI / −DI: Shows momentum direction
HTF Use: Stable trend confirmation
LTF Use: Optional filter with EMA slope for entries
Tips:
Combine with EMAs or MACD for directional bias.
ADX does not indicate direction, only strength.
Best used to avoid low-probability trades in sideways markets.
版本注释
Added name Simon20cent版本注释
✅ Changes made:Added threshold2 for 40.
Added a new hline for 40 with a different color (orange).
Background now optionally highlights if ADX exceeds 40.
版本注释
ADDED: Separate lengths for DMI and ADX
You now have two independent inputs:
DMI Length → controls +DI and -DI smoothing
ADX Length → controls ADX smoothing
This gives you more flexibility and precision.
Manual DMI Calculation
Replaced ta.dmi() with a custom DMI calculation so DI and ADX can use different lengths.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。