How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Feature Request FAQ Help & Wiki Twitter

499 4
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
```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
ve=DIPlus>(DIMinus+(DIPlus*10)/100)

di=25+(DIPlus-DIMinus)

cy=di>=25?lime:red
//plot(DIPlus, color=lime,linewidth=2, title="DI+")
//plot(DIMinus, color=red, linewidth=2,title="DI-")
//plot(vam,title="velocita",linewidth=1,transp=50,color=lime)
plot(di,style=histogram,linewidth=4,color=cy,transp=50,histbase=25,title="DI")
hline(th, color=gray)
```
What do you think the price range for next week will be?
sorry i meant this weeks sessions
Stealth171
45.5 - 43 but depend also of the api report and stockage rep
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia

한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter