OPEN-SOURCE SCRIPT
Updated

Period High/Low Percentage Difference

274
Check for price away from 200 days high/low and from recent high and low. Found it difficult to keep switching from regular to percentage in chart. I use it for ETF investing.
Release Notes
Check for price away from 200 days high/low and from recent high and low. Found it difficult to keep switching from regular to percentage in chart. I use it for ETF investing.
V1.2
Added a mid line.
Release Notes
Added label to midline
Release Notes
This I think is the final version.
Added a price/volume study as ratio. The volumes had to be normalised by a divisor, initially using 30000 but it is user defined and in case extreme high or low volumes the visualisation would be skewed.
It appears that, as the ratio rises i.e. price increase and volume decrease leads to selling and vice-versa. My mathematical abilities being limited would need help with correlation of ratio to a buy or sell signal, or suggestion for use with another indicator.
Release Notes
Just a clean up.
Release Notes
Removed Candles being generated by script. Price volume ratio apparently serves very little purpose, can be switched off, it's being retained to make it into a price volume divergence signal (as a greedy trader I want to catch volumes going up before price catches up), hopefully.
Release Notes
In tradingview can't find a way to enter price of stocks already held. As a work around have put a horizontal line at price point already bought. The line should appear once ticker matches your entry. However I and unable to handle arrays as a pair.

So the work around is hard coding in the script. If you want to add a ticker you open the script after making a working copy and copy section between remarks Copy from here to copy till here. change the values as given in remarks.

Someone more knowledgeable can help with kind of mapping as here

map.set(pricesMap, "NSE:GOLDBEES", 70)
map.set(pricesMap, "NSE:NIFTYBEES", 247)
map.set(pricesMap, "NSE:ALPHA", 50)
map.set(pricesMap, "NSE:RELIANCE", 2500)
I tried but failed.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.