RealBodyMidPoint

See Also...

Related Topics

 

 

Description

This function identifies the price at the center of the real body.

 

 

Formula

RealBodyMidPoint(instrument, targetBar)=begin

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

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

  nvSub = Abs(Diff(pOpen, pClose)) / 2

  if BlackBody($1, targetBar) == TRUE then retval = pClose + nvSub else retval = pClose - nvSub

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 mid-point of the real body.

 

 

Examples

...

  pMid = RealBodyMidPoint($1, (targetBar+1))

...

 

 

Comments

NA

 

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