OPEN-SOURCE SCRIPT
TSM + ADX Trend Power

Logic Behind This Indicator
This indicator combines two momentum/trend tools to identify strong, reliable trends in price movement:
1. TSM (Time Series Momentum)
What it does: Measures the difference between the current price and a smoothed average of past prices.
Formula: EMA(close - EMA(close, 14), 14)
Logic:
If TSM > 0 → Price is above its recent average = upward momentum
If TSM < 0 → Price is below its recent average = downward momentum
2. ADX (Average Directional Index)
What it does: Measures trend strength (not direction).
Logic:
ADX > 25 → Strong trend (either up or down)
ADX < 25 → Weak or no trend (choppy/sideways market)
Combined Logic (TSM + ADX)
The indicator only signals a trend when both conditions are met:
Condition Meaning
Uptrend TSM > 0 AND ADX > 25 → Strong upward momentum
Downtrend TSM < 0 AND ADX > 25 → Strong downward momentum
No signal ADX < 25 → Trend is too weak to trust
What It Aims to Detect
This indicator combines two momentum/trend tools to identify strong, reliable trends in price movement:
1. TSM (Time Series Momentum)
What it does: Measures the difference between the current price and a smoothed average of past prices.
Formula: EMA(close - EMA(close, 14), 14)
Logic:
If TSM > 0 → Price is above its recent average = upward momentum
If TSM < 0 → Price is below its recent average = downward momentum
2. ADX (Average Directional Index)
What it does: Measures trend strength (not direction).
Logic:
ADX > 25 → Strong trend (either up or down)
ADX < 25 → Weak or no trend (choppy/sideways market)
Combined Logic (TSM + ADX)
The indicator only signals a trend when both conditions are met:
Condition Meaning
Uptrend TSM > 0 AND ADX > 25 → Strong upward momentum
Downtrend TSM < 0 AND ADX > 25 → Strong downward momentum
No signal ADX < 25 → Trend is too weak to trust
What It Aims to Detect
- Strong, sustained trends (not just noise or small moves)
- Filters out weak/choppy markets where momentum indicators often give false signals
- Entry/exit points:
- Green background = Strong uptrend (consider buying/holding)
- Red background = Strong downtrend (consider selling/shorting)
- No color = Weak trend (stay out or wait)
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。