Here is heiken ashi indicator with stepMA for test....
There is some methods to calculate "step" function. (atr/stdev, manually adjusted).
EDIT: I found bug in alerts,I forget to rewrite MT4 logic 1/-1 for logic in MT5 version. And alerts not working properly.