Here are formulas for the Heiken-Ashi OPEN and CLOSE that are more explicit than the formulas you will see elsewhere –
Heiken-Ashi OPEN = ½ x [previous HA open + previous HA close]
Heiken-Ashi CLOSE = ¼ x [actual open + actual high + actual low + actual close]
If you want more on Heiken-Ashi, take a look at this thread –