## Coding Help

Moderators: xard777, mrtools, Banzai

### 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
mrtools wrote:
Tue Feb 09, 2021 1:44 pm

Try, should be ok, but not able to verify, about the other it's a zigzag and recalculates so you will get a lot of signals until it changes.
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
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
From the formula it just looks like an RSI of Force index with Bollinger bands applied. But I could be wrong.

### Re: Coding Help

#1224
Darks wrote:
Sat Feb 27, 2021 4:06 am
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.
yes it's based on rsi...but I am not a coder, that's why I need help

thanks

#1225

### Re: Coding Help

#1226
rider2027 wrote:
Sat Feb 27, 2021 7:33 am
Is this what you are looking for?
RSI of Force.mq4

### 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
Symbol changer.mq4

### Re: Coding Help

#1228
Darks wrote:
Sat Feb 27, 2021 3:14 pm
rider2027 wrote:
Sat Feb 27, 2021 7:33 am
Is this what you are looking for?
Thanks a lot
Much apperciated
God bless you

### Re: Coding Help

#1229
Sun Mar 05, 2017 6:02 pm
Sharingan9 wrote:Hi Mladen. Congrats on the new site. It looks nice.  I gave you this indicator to code for me a year or 2 ago asking you to show me the average true range of a defined period of candles and the range of the current candle and I asked you to add the ratio of current range/ATR. May you please change this so that instead of the current candle range, the previous candle range is shown and the information that the indicator provides is based on the weekly chart so that on every chart regardless of the timeframe I am able to see: the ATR of the weekly chart over a period of time that I can select, the range of the previous week candle(right before the current candle) and finally the ratio of Previous week candle range/ATR of weekly chart. I hope this is clear. I have the indicators that you worked on. 1 of them is an ex4 file that you made and the other is a mq4 file. Thanks in advance so much Mladen

Try out this version
Thanks for sharing , could you please convert it to mt5?

### 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..
Brooky_Rsi_Ichimoku.mq4
Ichi MA Indicator.tpl

1. ### Similar Topics

1. #### Coding help please

1 Replies 529 Views

by Deez, Thu Nov 05, 2020 6:54 pm in Coding Help

1 Replies
529 Views
2. #### CODING HELP

0 Replies 1099 Views

by slyfer91, Sun Apr 25, 2021 6:43 am in Coding Help

0 Replies
1099 Views
3. #### Paid Coding

1 Replies 670 Views

by mecca, Sun Sep 27, 2020 9:31 am in Express Coding & Commercial Services

1 Replies
670 Views