Naeem,
The code I posted works on MultiChart.
The problem is that ExpValue(2*Cycle) is too high. I limited AbsValue(Cycle) to 100. Try to limit AbsValue(Cycle) to 10:
Inputs: Price((H+L)/2),
alpha(.07);
Vars: Smooth(0),
Cycle(0),
ICycle(0);
Smooth = (Price + 2*Price[1] + 2*Price[2]...