WhiteBody

See Also...

Related Topics

 

 

Description

This function determines whether a bar is white. A white bar is a session that closes up. If a bar is white, this function returns TRUE.

 

 

Formula

WhiteBody(instrument, targetBar)=begin

  thisBody = RealBodyLen(instrument, targetBar)

  retval = FALSE

  if thisBody > 0 then retval = TRUE

  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

TRUE or FALSE

 

 

Examples

ShavenBottom(instrument, targetBar)=begin

  retval = FALSE

  cClose = GetPrice($1, BATE_CLOSE, targetBar, 0)

  cLow = GetPrice($1, BATE_LOW, targetBar, 0)

  cHigh = GetPrice($1, BATE_LOW, targetBar, 0)

  cOpen = GetPrice($1, BATE_OPEN, targetBar, 0)

  if BlackBody($1, targetBar) then begin

    if cLow == cClose then retval = TRUE

  end

  if WhiteBody($1, targetBar) then begin

    if cLow == cOpen then retval = TRUE

  end

  retval

end

 

 

Comments

NA

 

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