I would appreciate if I would be helped on this. I would like to Plot a simple moving average lets say SMA 50 .Then I want to plot the value of SMA next to the line itself instead of on Y-Axis.I will be using the "END' key to create space on the right between the price bars and the Y-Axis.After the MA value,I would like to plot in brackets how far away the price is from the MA and this should be dynamically updated as price changes in live market.
So the final output would be something like this 120 (8),where 120 is the MA value and 8 is the distance from price at this instant.
I managed to find some code that will display the distance from the MA in the bottom pane in a histogram. However,I want it display the distance right next to the moving average itself on the chart pane. Any inputs will be appreciated.