BodyBottomQuarter

See Also...

Related Topics

 

 

Description

This function returns the price level that indicates the top of the bottom quarter of a bar's range (the red line in the image below):

 

 

 

Formula

BodyBottomQuarter(instrument, targetBar)=begin

  pHigh = GetPrice($1, BATE_HIGH, targetBar, 0)

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

  nvSub = Abs(Diff(pHigh, pLow)) / 4

  retval = pLow + 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

A price that represents the bottom quarter of a bar's range.

 

 

Examples

GravestoneDoji(INPUT,Stringency=3,DojiPercentage=10)=begin

  retval = NONUM

  targetBar = 0

  bQtr = BodyBottomQuarter($1, targetBar)

  rbHigh = RealBodyHigh($1, targetBar)

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

  if DojiForm($1, targetBar, DojiPercentage) then begin

    if rbHigh < bQtr then begin

      if Stringency >= 3 then retval =
 '3'|clr_gray|below|vertical|ftiny|arrow

      if StarForm($1, targetBar) then begin

        if Stringency >= 2 then retval =
   '2'|clr_gray|below|vertical|ftiny|arrow

        if rbHigh == pLow then retval =
   'GRAVESTONE'|clr_gray|below|vertical|ftiny|arrow

      end

    end

  end

  retval

end

 

 

Comments

NA

 

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