|
Description |
This function determines whether a bar is black. A black bar is a session that closes down. If a bar is black, this function returns TRUE. |
|
|
Formula |
BlackBody(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 test. 0 is the current bar, 1 is the first bar back, etc. |
|
|
Return Value |
TRUE or FALSE |
|
|
Examples |
RealBodyHigh(instrument, targetBar)=begin cLast = GetPrice(instrument, BATE_CLOSE, targetBar, 0) cOpen = GetPrice(instrument, BATE_OPEN, targetBar, 0) retval = cLast if cLast != cOpen then begin if BlackBody(instrument, targetBar) then retval = cOpen end retval end |
|
|
Comments |
NA |
©2008 Aspen Research Group, Ltd. All rights reserved. Terms of Use.