Heikin Ashi Coding Exit strategy

Hi, I have found the Buy and Sell postions of Heikin Ashi online. I am looking for an Exit Strategy. Please Help.

Buy Position Exit - Heikin Ashi Current Bar CLOSE Lower than Previous Bar OPEN.

Sell Postion Exit - Heikin Ashi Current Bar CLOSE Higher than Previous Bar OPEN.

please check the below link for heiken ashi

http://tradingqna.com/20163/heiking-ashi-candle-code?show=20163#q20163

BUY
SET HC = (OPEN+HIGH+LOW+CLOSE)/4

SET HO = (REF(OPEN,1) + REF(CLOSE,1))/2

SET HH = MAXOF(HIGH, MAXOF(HC, HO))

SET HW = MINOF(LOW, HO, HC)

HO = HW

SELL

SET HC = (OPEN+HIGH+LOW+CLOSE)/4

SET HO = (REF(OPEN,1) + REF(CLOSE,1))/2

SET HH = MAXOF(HIGH, MAXOF(HC, HO))

SET HW = MINOF(LOW, HO, HC)

HH = HO