indicator · on price · open source
Double Smoothed EMA
Running…
Loading chart…
About
Double Smoothed EMA (DSEMA) is two EMAs back-to-back with a lag-cancelling combination. Tighter than a plain EMA at the same length, simpler than DEMA/TEMA.
- Use as the fast leg in a crossover with a slower MA.
- Raise N to slow the line, lower it for tighter turns.
- Pairs well with an ADX > 25 filter.
Source code
//@version=5
indicator("Double Smoothed EMA", overlay=true)
len = input.int(20, "Length", minval=1, maxval=500)
src = input.source("close", "Source")
e1 = ta.ema(src, len)
e2 = ta.ema(e1, len)
dsema = 2.0 * e1 - e2
p_DSEMA = plot(dsema, "DSEMA", color=color.red, linewidth=2)
alertcondition(ta.crossover(close, dsema), "Price crosses above DSEMA", "Price crossed above the DSEMA")
alertcondition(ta.crossunder(close, dsema), "Price crosses below DSEMA", "Price crossed below the DSEMA")
No comments yet.
Sign in to comment.