If found by the calling program, the function calculates the linear regression for input values. The function included with program 68 is used to display areas of consolidation. The white dotted lines are drawn to extend the red lines.
_Program68LinearRegression function The red lines show the area where consolidation may be occurring. If the value calculated is less that the user input value: MaxConsolIndex the _Program68LinearRegression function is called. In the program the Heikin-Ashi values are used. Price consolidation is measured by calculating True Price Channel / Average True Range. Program 68 consists of a TradeStation EasyLanguage indicator (_Program 68 Markplex Heikin Ashi) and a function (_Program68LinearRegression) designed for use with charts that: Heikin-Ashi Low = Minlist( L, Heikin-Ashi Open, Heikin-Ashi Close ) Heikin-Ashi High = Maxlist( H, Heikin-Ashi Open, Heikin-Ashi Close )
Heikin-Ashi Open = ( Heikin-Ashi Open one bar ago + Heikin-Ashi Close one bar ago ) / 2
Heikin-Ashi Close = ( O + H + L + C ) / 4