Attachments forums

List of attachments posted on this forum.


All files on forums: 163059

Re: Absolute Momentum - TradingView to MT4 Indicators

global, Mon Mar 01, 2021 8:41 pm

Hi Banzai,

I know there are many momentum indicators on this forum but this one seems to be a bit different, even different to the Momentum Normalized v1.mq4 indicator that is available here so I hope that you can spare the time to convert this one from its tradingview code.

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 and it was on tradingview so here is the code below. Please, could you convert this Absolute Momentum code to MT4 code so we can all test this in our trading strategies to see if it gives us an edge? Thanks.

Code: Select all

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)
And here is what the indicator looks like:
All files in topic