0% found this document useful (0 votes)
17 views1 page

ADX and DI Bands Indicator Script

Uploaded by

originspica
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)
17 views1 page

ADX and DI Bands Indicator Script

Uploaded by

originspica
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=5

indicator("ADX and DI Bands", overlay=true, shorttitle="ADX")

// --------------------
// INPUT PARAMETERS
// --------------------
// ADX and DI Parameters
adxLength = input.int(14, title='ADX Length')
adxSmoothing = input.int(14, title='ADX Smoothing Length') // Added smoothing
parameter
diColorUp = input.color(color.green, title='DI+ Color')
diColorDown = input.color(color.red, title='DI- Color')
adxColor = input.color(color.blue, title='ADX Color')

// ADX and DI Calculation


[diPlus, diMinus, adx] = ta.dmi(adxLength, adxSmoothing) // Updated with
adxSmoothing parameter
plot(diPlus, color=diColorUp, title='DI+')
plot(diMinus, color=diColorDown, title='DI-')
plot(adx, color=adxColor, title='ADX')

// Fill ADX and DI Bands


fill(plot(diPlus, color=diColorUp, title='DI+'), plot(diMinus, color=diColorDown,
title='DI-'), color=diPlus > diMinus ? color.new(diColorUp, 90) :
color.new(diColorDown, 90), title='DI Bands')

You might also like