OPEN-SOURCE SCRIPT
Volatility Cluster Trend.

VCT - Volatility Cluster Trend
What it does
This indicator groups market volatility into 3 zones (low, medium, high) using a clustering method. Then it picks the right zone for current conditions and draws a trend line that adapts automatically.
Green line below price = uptrend
Red line above price = downtrend
Triangles show when trend flips.
How to add it
Open TradingView
Click "Indicators" at top (or press /)
Go to "My Scripts" tab
Find "VCT - Volatility Cluster Trend"
Click it
If you haven't saved it yet:
Open Pine Editor (bottom panel)
Paste the code
Click "Add to Chart"
Settings
ATR Length - how smooth the volatility reading is. Default 10 works fine. Go higher for less noise.
Factor - how far the line sits from price. Higher = wider stops, fewer signals. Lower = tighter, more signals. Default 3 is balanced.
Lookback Period - how much history to analyze for clustering. 100 bars is good for most timeframes.
Colors - pick what you like.
How to trade it
Long
Wait for green triangle
Price should be above the green line
Enter on next candle or pullback to line
Short
Wait for red triangle
Price should be below red line
Enter on next candle or pullback to line
Stop loss
Put it on the other side of the line
If long, stop goes just below green line
If short, stop goes just above red line
Exit
When opposite signal appears
Or trail your stop along the line
Tips
Works best on trending markets
Choppy sideways = lots of false signals
Higher timeframes (4h, daily) give cleaner signals
Combine with support/resistance for better entries
Don't chase - wait for pullbacks to the line
Alerts
Right click the indicator > Add Alert
Two options:
"Buy Signal" - alerts on green triangles
"Sell Signal" - alerts on red triangles
Set to "Once Per Bar Close" to avoid fake signals.
What it does
This indicator groups market volatility into 3 zones (low, medium, high) using a clustering method. Then it picks the right zone for current conditions and draws a trend line that adapts automatically.
Green line below price = uptrend
Red line above price = downtrend
Triangles show when trend flips.
How to add it
Open TradingView
Click "Indicators" at top (or press /)
Go to "My Scripts" tab
Find "VCT - Volatility Cluster Trend"
Click it
If you haven't saved it yet:
Open Pine Editor (bottom panel)
Paste the code
Click "Add to Chart"
Settings
ATR Length - how smooth the volatility reading is. Default 10 works fine. Go higher for less noise.
Factor - how far the line sits from price. Higher = wider stops, fewer signals. Lower = tighter, more signals. Default 3 is balanced.
Lookback Period - how much history to analyze for clustering. 100 bars is good for most timeframes.
Colors - pick what you like.
How to trade it
Long
Wait for green triangle
Price should be above the green line
Enter on next candle or pullback to line
Short
Wait for red triangle
Price should be below red line
Enter on next candle or pullback to line
Stop loss
Put it on the other side of the line
If long, stop goes just below green line
If short, stop goes just above red line
Exit
When opposite signal appears
Or trail your stop along the line
Tips
Works best on trending markets
Choppy sideways = lots of false signals
Higher timeframes (4h, daily) give cleaner signals
Combine with support/resistance for better entries
Don't chase - wait for pullbacks to the line
Alerts
Right click the indicator > Add Alert
Two options:
"Buy Signal" - alerts on green triangles
"Sell Signal" - alerts on red triangles
Set to "Once Per Bar Close" to avoid fake signals.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Get exclusive indicators & Alerts: scalping-algo.com
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Get exclusive indicators & Alerts: scalping-algo.com
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.