Bearish

See Also...

Related Topics

 

 

Description

This function uses Linear Regression to determine whether a market is moving downward.

 

 

Formula

Bearish(SERIES, targetbar, LRRange=10, LRType=2)=begin

  retval = FALSE

  cMin = vchart(LR($1, LRRange, LRType)[targetBar - 1])

  pMin = vchart(LR($1, LRRange, LRType)[targetBar])

  if cMin < pMin then retval = TRUE

  retval

end

 

 

Parameters

SERIES

The SERIES directive makes this formula available as a study. You can display this formula in a split chart window.

 

targetBar

The index of the bar you want to evaluate. 0 is the current bar, 1 is the first bar back, etc.

 

LRRange

The number of bars in the Linear Regression test. The default is 10.

 

LRType

The type of Linear Regression. The default is 2, or Continuous Linear Regression. You can also set this parameter to 3, which gives you a Quadratic Linear Regression.

 

 

Return Value

TRUE or FALSE

 

 

Examples

...

  if Bearish($1,targetBar,LRRange,LRType)==TRUE then begin

...

 

 

Comments

NA

 

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