indicator · on price · open source
End-Point Moving Average
Running…
Loading chart…
About
End-Point Moving Average (EPMA) projects a least-squares regression line forward by N-1 bars to the current bar. The line is leading relative to price during trends, so it acts as a smooth future-line reference.
- Use as a dynamic S/R level on the current bar.
- Raise N for a more anchored projection; lower it for a closer fit.
- Combine with a slower MA to trade EPMA re-runs.
Source code
//@version=5
indicator("End-Point Moving Average", overlay=true)
len = input.int(20, "Length", minval=2, maxval=500)
src = input.source("close", "Source")
epma = ta.linreg(src, len, len - 1)
p_EPMA = plot(epma, "EPMA", color=color.lime, linewidth=2)
alertcondition(ta.crossover(close, epma), "Price crosses above EPMA", "Price crossed above the End-Point MA")
alertcondition(ta.crossunder(close, epma), "Price crosses below EPMA", "Price crossed below the End-Point MA")
No comments yet.
Sign in to comment.