TradingView
binary_trader66
Apr 14, 2016 3:51 PM
ADX by cobra
KRAKEN:ETHEUR
240
Ethereum / Euro
Kraken
Description
⋅
Apr 14, 2016 3:51 PM
adx by cobra
ADX
by
cobra
Average Directional Index (ADX)
Comments
vaicru
⋅
Apr 14, 2016 5:26 PM
How can I use this script ? thanks
ap3542
⋅
Dec 29, 2019 10:04 PM
what do the yellow areas mean?
nattamejortho
⋅
Aug 7, 2022 7:51 AM
@ap3542
,
MikaelHarts
⋅
Feb 15, 2017 3:41 AM
how to put adx cobra in trading view ? I was search adx cobra but I dont find ? I'm waiting thanks
binary_trader66
⋅
Feb 15, 2017 12:51 PM
@MikaelHarts
, just copy it to your pine script and save
kss5
⋅
Feb 10, 2017 4:21 PM
Hello! Possible to talk with You outside of this website?
Trade_with_ICE
⋅
May 22, 2021 2:25 AM
what does the yellow background mean???
binary_trader66
⋅
May 30, 2021 6:06 PM
@iCedNinja, local maximum or minimum of the function (best entry)
syuraj
⋅
Jan 14, 2023 8:01 PM
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
⋅
Jan 17, 2023 5:24 PM
@syuraj
, Not working
More