Percent Rank 0

Posted on 22, January 2014

in Category SID


Description for PercentRank SID 794

The Percent Rank will take 2 parameters; the input data, in which case could be the last closing price of a bar, and the range e.g. 100 days. The indicator will return 100 if the value compared is the highest value of the current range. The indicator wi

Percent Rank/sid The logic for this technical analysis indicator:

#The Percent Rank will take 2 parameters; the input data, in which case could be the last closing price of a bar, and the range e.g. 100 days.

#The indicator will return 100 if the value compared is the highest value of the current range.
#The indicator will return 0 if the value compared is the lowest value of the current range.
#This indicator can return values from 0 to 100. An example of it's usage can be seen in the Connors RSI indicator.

my ($Data,$Periods)=@_;
my $Count = 0; 

for(my $i = 1; $i <= $Periods ; $i++ ){ 
	$Count += $Data > Ref($Data, -$i);
} 
return(100 * $Count / $Periods);

0 Comments

Leave a Message