SparkyFlary
Member
A clean, confidence‑boosting trend tool designed for day traders who want clarity, structure, and real price‑action awareness — without the overwhelm.
If your chart is overloaded with moving average crosses, RSI signals, and indicators that contradict each other every five minutes, it’s time to simplify. The Chandelier Volatility Trailing Stop gives you a clean, color‑coded roadmap that helps you follow real momentum with confidence.
What Makes This Indicator a Game‑Changer
Originally popularized on TradingView and re‑engineered for Thinkorswim, this version blends:
It tracks trend direction, adapts to volatility, and flips bias only when the market truly shifts.
Simple. Visual. Powerful.
If your chart is overloaded with moving average crosses, RSI signals, and indicators that contradict each other every five minutes, it’s time to simplify. The Chandelier Volatility Trailing Stop gives you a clean, color‑coded roadmap that helps you follow real momentum with confidence.
Originally popularized on TradingView and re‑engineered for Thinkorswim, this version blends:
→ Highest‑high / lowest‑low structure
→ ATR‑based volatility filtering
→ Directional bias detection
→ A clean, color‑coded trailing stop
It tracks trend direction, adapts to volatility, and flips bias only when the market truly shifts.
Green line = bullish bias
Red line = bearish bias
Simple. Visual. Powerful.
Ruby:
#Chandelier Volatility Trailing Stop
#SparkyFlary
#Code taken and re-edited to thinkorswim from pipCharlie, who got it from LazyBear
#https://www.tradingview.com/script/mjBdRGXe-Chandelier-Stop/
input AtrMult = 3.0;
input ATRlength = 7;
input lookbackLength = 22;
input highestHigh = high;
input lowestLow = low;
input AvgType = AverageType.WILDERS;
input PaintBars = no;
def ATR = MovingAverage(AvgType, TrueRange(high, close, low), ATRlength);
def longstop = Highest(highestHigh,lookbackLength)-AtrMult*atr;
def shortstop = Lowest(lowestLow,lookbackLength)+AtrMult*atr;
def shortvs = if isNaN(shortvs[1]) then shortstop else if close>shortvs[1] then shortstop else min(shortstop,shortvs[1]);
def longvs = if isNaN(longvs[1]) then longstop else if close<longvs[1] then longstop else max(longstop,longvs[1]);
def longswitch= if close>=shortvs[1] and close[1]<shortvs[1] then 1 else 0;
def shortswitch = if close<=longvs[1] and close[1]>longvs[1] then 1 else 0;
def direction = if isNaN(direction[1]) then 0 else if direction[1]<=0 and longswitch then 1 else if direction[1]>=0 and shortswitch then -1 else direction[1];
def pc = if direction>0 then longvs else shortvs;
DefineGlobalColor("LongStop", CreateColor(0, 180, 200)); # soothing cyan
DefineGlobalColor("ShortStop", CreateColor(230, 140, 0)); # subtle orange
plot VolatilityStop = pc;
VolatilityStop.SetLineWeight(3);
VolatilityStop.SetStyle(Curve.FIRM);
VolatilityStop.AssignValueColor(if direction < 0 then GlobalColor("ShortStop") else GlobalColor("LongStop"));
AssignPriceColor(if PaintBars and direction < 0
then Color.RED
else if PaintBars and direction > 0
then Color.GREEN
else Color.CURRENT);
Last edited by a moderator: