OPEN-SOURCE SCRIPT
已更新

Trend Scanner Pro

1 769
Trend Scanner Pro, Robust Trend Direction and Strength Estimator

Trend Scanner Pro is designed to evaluate the current market trend with maximum robustness, providing both direction and strength based on statistically reliable data.

This indicator builds upon the core logic of a previous script I developed, called Best SMA Finder. While the original script focused on identifying the most profitable SMA length based on backtested trade performance, Trend Scanner Pro takes that foundation further to serve a different purpose: analyzing and quantifying the actual trend state in real time.

It begins by testing hundreds of SMA lengths, from 10 to 1000 periods. Each one is scored using a custom robustness formula that combines profit factor, number of trades, and win rate. Only SMAs with a sufficient number of trades are retained, ensuring statistical validity and avoiding curve fitting.

The SMA with the highest robustness score is selected as the dynamic reference point. The script then calculates how far the price deviates from it using rolling standard deviation, assigning a trend strength score from -5 (strong bearish) to +5 (strong bullish), with 0 as neutral.

Two detection modes are available:
  • Slope mode, based on SMA slope reversals
  • Bias mode, based on directional shifts relative to deviation zones

Optional features:
  • Deviation bands for visual structure
  • Candle coloring to reflect trend strength
  • Compact table showing real-time trend status

This tool is intended for traders who want an adaptive, objective, and statistically grounded assessment of market trend conditions.
發行說明
Minor update: added user-defined color inputs for trend bias (bullish, bearish, neutral).

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。