Simple Formula

Discussion in 'Trading' started by outsource, Oct 27, 2010.

  1. Here is the simple Heikin Ashi formula(TOS script), that summarize Jack Hershey`s(with all due respect for Jack) method:

    def haclose = (open + high + low + close) / 4;
    rec haopen = compoundValue(1, (haopen[1] + haclose[1]) / 2, (open[1] +
    close[1]) / 2);
    def diff = haclose - haopen;

    plot HA_Down = if diff > 0 and diff[1] >= 0 then 0 else 1;
    plot HA_Up = if diff < 0 and diff[1] <= 0 then 0 else 1;