OPEN-SOURCE SCRIPT

Strong Trend Bars (ATR-based)

544
This is a ChatGPT pinescript meant as an indicator for detecting strength in the market. The primary function I use it for is to decide which bars to trail a stop loss beneath.

💥 Explanation of adjustable inputs:

Bull Close Threshold (default 0.6):
If set to 0.6, bull bars must close above 60% of bar height → low + 0.6 * barHeight

Bear Close Threshold (default 0.6):
If set to 0.6, bear bars must close below 40% of bar height → high - 0.6 * barHeight

This lets you experiment with tighter or looser filters. For example:

0.7 → only bars closing near the extremes will light up

0.5 → about midpoint

0.8 → very demanding, “almost full body” bars

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.