Registered User Joined: 10/7/2004 Posts: 1,080

Bruce, I see in an earlier post you've said:
So if you have color based on Net Change then a Condition Formula for a green HeikenAshi candle would be:
O + H + L + C > O1 + H1 + L1 + C1
And a Condition Formula for a red HeikenAshi candle would be:
O + H + L + C <= O1 + H1 + L1 + C1
However, in testing these two conditions, I find that both the green and the red HeikenAshi Candles with your formulas may or may not have a shadow above or below.
My understanding of HeikenAshi signal candles is that Bullish HeikenAshi Signal Candles have no lower shadows. And, Bearish HeikenAshi Signal Candles have no upper shadows.
Can these formulas be modified to reflect the above signals?
Also, can you please create a HeikenAshi formula for candles that have both lower and upper shadows (Dojis, NearDojis', or Spinning Toptype candles.)?

Worden Trainer
Joined: 10/7/2004 Posts: 63,442

The formulas don't test for shadows, so there is no reason the formulas would correspond with shadows. The formulas test if the candle is red or green when color based on is set to Net Change (which is exactly what the quoted description of the formula indicates).
A condition formula for an HA candle with no upper shadow would be the following (you may want to get rid of the OR H = L at the end if you are just interested in if the candle is "bearish").
XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 >= 4 * H OR H = L
A condition formula for an HA candle with no lower shadow would be the following (you may want to get rid of the OR H = L at the end if you are just interested in if the candle is "bulllish").
XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 <= 4 * L OR H = L
A condition formula for an HA candle with both an upper and lower shadow would be the following.
ABS((XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 2  H  L) < H  L
And just for completeness, a condition formula for an HA candle without any shadows would be the following.
H = L
Bruce Personal Criteria Formulas TC2000 Support Articles

Registered User Joined: 6/26/2011 Posts: 128

Hi Bruce: I would like a PCF that is +2 if:
heiken ashi low of current bar is above hull 21 of heiken ashi closes
heiken ashi high of current bar is higher than heiken ashi highs of previous two bars
0 if only one condition is met and
2 if both conditions are not met.

Worden Trainer
Joined: 10/7/2004 Posts: 63,442

Please try the following indicator formula.
SGN(XAVG(O1 + H1 + L1 + C1, 3)  HAVG(O + H + L + C, 21)) + SGN(GREATEST(4 * H, XAVG(O1 + H1 + L1 + C1, 3))  MAX(GREATEST(4 * H1, XAVG(O2 + H2 + L2 + C2, 3)), 2))
Bruce Personal Criteria Formulas TC2000 Support Articles

Registered User Joined: 6/26/2011 Posts: 128

Thank you. Great Job. But I think there is a missing ")" at the end.
QUOTE (Bruce_L) Please try the following indicator formula.
SGN(XAVG(O1 + H1 + L1 + C1, 3)  HAVG(O + H + L + C, 21)) + SGN(GREATEST(4 * H, XAVG(O1 + H1 + L1 + C1, 3))  MAX(GREATEST(4 * H1, XAVG(O2 + H2 + L2 + C2, 3)), 2))

Worden Trainer
Joined: 10/7/2004 Posts: 63,442

Thanks. Copy and paste can be both a blessing and a curse. Still probably better with fewer mistakes than trying to manually type everything out though.
Bruce Personal Criteria Formulas TC2000 Support Articles
