After reading the article Absolute Momentum: A Simple Rule-Based Strategy and Universal Trend-Following Overlay posted in this forum here app.php/attach/file/3309284 I searched for an MT4 Absolute Momentum indicator online and I was surprised that I only found one Absolute Momentum indicator but I can't post the link here since that's not allowed but here is the code. Can anyone here convert this Absolute Momentum code below to MT4 code so we can all test Absolute Momentum in our trading strategies to see if it gives us an edge? Thanks.
Code: Select all
study("Absolute Momentum")
p = input(12,minval=1,title = "LookBack Period")
sym = input(title="Symbol", type=symbol, defval="SHY")
sm = input(1,minval=1,title = "Smooth Period")
rc = roc(close,p)
bil = security(sym,"M",close)
bilr = roc(bil,p)
rcdm = rc-bilr
srcdm = sma(rcdm,sm)
line = 0
plot(rcdm,color= red,title= "Absolute Momentum" )
plot(srcdm,color = blue,title="Smooth Abs Momentum")
plot(line , color = gray,title="Zero Line")
barcolor(rcdm > 0 ? lime:red)