DI histo + adx

939 4 198
This is a DI + , DI - with ADX , but instead of plot the 2 lines of Directional moviment ( + and -), we have a histogram of the difference between DI+ and DI-. As zero line I used value of 25, so can plot the ADX too
Remove from Favorite Scripts Add to Favorite Scripts
study("DI histo + adx",overlay=false,scale=scale.left)
len = input(title="Length", type=integer, defval=14)
th = input(title="threshold", type=integer, defval=25)

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

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

DIPlus = SmoothedDirectionalMovementPlus / SmoothedTrueRange * 100
DIMinus = SmoothedDirectionalMovementMinus / SmoothedTrueRange * 100
DX = abs(DIPlus-DIMinus) / (DIPlus+DIMinus)*100
ADX = sma(DX, len)
ro=DIMinus>(DIPlus+(DIMinus*10)/100) and ADX>11 and ADX<=25
xve= DIPlus>(DIMinus+(DIPlus*10)/100) and ADX>22
xro=DIMinus>(DIPlus+(DIMinus*10)/100) and ADX>22
fl=DIPlus-DIMinus<abs(10) and ADX<15


//plot(DIPlus, color=lime,linewidth=2, title="DI+")
//plot(DIMinus, color=red, linewidth=2,title="DI-")
plot(ADX, color=orange,linewidth=1,transp=0, title="ADX")
hline(th, color=gray)
Can you please prepare it without adx and add ema of di difference to it.
sorry i meant this weeks sessions
MarcoValente Stealth171
45.5 - 43 but depend also of the api report and stockage rep
What do you think the price range for next week will be?
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out