Page 1 of 1

Vortex and ATR Multiplier

Posted: Thu Dec 17, 2020 4:55 am
by Fxxtrader
Hello - I am trying to save space on the chart while automatically calculating ATR by a multiple.

How may I only display the value of the multiple and not the actual plotting of the multiple?

Code: Select all

//@version=4
study(title = "Vortex Indicator", shorttitle="VI", format=format.price, precision=5, resolution="")
period_ = input(13, title="Period", minval=2)
VMP = sum( abs( high - low[1]), period_ )
VMM = sum( abs( low - high[1]), period_ )
STR = sum( atr(1), period_ )
VIP = VMP / STR
VIM = VMM / STR
plot(VIP, title="VI +", color=#3BB3E4)
plot(VIM, title="VI -", color=#FF006E)

upperBand = input(title="Upper Band", type=input.float, defval=1.35, step=.1)
lowerBand = input(title="Lower Band", type=input.float, defval=0.65, step=.1)

plot(upperBand, title="Upper Band", color=color.white)
plot(1, histbase=1, title="Neutral Band", color=color.white, linewidth=1)
plot(lowerBand, title="Lower Band", color=color.white, linewidth=1)

//ATR Multiplier
atr = atr(14)
floatType = atr[1]
multiplier = input(title="ATR Multiplier", type=input.float, defval=1.0, step=0.25)
plot(floatType * multiplier, color=color.red, transp=50)

I don't want the ATR multiple line on the chart, only it's value. Or am I going about this wrong?

Thank you.

Re: Vortex and ATR Multiplier

Posted: Sun Dec 20, 2020 7:21 am
by Gaz1892a
can you not just set transp to 100?

works for me and I just have the ATR value displayed as a digit in the data of the indi (top left)

length = input(title="Length", defval=14, minval=1)
multiply = input(title="Multiply", defval=1.5)


plot(rma(tr(true), length) *multiply, title = "ATR", color=#991515, transp=100)

Re: Vortex and ATR Multiplier

Posted: Fri Jan 15, 2021 1:22 am
by Matthew
Gaz is correct, the only way to draw a plot value on your chart without it actually drawing onto the chart is to set transp=100 :)