0% found this document useful (0 votes)
398 views

DMI - ADX - RSI - Level

This document contains the code for a TradingView indicator script that plots the Directional Movement Index (DMI), Average Directional Index (ADX), and Relative Strength Index (RSI) on a single chart. The script defines functions to calculate the DMI, ADX and RSI values and plots the indicators along with their typical analysis levels.

Uploaded by

SANTOSH KAMBLE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
398 views

DMI - ADX - RSI - Level

This document contains the code for a TradingView indicator script that plots the Directional Movement Index (DMI), Average Directional Index (ADX), and Relative Strength Index (RSI) on a single chart. The script defines functions to calculate the DMI, ADX and RSI values and plots the indicators along with their typical analysis levels.

Uploaded by

SANTOSH KAMBLE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//@version=4

// © kkg80

// DMI ADX RSI @kkg801


// KALPESH GALA
// Copyright by kkg80 9/2020
// DMI , ADX AND RSI IN ONE INDICATOR

study("DMI + ADX + RSI", shorttitle="DMI/ADX/RSI", format=format.price,


precision=2, resolution="")
src = close

//ADX + DMI

dilen = input(14, title="DI Length")


adxlen = input(14, title="ADX Smoothing")
keyLevel = input(25, title="key level for ADX")

dirmov(len) =>
up = change(high)
down = -change(low)
truerange = rma(tr, len)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, len) / truerange)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, len) / truerange)
[plus, minus]

adx(dilen, adxlen) =>


[plus, minus] = dirmov(dilen)
sum = plus + minus
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
[adx, plus, minus]

[sig, up, down] = adx(dilen, adxlen)

plot(sig, color=color.red, title="ADX")


plot(up, color=color.green, title="+DI")
plot(down, color=color.blue, title="-DI")
plot(keyLevel, color=color.white, title="Key Level")

//RSI
len = input(14, minval=1, title="RSI")
up1 = rma(max(change(src), 0), len)
down1 = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up1 / down1))
plot(rsi,title="RSI", color=color.black)
band1 = hline(60, title="Upper RSI level")
band0 = hline(40, title="Lower RSI level")
fill(band1, band0, color=color.green, transp=90)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy