I have a chandelier exit that I love using as part of a strategy for tradingview. It plots slightly different on the tradingview indicator versus any of the nt8 versions I have found so if anyone could direct me where I could go to get the code translated I would greatly appreciate it.
longFillColor = highlightState ? (dir == 1 ? longColor : na) : na
shortFillColor = highlightState ? (dir == -1 ? shortColor : na) : na
fill(midPricePlot, longStopPlot, title="Long State Filling", color=longFillColor)
fill(midPricePlot, shortStopPlot, title="Short State Filling", color=shortFillColor)
changeCond = dir != dir[1]
alertcondition(changeCond, title="Alert: CE Direction Change", message="Chandelier Exit has changed direction!")
alertcondition(buySignal, title="Alert: CE Buy", message="Chandelier Exit Buy!")
alertcondition(sellSignal, title="Alert: CE Sell", message="Chandelier Exit Sell!")
Can you help answer these questions from other members on futures io?
The Chandelier Stop can be calculated in different ways:
- Donchian anchor (highest high since N bars) versus highest high since in position
- Calculation from highest high / lowest low (standard) versus calculation from highest close / lowest close
- Calculation as trailing stop (no widening of stop allowed when volatility increases) versus stop that may widen
- Design to revert intra-bar when touched (such as a hard stop) or to revert based on the close
Best you post a simple 5-min or 15-min chart of ES 06-22 or NQ 06-22 with the Chandelier Stop applied.
That way it is possible to find out which version you are looking for.