OPEN-SOURCE SCRIPT
업데이트됨 X-trender

This script is designed to identify the market trend, its momentum, and potential reversal points by combining Arnaud Legoux Moving Averages (ALMA) and the Relative Strength Index (RSI).
The indicator is plotted in a separate pane below the price chart (overlay=false).
Here is a detailed breakdown of how the script works:
1. Core Logic (The Calculation)
The indicator filters out market noise by combining two powerful tools:
- ALMA (Arnaud Legoux Moving Average): An advanced moving average that reduces lag while maintaining superior smoothness. The script allows you to choose your preferred price source (e.g., Close, HLC3, OHLC4).
- RSI (Relative Strength Index): Instead of applying RSI directly to raw prices, the script calculates the RSI of the smoothed ALMA values and subtracts 50. This centers the indicator around a zero (0) baseline:
x - Values above 0 signal a bullish (upward) trend.
x - Values below 0 signal a bearish (downward) trend.
2. Dual Time Horizons (Short vs. Long)
The indicator analyzes the market from two perspectives simultaneously, creating two overlapping histograms:
- ShortTermXtrender: Calculates the RSI based on the difference between two fast ALMA lines. This captures rapid, local changes in price momentum.
- LongTermXtrender: Calculates the RSI directly from a single long ALMA line. This tracks the more stable, macro market trend.
3. Visual Signals and Charting
- Histogram Colors: Bright green/dark green represents upward momentum, while bright red/dark red represents downward momentum. The color brightens when the move accelerates and darkens when it slows down.
- Signal Line: A further smoothed ALMA of the short-term indicator. It turns bright green when moving up and red when moving down.
- Reversal Dots (Tiny Circles): Plotted at the exact pivot points of the signal line. A green dot marks a local bottom (potential buy signal), and a red dot marks a local peak (potential sell signal).
- Fixed Levels: Horizontal lines at 30 / -30 and 40 / -40 help identify overbought and oversold conditions.
4. Dynamic ATR Bands
When enabled, orange bands are drawn around the short-term indicator based on market volatility (Average True Range). These work similarly to Bollinger Bands. When the histogram breaks outside these bands, it signals an extreme market condition and a high probability of a price correction.
5. Multi-Timeframe (MTF) Dashboard
The script features an MTF dashboard that creates a clean table in the corner of your chart. It fetches the long-term trend data from multiple higher timeframes (e.g., 15m, 1h, 4h, 1D) at the same time:
- Displays BULL (green) if the long-term trend on that timeframe is positive.
- Displays BEAR (red) if the trend on that timeframe is negative.This allows you to quickly check the "higher timeframe bias" without switching charts.
The indicator is plotted in a separate pane below the price chart (overlay=false).
Here is a detailed breakdown of how the script works:
1. Core Logic (The Calculation)
The indicator filters out market noise by combining two powerful tools:
- ALMA (Arnaud Legoux Moving Average): An advanced moving average that reduces lag while maintaining superior smoothness. The script allows you to choose your preferred price source (e.g., Close, HLC3, OHLC4).
- RSI (Relative Strength Index): Instead of applying RSI directly to raw prices, the script calculates the RSI of the smoothed ALMA values and subtracts 50. This centers the indicator around a zero (0) baseline:
x - Values above 0 signal a bullish (upward) trend.
x - Values below 0 signal a bearish (downward) trend.
2. Dual Time Horizons (Short vs. Long)
The indicator analyzes the market from two perspectives simultaneously, creating two overlapping histograms:
- ShortTermXtrender: Calculates the RSI based on the difference between two fast ALMA lines. This captures rapid, local changes in price momentum.
- LongTermXtrender: Calculates the RSI directly from a single long ALMA line. This tracks the more stable, macro market trend.
3. Visual Signals and Charting
- Histogram Colors: Bright green/dark green represents upward momentum, while bright red/dark red represents downward momentum. The color brightens when the move accelerates and darkens when it slows down.
- Signal Line: A further smoothed ALMA of the short-term indicator. It turns bright green when moving up and red when moving down.
- Reversal Dots (Tiny Circles): Plotted at the exact pivot points of the signal line. A green dot marks a local bottom (potential buy signal), and a red dot marks a local peak (potential sell signal).
- Fixed Levels: Horizontal lines at 30 / -30 and 40 / -40 help identify overbought and oversold conditions.
4. Dynamic ATR Bands
When enabled, orange bands are drawn around the short-term indicator based on market volatility (Average True Range). These work similarly to Bollinger Bands. When the histogram breaks outside these bands, it signals an extreme market condition and a high probability of a price correction.
5. Multi-Timeframe (MTF) Dashboard
The script features an MTF dashboard that creates a clean table in the corner of your chart. It fetches the long-term trend data from multiple higher timeframes (e.g., 15m, 1h, 4h, 1D) at the same time:
- Displays BULL (green) if the long-term trend on that timeframe is positive.
- Displays BEAR (red) if the trend on that timeframe is negative.This allows you to quickly check the "higher timeframe bias" without switching charts.
릴리즈 노트
minor code chcanges릴리즈 노트
.릴리즈 노트
- Changed the RSI calculation method: replaced the built-in `ta.rsi` to (RMA) with a manually calculated `ta.rsi` to (ALMA) to ensure the script's overall operational consistency.This allows the calculations and the shape of the curve to more accurately and promptly identify the start and end of ongoing momentum and trends.
- Several minor cosmetic changes and code fixes.
릴리즈 노트
- a slight name change릴리즈 노트
-old script ;(오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.