Chandelier en TradingView 🚀 📊

📊 Estrategia de Chandelier Trading View paso a paso: Aprende cómo utilizar la estrategia de Chandelier en Trading View con ejemplos de operaciones y análisis en tiempo real. Descubre los mejores ajustes y configuraciones recomendadas para identificar señales de entrada precisas estrategia LZMSA. 🚀 Mejora tu desempeño con esta poderosa herramienta de chandelier trading.1

¿Qué Son los Gráficos Chandelier en TradingView?

Los gráficos de TradingView son herramientas populares entre traders e inversores para realizar análisis técnico. Ofrecen información valiosa sobre las tendencias del mercado, ayudando a tomar decisiones informadas al comprar o vender activos.

Ventajas de los Gráficos Chandelier en TradingView

Estos gráficos ofrecen varios beneficios que pueden potenciar tu estrategia de trading:

1. Representación Visual Completa:
Los gráficos Chandelier muestran de manera clara los movimientos de precio, permitiendo identificar tendencias, niveles de soporte y resistencia, así como posibles puntos de entrada y salida.

2. Parámetros Personalizables:
Puedes ajustar los gráficos según tus preferencias de trading. Los parámetros incluyen la longitud del periodo, el multiplicador ATR y los trailing stops, lo que permite adaptar la herramienta a tu estilo de inversión.

3. Gestión Efectiva del Riesgo:
Los gráficos Chandelier incluyen trailing stops integrados, que ajustan automáticamente el nivel de stop-loss conforme el precio avanza. Esto protege tus ganancias y minimiza las pérdidas potenciales.

Cómo Integrar los Gráficos Chandelier en tu Estrategia

Una estrategia eficaz es combinar los gráficos Chandelier con la estrategia LZMSA. Chandelier en Trading View con ejemplos En este enfoque, se usa la media móvil exponencial (EMA) del indicador LZMSA para identificar señales claras de compra y venta.

chandelier trading view Buy
chandelier trading view Buy
  1. Señal de Compra:
    • Si la EMA del indicador LZMSA está por debajo del precio y el gráfico Chandelier da una señal de «compra», es una indicación clara para entrar al mercado.
  2. Señal de Venta:
    • Si la EMA está por encima del precio y el gráfico Chandelier marca una condición de «venta», se recomienda cerrar posiciones o vender.
chandelier trading view Sell
chandelier trading view Sell

Ejemplo en Video de Estrategia Combinada

Te invitamos a ver este video donde se explica cómo combinar los gráficos Chandelier con la estrategia LZMSA y trailing stops. Con esta combinación, se busca maximizar beneficios y reducir riesgos.

//@version=5
// Copyright (c) 2019-present, Alex Orekhov (everget)
// Chandelier Exit script may be freely distributed under the terms of the GPL-3.0 license.
strategy('Chandelier Exit', shorttitle='CE tik tok', overlay=true)
///// zlmsa
length0 = input(title='Length', defval=50)
offset = input(title='Offset', defval=0)
src = input(close, title='Source')
lsma = ta.linreg(src, length0, offset)
lsma2 = ta.linreg(lsma, length0, offset)
eq = lsma - lsma2
zlsma = lsma + eq
plot(zlsma, color=color.new(color.yellow, 0), linewidth=3)
////// chandela
length = input(title='ATR Period', defval=22)
mult = input.float(title='ATR Multiplier', step=0.1, defval=3.0)
showLabels = input(title='Show Buy/Sell Labels ?', defval=true)
useClose = input(title='Use Close Price for Extremums ?', defval=true)
highlightState = input(title='Highlight State ?', defval=true)
atr = mult * ta.atr(length)
longStop = (useClose ? ta.highest(close, length) : ta.highest(length)) - atr
longStopPrev = nz(longStop[1], longStop)
longStop := close[1] > longStopPrev ? math.max(longStop, longStopPrev) : longStop
shortStop = (useClose ? ta.lowest(close, length) : ta.lowest(length)) + atr
shortStopPrev = nz(shortStop[1], shortStop)
shortStop := close[1] < shortStopPrev ? math.min(shortStop, shortStopPrev) : shortStop
var int dir = 1
dir := close > shortStopPrev ? 1 : close < longStopPrev ? -1 : dir
var color longColor = color.green
var color shortColor = color.red
longStopPlot = plot(dir == 1 ? longStop : na, title='Long Stop', style=plot.style_linebr, linewidth=2, color=color.new(longColor, 0))
buySignal = dir == 1 and dir[1] == -1
plotshape(buySignal ? longStop : na, title='Long Stop Start', location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(longColor, 0))
plotshape(buySignal and showLabels ? longStop : na, title='Buy Label', text='Buy', location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(longColor, 0), textcolor=color.new(color.white, 0))
shortStopPlot = plot(dir == 1 ? na : shortStop, title='Short Stop', style=plot.style_linebr, linewidth=2, color=color.new(shortColor, 0))
sellSignal = dir == -1 and dir[1] == 1
plotshape(sellSignal ? shortStop : na, title='Short Stop Start', location=location.absolute, style=shape.circle, size=size.tiny, color=color.new(shortColor, 0))
plotshape(sellSignal and showLabels ? shortStop : na, title='Sell Label', text='Sell', location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(shortColor, 0), textcolor=color.new(color.white, 0))
midPricePlot = plot(ohlc4, title='', style=plot.style_circles, linewidth=0, display=display.none, editable=false)
longFillColor = highlightState ? dir == 1 ? longColor : na : na
shortFillColor = highlightState ? dir == -1 ? shortColor : na : na
fill(midPricePlot, longStopPlot, title='Long State Filling', color=longFillColor, transp=90)
fill(midPricePlot, shortStopPlot, title='Short State Filling', color=shortFillColor, transp=90)
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!')
///////////////Strategy Gooo/////
//////
/////strategy 
///////////////////////////////////////////////
Cuidatrade=false
IsLong() =>
    strategy.position_size > 0
IsShort() =>
    strategy.position_size < 0
BarsSinceFirstEntry() =>
    bar_index - strategy.opentrades.entry_bar_index(0)
    
//TP1Perc = input.float(6,title='TP1 Take Profit (%)', minval=0.0, step=0.1, defval=2, group='TPSL')
//TP2Perc = input.float(6,title='TP2 Take Profit (%)', minval=0.0, step=0.1, defval=4, group='TPSL')
//SLPerc = input.float(1,title='Stop Loss (%)', minval=0.0, step=0.1, defval=2, group='TPSL')
stoploss = input.float( 6 , "Stop Loss percentage" , minval= 0 , group='TPSL')
takeprofit = input.float( 2 , "Take Profit percentage" , minval= 0 ,group='TPSL')
trailingstop = input(true , "Trailing Stop")
trail_p = input.float( 0.05 , "Trailing Stop percentage (of entry price)" , minval= 0,  step=0.01,group='TPSL')
//TP1_Ratio = input.float(title='Sell Postion Size % @ TP1', defval=100, step=1, group='TPSL', tooltip='Example: 50 closing 50% of the position once TP1 is reached') / 100
boltakeprofit = input.bool(true,title='Bool take care profit',  defval=true, group='TPSL')
tkprofit = input.float(0.5,title='Take care of a take profit ', minval=0.1, step=0.1, defval=0.5, group='TPSL')
NumberbarsOpen = input.int(4,title='Number of bars take care strategy the strategy ', minval=1, defval=2, group='TPSL')
percentAsPoints(pcnt) =>
    strategy.position_size != 0 ? math.round(pcnt / 100.0 * strategy.position_avg_price / syminfo.mintick) : float(na)
percentAsPrice(pcnt) =>
    strategy.position_size != 0 ? (pcnt / 100.0 + 1.0) * strategy.position_avg_price : float(na)
current_position_size = math.abs(strategy.position_size)
initial_position_size = math.abs(ta.valuewhen(strategy.position_size[1] == 0.0, strategy.position_size, 0))
//TP1 = strategy.position_avg_price + percentAsPoints(TP1Perc) * syminfo.mintick * strategy.position_size / math.abs(strategy.position_size)
//TP2 = strategy.position_avg_price + percentAsPoints(TP2Perc) * syminfo.mintick * strategy.position_size / math.abs(strategy.position_size)
//SL = strategy.position_avg_price - percentAsPoints(SLPerc) * syminfo.mintick * strategy.position_size / math.abs(strategy.position_size)
detect_exit = strategy.position_size == 0 and strategy.closedtrades.exit_bar_index(strategy.closedtrades - 1) == bar_index
IsFlat() =>
    strategy.position_size == 0
longNow = (strategy.position_size[1] <= 0) and (strategy.position_size > 0)
shortNow = (strategy.position_size[1] >= 0) and (strategy.position_size < 0)
//DiscountPriceConfirm45= ta.crossover(DiscountZonePrice45,low ) //or ta.crossover(DiscountZonePrice[1],low [1] ) //or ta.crossover(DiscountZonePrice[2],low[2] )
//PremiumPriceConfirm45= ta.crossunder(PremiumZonePrice45,high ) 
////ver si existe cruce en rojo cercano 
//CruzoenverdeContando = ta.barssince(Ema14>Ema21)
//CruzoenrojoContando = ta.barssince(Ema14<Ema21)
LongConfirm=   buySignal and zlsma >close//  totaldiv >= mindiv and TouchSma200Reed //and inOrderbetweenGreen //and  Sma200order==4 //inOrderbetweenGreen//TouchSma200Reed  and inOrderbetweenGreen  and  Sma200order==4 and greenorderblocktouch//and Ema21<Ema200 //and val < nz(val[1])//TouchEma200Reed// and wait_completeRed // TouchEma200Reed//val < nz(val[1])//and  DiscountZonePrice//and Ema14<Ema21
ShortConfirm=  sellSignal and zlsma <close //totaldiv <= -mindiv and TouchSma200Green //and  inOrderbetweenReed//inOrderbetweenReed//TouchSma200Green and inOrderbetweenReed  and  Sma200order==0 and redorderblocktouch//and Ema21>Ema200  // and val > nz(val[1])// TouchEma200Reed//and wait_completeGreen// TouchEma200Reed//val > nz(val[1])  //and   PremiumZonePrice//and Ema14>Ema21
//strategy.entry("long", strategy.long, CantidadContratos, when =  Entrandolong and rsiValue<30 or perfectlong )  ///  perfectlong perfectShort
if IsFlat()==true and  IsLong() ==false and IsShort() ==false and   LongConfirm
    strategy.entry("long", strategy.long,  comment="Buy" )  
    alert(": Long on :" +syminfo.basecurrency+ ":SL :" + str.tostring(stoploss) + ":TP :" +  str.tostring(takeprofit), alert.freq_once_per_bar_close)
if  IsFlat()==true and  IsLong() ==false and  IsShort() ==false and  ShortConfirm
    strategy.entry("short", strategy.short,  comment="Short")
    alert(": Short on :" +syminfo.basecurrency+ ":SL :" + str.tostring(stoploss) + ":TP :" +  str.tostring(takeprofit), alert.freq_once_per_bar_close)
bgcolor( IsFlat()==true and LongConfirm ? color.new(#ffffff, 31)  : na)
bgcolor( IsFlat()==true and ShortConfirm ? color.new(#000000, 23)  : na)
  
curProfitInPts() =>
    if strategy.position_size > 0
        (high - strategy.position_avg_price) 
    else if strategy.position_size < 0
        (strategy.position_avg_price - low) 
    else
        0
        
calcStopLossPrice(OffsetPts) =>
    if strategy.position_size > 0
        strategy.position_avg_price - OffsetPts * syminfo.mintick
    else if strategy.position_size < 0
        strategy.position_avg_price + OffsetPts * syminfo.mintick
    else
        0
av_p = strategy.position_avg_price
if trailingstop 
    
    //if strategy.position_size > 0 and strategy.position_size[1] <= 0
    //   mes_pa = "   start trail: "+str.tostring(   av_p + (av_p *  takeprofit/100)    ) +"\n trail offset: "+ str.tostring( av_p *(trail_p/100)   ) +"\n SL: "+ str.tostring( av_p - (av_p *  stoploss/100)    ) 
        //label.new(bar_index, low - low *(trail_p/100) , mes_pa , style = label.style_label_up , color = color.white ,textcolor = color.black, size = size.normal)
  //  else if  strategy.position_size < 0 and strategy.position_size[1] >= 0
    //    mes_pa = "   start trail: "+str.tostring(   av_p - (av_p *  takeprofit/100)    ) +"\n trail offset: "+ str.tostring(   av_p *(trail_p/100)     )  +"\n SL: "+ str.tostring( av_p + (av_p *  stoploss/100)    ) 
        
        //label.new(bar_index, high + high *(trail_p/100) , mes_pa , style = label.style_label_down  , color = color.white ,textcolor = color.black, size = size.normal)
    
    strategy.exit("exit_sell", "short" ,  stop  =  av_p + (av_p *  stoploss/100),  trail_price = av_p - (av_p *  takeprofit/100) , trail_offset = av_p *(trail_p/100) *1/syminfo.mintick  , comment = "exit_sell", alert_message = "exit_sell", alert_loss="exit_sell Alert Loss", alert_profit ="exit_sell", alert_trailing ="exit_sell") 
    
    strategy.exit("exit_buy", "long" ,  stop  =  av_p - (av_p *  stoploss/100)  ,  trail_price = av_p + (av_p *  takeprofit/100) , trail_offset = av_p *(trail_p/100) *1/syminfo.mintick ,comment = "exit_buy", alert_message = "exit_buy", alert_loss="exit_buy Alert Loss", alert_profit ="exit_buy", alert_trailing ="exit_buy" )
    
else
    strategy.exit("exit_buy", "long" ,  when= strategy.position_size > 0 ,  stop  =  av_p - (av_p *  stoploss/100)  ,  limit  =  av_p + (av_p *  takeprofit/100) , comment = "stakeprofit buy" ) 
    
    strategy.exit("exit_sell", "short" ,when= strategy.position_size < 0 ,  stop  =  av_p + (av_p *  stoploss/100)   ,  limit  =  av_p - (av_p *  takeprofit/100) , comment = "sttakeprofit sell") 
//strategy.exit('TP1', from_entry='long', qty=initial_position_size * TP1_Ratio, limit=TP1, stop=SL)
//strategy.exit('TP2', from_entry='long', limit=TP2, stop=SL)
//strategy.exit('Stop Lost Short', from_entry='short', limit=TP2, stop=SL)
//strategy.exit('Stop Lost Long', from_entry='long', limit=TP2, stop=SL)
// Plot take profit values for confirmation
//plot(series=strategy.position_size > 0 ? TP1 : na, color=color.new(color.green, 0), style=plot.style_circles, linewidth=1, title='Take Profit 1')
//plot(series=strategy.position_size > 0 ? TP2 : na, color=color.new(color.green, 0), style=plot.style_circles, linewidth=1, title=' Take Profit 2')
//plot(series=strategy.position_size > 0 ? SL : na, color=color.new(color.red, 0), style=plot.style_circles, linewidth=1, title='Stop Loss')
//strategy.
if strategy.openprofit>=tkprofit and  BarsSinceFirstEntry()>NumberbarsOpen
    Cuidatrade:=true 
CirraYaEnprofit= Cuidatrade==true and strategy.openprofit<=1
///Cuidaba el profit pero no es viable ya por el traling
if boltakeprofit and IsFlat()==false and Cuidatrade and  IsShort()==true
    strategy.close("short", qty_percent = 100, comment = "Tp Short stop%")
    alert('TP Short Stop %', alert.freq_once_per_bar_close)
    
if boltakeprofit and IsFlat()==false and Cuidatrade  and IsLong()==true
    strategy.close("long", qty_percent = 100, comment = "Tp Long stop")
    alert('TP Long Stop%', alert.freq_once_per_bar_close)
//if IsFlat()==false and bull_choch_alert and BarsSinceFirstEntry()>1
 //   strategy.close("short", qty_percent = 100, comment = "Miedo Short stop")
  //  alert('Stop Lost Short Miedo ', alert.freq_once_per_bar_close)
    
//if IsFlat()==false and bear_choch_alert  and BarsSinceFirstEntry()>1
 //   strategy.close("long", qty_percent = 100, comment = "Miedo Long stop")
  //  alert('Stop Lost Long Miedo', alert.freq_once_per_bar_close)
    
//bgcolor( detect_exit==true and ADXAlcista and AdxcolorEstaenrojo==false ? color.new(#9fff32, 31)  : na)
//bgcolor( detect_exit==true and ADXBajista and AdxcolorEstaenrojo==true ? color.new(#ff3333, 23)  : na)
//if ADXAlcista and AdxcolorEstaenrojo==false
//    strategy.close("short", qty_percent = 100, comment = "close buy entry for 100%")
    
//if ADXBajista and AdxcolorEstaenrojo==true
//    strategy.close("long", qty_percent = 100, comment = "close buy entry for 100%")

Conclusión: Potencia tu Trading con los Gráficos Chandelier

Los gráficos Chandelier en TradingView son una herramienta poderosa para cualquier trader que busque mejorar su gestión de riesgos y optimizar sus operaciones. Con la posibilidad de personalización y la combinación con estrategias como LZMSA, puedes aumentar tus probabilidades de éxito en el mercado.