Sat. Jan 11th, 2025

Dr king

Fantom / TetherUS BINANCE:FTMUSDT

//@version=5
///by dr mohameed

indicator(‘Chandelier Exit’, shorttitle=”CE”, overlay=true)

length = input(title=”ATR Period”, defval=1)
mult = input.float(title=”ATR Multiplier”, step=0.1, defval=2)
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, longStop)
longStop := close > longStopPrev ? math.max(longStop, longStopPrev) : longStop

shortStop = (useClose ? ta.lowest(close, length) : ta.lowest(length)) + atr
shortStopPrev = nz(shortStop, shortStop)
shortStop := close < 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=longColor)
buySignal = dir == 1 and dir == -1
plotshape(buySignal ? longStop : na, title=”Long Stop Start”, location=location.belowbar, 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))
//byu network to the moon ////
////shortStopPlot = plot(dir == 1 ? na : shortStop, title=”Short Stop”, style=plot.style_linebr, linewidth=2, color=shortColor)
sellSignal = dir == -1 and dir == 1
plotshape(sellSignal ? shortStop : na, title=”Short Stop Start”, location=location.abovebar, 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)
////fill(midPricePlot, shortStopPlot, title=”Short State Filling”, color=shortFillColor)

changeCond = dir != dir
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!”)

Checkout latest world news below links :
World News || Latest News || U.S. News

Source link

The post Dr king for BINANCE:FTMUSDT by kazl47 appeared first on WorldNewsEra.

By

Leave a Reply

Your email address will not be published.