TradingView
binary_trader66
2016년 4월 14일 오후 3시 51분

ADX by cobra 

Ethereum / EuroKraken

설명

adx by cobra
코멘트
vaicru
How can I use this script ? thanks
ap3542
what do the yellow areas mean?
nattamejortho
MikaelHarts
how to put adx cobra in trading view ? I was search adx cobra but I dont find ? I'm waiting thanks
binary_trader66
@MikaelHarts, just copy it to your pine script and save
kss5
Hello! Possible to talk with You outside of this website?
Trade_with_ICE
what does the yellow background mean???
binary_trader66
@iCedNinja, local maximum or minimum of the function (best entry)
syuraj
Seems like no one bothered to update it to v5. So, I gave it a try.

//@version=5
indicator("ADX and DI")
len = input.int(title="Length", defval=3)
len1 = input.int(title="Length1", defval=1)
th = input.int(title="threshold", defval=20)

TrueRange = math.max(math.max(high-low, math.abs(high-nz(close[1]))), math.abs(low-nz(close[1])))
DirectionalMovementPlus = high-nz(high[1]) > nz(low[1])-low ? math.max(high-nz(high[1]), 0): 0
DirectionalMovementMinus = nz(low[1])-low > high-nz(high[1]) ? math.max(nz(low[1])-low, 0): 0

SmoothedTrueRange = nz(TrueRange[1]) - (nz(TrueRange[1])/len) + TrueRange
SmoothedDirectionalMovementPlus = nz(DirectionalMovementPlus[1]) - (nz(DirectionalMovementPlus[1])/len) + DirectionalMovementPlus
SmoothedDirectionalMovementMinus = nz(DirectionalMovementMinus[1]) - (nz(DirectionalMovementMinus[1])/len) + DirectionalMovementMinus

DIPlus = SmoothedDirectionalMovementPlus / SmoothedTrueRange * 100
DIMinus = SmoothedDirectionalMovementMinus / SmoothedTrueRange * 100
DX = math.abs(DIPlus-DIMinus) / (DIPlus+DIMinus)*100
ADX = ta.sma(DX, len)
//Skuska
crosscall = (DIPlus > DIMinus) ? 1 : 0
crossput = (DIMinus > DIPlus) ? 1 : 0
DIPcross = ta.sma(crosscall, len1)
DIPput = ta.sma(crossput, len1)
DIPOVB = (DIPlus > 60)
DIMOVS = (DIMinus > 60)

bgcolor(DIMOVS ? color.new(color.lime,transp=40) : na)
bgcolor(DIPOVB ? color.new(color.orange,transp=20) : na)
plot(DIPlus, color=color.green, linewidth=3, title="DI+")
plot(DIMinus, color=color.red, linewidth=3, title="DI-")
plot(ADX, color=color.white, linewidth=1, title="ADX")
hline(th, color=color.white, linewidth=1, linestyle=hline.style_dashed)
bgcolor(DIPcross ? color.new(color.green,transp=60) : na)
bgcolor(DIPput ? color.new(color.red,transp=60) : na)
Satishchandra
@syuraj, Not working
더보기