OPEN-SOURCE SCRIPT

ADX + RSI with Buy/Sell Signals

166
ADX Calculation:

Measures trend strength.
If ADX > 25, it indicates a strong trend.
RSI Calculation:

Determines overbought/oversold conditions.
Buy signal: RSI crosses above 30 (exiting oversold) & ADX > 25.
Sell signal: RSI crosses below 70 (exiting overbought) & ADX > 25.
Visualization:

ADX (red line) and RSI (blue line) are plotted.
Thresholds at 25 (ADX), 30 (RSI oversold), and 70 (RSI overbought).
Background colors indicate overbought (red) and oversold (green) RSI zones.
Alerts & Buy/Sell Markers:

"B" appears when a buy condition is met.
"S" appears when a sell condition is met.
Alerts notify users of potential trade opportunities.

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.