dime

% Median v1

This indicator shows the percentage amount the price is above or below the moving median value of the period.

This indicator is best used along with the moving median (set to the same period).

Based on the moving median developed with 4x4good

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?
//  % median v1.0
//  Created by dime &  4X4good - 09/04/2016
//  This indicator shows the % that the price is above or below the moving median value of the period.
//  

study(title="% median", shorttitle="% median")
length1 = input(50, minval=1,title="median length")

median = percentile_nearest_rank (close,length1,50)

PCTmedian = (close - median)/median *100
plot(PCTmedian, color=lime, linewidth=2, title="% median")

hline(0, title="Zero Line")