RealBody

See Also...

Related Topics

 

 

Description

This function identifies the real body as a percentage of a bar's range.

 

 

Formula

RealBody(instrument, targetBar)=begin

  retval = NONUM

  rbLen = RealBodyLen(instrument, targetBar)

  bLen = Body(instrument, targetBar)

  if bLen == abs(rbLen) then retval = 0

  if bLen != abs(rbLen) then begin

    retval = (abs(rbLen) / bLen) * 100

  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 real body as a percentage of the range.

 

 

Examples

LowerShadowLen(instrument, targetBar)=begin

  rBody = RealBody(instrument, targetBar)

  cLow = GetPrice(instrument, BATE_LOW, targetBar, 0)

  cOpen = GetPrice(instrument, BATE_OPEN, targetBar, 0)

  cClose = GetPrice(instrument, BATE_CLOSE, targetBar, 0)

  retval = cClose - cLow

  if rBody > 0 then retval = cOpen - cLow

  retval

end

 

 

Comments

NA

 

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