ADXm smoothed
Download scriptThis script is a technical trading tool designed to identify and smooth out market trends by analyzing price movement. It combines several advanced mathematical concepts—specifically volatility tracking, directional strength, and complex smoothing filters—to provide a cleaner visual signal of the market's momentum.
Here is a breakdown of how the logic works:
Core Logic Flow
The script operates by processing price data (Highs, Lows, and Closes) to determine the "strength" and "direction" of the current market trend. It does this through three main stages:
1. Dynamic Volatility Tracking Instead of just looking at price changes, the script measures the intensity of those changes. It calculates a "volatility" metric by comparing recent price movements against historical data. This helps the indicator understand whether the current market action is a significant move or just minor "noise."
2. Adaptive Trend Calculation The script uses an ADX-style logic (Average Directional Index) but modifies it to be more responsive. It calculates:
- Upward Movement: How much the price is pushing higher relative to its volatility.
- Downward Movement: How much the price is pushing lower relative to its volatility. By dividing these movements by the volatility, the script creates a "normalized" view of strength that isn't easily skewed by sudden, erratic spikes in price.
3. Multi-Stage Smoothing (The "m" Factor) To ensure the final result isn't jumpy, the script applies a sophisticated smoothing process. It doesn't just average the numbers; it uses an internal filtering system that:
- Adjusts its sensitivity based on user-defined periods.
- Uses "Alpha" and "Beta" coefficients (common in high-end signal processing) to balance how much weight to give to new information versus old data.
- Reduces "lag"—the delay between a price move and the indicator's reaction—while maintaining a smooth, readable line.
Visual Output
The script produces a visual representation on your chart with the following characteristics:
- ADXm Line: A primary line that changes color to represent different states (e.g., trending up, trending down, or flat).
- DI Line: A secondary reference line used for internal calculations to help determine the direction of the trend.
Summary for the User
In plain terms, this tool tells you "How strongly is the market moving in a specific direction?" By filtering out the "jitter" of the market and normalizing the moves against volatility, it aims to show you the underlying trend more clearly than a standard indicator would. It is designed to be smoother and more stable, making it easier to identify when a trend is gaining strength or starting to exhaust itself.
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# p r o p e r t y c o p y r i g h t "