RealBodyLen

See Also...

Related Topics

 

 

Description

This function identifies the difference of the last and the open. This difference is the length of the real body.

 

 

Formula

RealBodyLen(instrument, targetBar)=begin

  retval = NONUM

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

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

  if cLast != NONUM AND cOpen != NONUM then begin

    retval = cLast - cOpen

  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 length.

 

 

Examples

BlackBody(instrument, targetBar)=begin

  thisBody = RealBodyLen(instrument, targetBar)

  retval = FALSE

  if thisBody < 0 then retval = TRUE

  retval

end

 

 

Comments

NA

 

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