HighPreviousCloseDiff

See Also...

Related Topics

 

 

Description

This formula identifies the difference between the current high and previous close, an essential determination in calculating Wilder's True Range.

 

 

Formula

HighPreviousCloseDiff(instrument)=begin

   retval = NONUM

   val2 = VChart(instrument.last[0])

   if instrument.high != NONUM then begin

      val1 = instrument.high

      if val2 != NONUM then retval = Diff(val1, val2)

   end

   retval

end

 

 

Parameters

instrument

The instrument argument specifies which instrument to evaluate.

 

 

Return Value

The difference between the high and the previous close.

 

 

Examples

TrueRange(instrument)=if(HighLowDiff(instrument) > HighPreviousCloseDiff(instrument), if(HighLowDiff(instrument) > CloseLowDiff(instrument), HighLowDiff(instrument), CloseLowDiff(instrument)), if(HighPreviousCloseDiff(instrument) > CloseLowDiff(instrument), HighPreviousCloseDiff(instrument), CloseLowDiff(instrument)))

 

 

Comments

NA

 

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