PROTECTED SOURCE SCRIPT

[NORTH2025] ADX SLOPE

48
[NORTH2025] ADX Slope is an indicator built on the Average Directional Index (ADX) and the associated Directional Indicators (DI+ and DI−). Below is a brief overview of how it works and what it does:

Automatically Adjusts ADX Length by Timeframe
- Instead of letting users manually input the ADX length (often a default of 14), this script “overrides” the period based on the chart’s current timeframe.
- For each timeframe (e.g., 1 minute, 5 minutes, 15 minutes, 4 hours, 1 day, etc.), the script sets a different ADX length to match the timeframe’s typical volatility or price behavior.
- If a timeframe is not specified in the script’s switch list, it defaults back to the standard length of 14.

Core ADX & DI Calculations
- The script calculates DI+ (positive directional indicator) and DI− (negative directional indicator) using smoothed directional movements.
- It then derives the ADX by taking the SMA of the DX (i.e., the absolute difference between DI+ and DI−, normalized by their sum).
- The DI+ and DI− lines help you see whether the market is trending up or down; the ADX line indicates the strength of that trend.

Line Plots
- DI+ is plotted in blue.
- DI− is plotted in red.
- The ADX line is plotted in black with a thicker width (2 pixels), making it easier to spot.
- Color-Coded Background for Trend Strength

The background color changes based on both:
- The slope of the ADX (whether the ADX is higher than the previous bar, i.e., “slope up,” or not).
- The current ADX value relative to specific thresholds (20 and 25).

The logic is as follows:
- ADX < 20 → Red background, indicating a very weak trend or sideways market.
- Slope Up and ADX ≥ 25 → Blue background, indicating a strong and strengthening trend.
- Slope Up and 20 ≤ ADX < 25 → Green background, indicating a moderate but improving trend.
- Slope Down or Flat and ADX ≥ 25 → Yellow background (30% opacity), indicating a strong trend but possibly weakening.
- Slope Down or Flat and 20 ≤ ADX < 25 → Orange background (30% opacity), indicating a moderate trend that is flattening or weakening.

Use Cases
- Quickly assess trend strength by glancing at the background color.
- Combine DI+ and DI− readings with the background colors to confirm whether a trend is developing, strengthening, or weakening.
- Because the ADX period automatically adjusts to the chart’s timeframe, traders can more easily get context-sensitive signals without manually adjusting each time.

In summary, [NORTH2025] ADX Slope is an enhanced ADX-based tool that adapts to multiple timeframes, plots DI+/DI− lines, and color-codes the chart background according to trend strength and slope changes. This provides a convenient way for traders to identify both the presence and momentum of a trend at a glance.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.