GetRS

See Also...

Related Topics

 

 

Description

This formula calculates the relative strength of a value.

 

 

Formula

GetRS(RS)=begin

  retval = 100 - ( 100 / ( 1 + RS ) )

end

 

 

Parameters

RS

A value.

 

 

Return Value

A relative strength value.

 

 

Examples

CutlersRSI(SERIES, Periods=14, Bate=6)=begin

  SumUp = 0

  SumDown = 0

  RS = 1

  currentPrice = NONUM

  previousPrice = NONUM

  difference = 0

 

  for i = -1 to (Periods - 2) begin

    currentPrice = GetPrice($1, Bate, i, Periods)

    previousPrice = GetPrice($1, Bate, (i + 1), Periods)

    difference = currentPrice - previousPrice

    if difference > 0 then SumUp = SumUp + difference

    if difference < 0 then SumDown = SumDown + abs(difference)

  end

  if SumDown > 0 then RS = SumUp / SumDown

  retval = GetRS(RS)

  retval

end

 

 

Comments

NA

 

©2008 Aspen Research Group, Ltd. All rights reserved. Terms of Use.