Page 1 of 1

Volume Price Change

PostPosted: Fri Feb 09, 2018 7:57 am
by isamegrelo
Source: https://www.tradingview.com/script/DLwW ... ice-Change

this is code:

//@version=3
study(title='[RS]Volume Price Change', shorttitle='VPC')
price_smoothing = input(0)
length = input(15)
signal = input(0)

vpc = change(close, length) * sma(volume, length)
if price_smoothing > 0
vpc := change(ema(close, price_smoothing), length) * sma(ema(volume, price_smoothing), length)

signal_line = na
signal_color = na
if signal > 0
signal_line := ema(vpc, signal)
signal_color := vpc > signal_line ? lime : vpc < signal_line ? red : gray


plot(series=vpc, title='VPC', color=black, linewidth=1, style=line, transp=0)
plot(series=signal_line, title='Signal', color=signal_color, linewidth=1, style=line, transp=0)

hline(0)

Re: Volume Price Change

PostPosted: Mon Feb 12, 2018 10:20 am
by Apprentice

Re: Volume Price Change

PostPosted: Tue Dec 11, 2018 12:14 pm
by minifire18
Hi guys I have just found this site and thinks its amazing and the all the information people and developers share and help build indicators. I have a request can you add a horizontal line on the zero line without the (tag), I have done this manually and saved template and noticed that zero lines are different on different timeframes and another request if you can get alerts when indicator is below zero and signal line for shorts and above zero line and signal line for longs and have a visual label as a dot with colour options
Thanks in advance

Re: Volume Price Change

PostPosted: Wed Dec 12, 2018 7:32 am
by Apprentice
Try it now.

Re: Volume Price Change

PostPosted: Wed Dec 12, 2018 10:30 am
by minifire18
works fine could you possible to change line colour to white and can you still do the alerts for shorts below zero & signal line and longs above zero & signal line with colour options and label size please
thanks

Re: Volume Price Change

PostPosted: Tue Dec 18, 2018 8:58 am
by Apprentice
Volume Price Change with Alert added.