Re: Absolute Momentum - Coding Help

1221
Hi All,

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


Re: Coding Help

1222
mrtools wrote: Tue Feb 09, 2021 1:52 pm
Dear Mr.tools


is it possible for you to make an mt4 indicator as per below info? thanks in advance

====================================================================================

Force Index(1) = {Close (current period) – Close (prior period)} x Volume =gain +/- I call it FI out value
FI (20) = 20 - period EMA of Force Index(1)
--------------------------------
Twin Evil indicator=first line blue color
100− [ 1+ −((Previous Average Loss FI ×20) + Current Loss)
(Previous Average Gain FI ×20) + Current Gain /100 ] = output value (0-100)
Second line Red color on previous output data
100− [ 1+ −((Previous Average Loss ×20) + Current Loss)
(Previous Average Gain FI ×20) + Current Gain /100 ] = output value (0-100)

Adding standard deviation calculation
BOLU=MA(TP,n)+m∗σ[TP,n]
BOLD=MA(TP,n)−m∗σ[TP,n]
where:
BOLU=Upper Bollinger Band
BOLD=Lower Bollinger Band
MA=Moving average
TP (typical price)=(High+Low+Close)÷3
n=Number of period (here put 21 then repeat the process with 40 ) in smoothing period (typically 20)
m=Number of standard deviations (typically 1.5)
σ[TP,n]=Standard Deviation over last n periods of TP

Re: Coding Help

1223
rider2027 wrote: Sat Feb 27, 2021 3:41 am

Dear Mr.tools


is it possible for you to make an mt4 indicator as per below info? thanks in advance

====================================================================================

Force Index(1) = {Close (current period) – Close (prior period)} x Volume =gain +/- I call it FI out value
FI (20) = 20 - period EMA of Force Index(1)
--------------------------------
Twin Evil indicator=first line blue color
100− [ 1+ −((Previous Average Loss FI ×20) + Current Loss)
(Previous Average Gain FI ×20) + Current Gain /100 ] = output value (0-100)
Second line Red color on previous output data
100− [ 1+ −((Previous Average Loss ×20) + Current Loss)
(Previous Average Gain FI ×20) + Current Gain /100 ] = output value (0-100)

Adding standard deviation calculation
BOLU=MA(TP,n)+m∗σ[TP,n]
BOLD=MA(TP,n)−m∗σ[TP,n]
where:
BOLU=Upper Bollinger Band
BOLD=Lower Bollinger Band
MA=Moving average
TP (typical price)=(High+Low+Close)÷3
n=Number of period (here put 21 then repeat the process with 40 ) in smoothing period (typically 20)
m=Number of standard deviations (typically 1.5)
σ[TP,n]=Standard Deviation over last n periods of TP
From the formula it just looks like an RSI of Force index with Bollinger bands applied. But I could be wrong.


Re: Coding Help

1227
Darks wrote: Sat Feb 27, 2021 3:14 pm Is this what you are looking for?
Maybe this is too boring for you:
I'll ask anyway: could you rewrite the SymbolChanger in such a way that all symbols are displayed
input: vertically/horizontally
input: where on the screen
And most importantly: all open (cascading) windows (i. e. different timeframes) on the screen change to the same currency when I change currency on the window that displays SymbolChanger

Re: Coding Help

1230
Dear Coders,

Request your help to please add Two EMAs to attached indicator. The ultimate outcome will be like attached image . I would like to use the Indicator in EA i.e. open trades when three lines crossover... Additionally (not mandatory), if this could be converted into a MTF.

The attached image shows Two EMAs dragged into the sub-window over customer indicator. Would request the EMAs to be embedded into the Indicator.

Really appreciate your help.

God Bless..


Who is online

Users browsing this forum: No registered users and 21 guests