DojiStar

See Also...

Related Topics

 

 

Description

A Doji is a candlestick with identical (or nearly identical) open and close prices.

 

 

Formula

DojiStar(INPUT, CentsDifference=.02)=begin

  retval = NONUM

  targetBar = 0

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

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

  pDiff = abs(pOpen - pClose)

  if pDiff <= CentsDifference then begin

  retval = '2'|clr_white|above|vertical|ftiny|arrow

  if StarForm($1, targetBar) then retval = 'S'|clr_white|above|vertical|ftiny|arrow

  end

  retval

end

 

 

Parameters

INPUT

The INPUT directive makes this formula available as a Formula Overlay. INPUT refers to the instrument in the chart.

 

CentsDifference

Since stocks and many other instruments rarely have identical openings and closings, the CentsDifference parameter provides a way to include candlesticks that are nearly satisfactory.  The default is .02.

 

 

Return Value

The string plot for DojiStar is the abbreviation "S" rendered in white and plotted above the candlestick.

 

 

Examples

 

 

Comments

This overlay uses a dollar amount (typically some fraction of a dollar) to determine whether a candlestick is a Doji. If the difference between the Open and Close prices is less than the dollar amount given by this parameter, the candlestick is Doji. See Doji  for another method of making this determination.

 

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