How do I amend the EMA indicator to make it reset its calculation at the start of each session?
Currently if there is a gap up / gap down, the EMA becomes distorted because it is still using values from the previous day.
The EMA indicator now has only 1 line.
Value.Set(CurrentBar == 0 ? Input[0] : Input[0] * (2.0 / (1 + Period)) + (1 - (2.0 / (1 + Period))) * Value[1]);
Comment