The standard EMA formula is EMA= Close - EMA(previous day)} x multiplier + EMA(previous day)
Multiplier = (2/(Period + 1))
TimEMA makes the 2 in the multiplier calculation an input parameter. The larger that number is, the quicker the response.
Multiplier = (2/(Period + 1))
TimEMA makes the 2 in the multiplier calculation an input parameter. The larger that number is, the quicker the response.
study(title="TimEMA", shorttitle="TimEMA", overlay=true) len = input(9, minval=1, title="Length") num = input(2.0, minval=0.1, title="Numerator") src = input(close, title="Source") //out = ema(src, len) //EMA: {Close - EMA(previous day)} x multiplier + EMA(previous day). mult = (num / (len + 1)) //out = out = iff(na(out[1]),close,((close - out[1])*mult) + out[1]) plot(out, title="EMA", color=red, linewidth=2)