UpperShadowLen

See Also...

Related Topics

 

 

Description

This function determines the difference between the real body High and the High. This is the upper shadow.

 

 

Formula

UpperShadowLen(instrument, targetBar)=begin

  cHigh = GetPrice(instrument, BATE_HIGH, targetBar, 0)

  rbHigh = RealBodyHigh(instrument, targetBar)

  retval = NONUM

 

  if cHigh != NONUM AND rbHigh != NONUM then begin

    retval = cHigh - rbHigh

  end

  retval

end

 

 

Parameters

instrument

An instrument.

 

targetBar

The index of the bar you want to evaluate. 0 is the current bar, 1 is the first bar back, etc.

 

 

Return Value

The difference between the high and the real body high.

 

 

Examples

UpperShadow(instrument,targetBar)=begin

  bLen = Body(instrument, targetBar)

  rbLen = RealBodyLen(instrument, targetBar)

  nShdw = UpperShadowLen(instrument, targetBar)

  retval = nShdw

  if bLen != abs(rbLen) AND nShdw != 0 then begin

    retval = (nShdw / bLen) * 100

  end

  retval

end

 

 

Comments

NA

 

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