

Int StartBar( numericsimple ), // 0 = Current bar, 1 = one bar ago, 2 = two bars ago etc

Value1 = _Program68LinearRegression( StartBar, NumBars, Price, LineColor, ContinuationColor, TLWeight ) The function ( _Program68LinearRegression) is called as follows: These lines are continued for an additional ten bars. We also call it using the Heikin-Ashi low of the bar and it draws a linear regression line. In this program we call the function for the Heikin-Ashi high of the bar and it draws a linear regression line. 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. Search for and display the following candlestick patterns:.Look for and displays areas of consolidation (that may precede price expansion).Calculate and display the Heikin-Ashi candlesticks (using an indicator and plot statements).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
