HACO

Modified on 2019/02/28 06:03 by Eugene — Categorized as: TASCIndicators

Syntax


public HACO(Bars bars, int avg, int setuptimeout, string description)
public static HACO Series (Bars bars, int avg, int setuptimeout)

Parameter Description

avgTriple exponential moving average (TEMA) lookback period
setuptimeoutA timeout used to keep the bars as green/red as possible during an uptrend/downtrend with little delay at turning points, eliminating all single-day reactions by extending a previous green/red candle by at least one more bar.

Description

HACO (short for Heikin-Ashi Candlestick Oscillator) is an oscillator version of the Heikin-Ashi candlesticks, tweaked according to a method presented in the December, 2008 issue of Stocks & Commodities magazine by Sylvain Vervoort. It has either a value of zero for a red candle or "1" for a green candle. This visual tool, although not designed to be traded in automatic way, utilizes the trademark consistency of the Heikin-Ashi candles to show as many black candles in a downtrend as possible, and respectively as many white candles in an uptrend.

NOTE! Breaking change to HACO in v2019.03 of TASCIndicators: the formula has been modified according to author's followup.

WAS:
keep1:=Alert(haC>=haOpen,2);
IS:
keep1:=Alert(haC>=haOpen,2) OR If(C>=haC,1, If(H>Ref(H,-1) OR L>Ref(L,-1),1,0));


Refer to his website for the complete improvement note.

Example

Refer to code in the original TASC Traders' Tips here.