Comment on Code your Technical Analysis strategy

Nithin Kamath commented on 14 Aug 2013, 11:50 AM

Heikin Ashi won’t be 100% accurate because typically in HA, open is typically average of previous HA open and Previous HA close. In algoZ presently you cannot use previous HA open to defite HA open. We have used previous open in a normal chart, so this should be very close to what you are looking for:

Buy:
SET HACLOSE = (OPEN + HIGH + LOW + CLOSE)/ 4
SET HAOPEN = (REF(OPEN, 1) + REF (HACLOSE, 1))/2
HACLOSE > HAOPEN AND REF (HACLOSE, 1) > REF (HAOPEN,1) AND HACLOSE > SMA (CLOSE, 10)

Sell:

SET HACLOSE = (OPEN + HIGH + LOW + CLOSE)/ 4
SET HAOPEN = (REF(OPEN, 1) + REF (HACLOSE, 1))/2
HACLOSE < HAOPEN AND REF (HACLOSE, 1) < REF (HAOPEN,1) AND HACLOSE < SMA (CLOSE, 10)

View the full comment thread »