Re: MT4 Indicator requests and ideas

20821
Roets1 wrote: Wed Dec 04, 2024 2:28 am Hi Guys...I'm new to this and I don't exactly know where to ask this question. I would like to know if it possible to to code a Moving Average that instead of moving below candles when in a up trend and moving above candles in a down trend it should do the opposite, above candles in uptrend and below candles in down trend?

Something like in the picture...but that is obviously just a back shift in the indicator setting. MT4
PS : MA not to recalculate...


Any feedback will be great....thanks
only thing you can do is this :
These users thanked the author ionone for the post:
Roets1
Scalping the Century TimeFrame since 1999


Re: MT4 Indicator requests and ideas

20825
Good morning, gentlemen, how are you? Please, is it possible to change the lines to another color when the line starts to rise, one color for a low level and another color for a higher level? If it is possible to use a level one (weaker) and level two (stronger) alert, that would be perfect! Note: I do not have the Mq4 file. If anyone has it, please post it here.


Re: MT4 Indicator requests and ideas

20828
Kull wrote: Tue Dec 10, 2024 6:52 am Good morning, gentlemen, how are you? Please, is it possible to change the lines to another color when the line starts to rise, one color for a low level and another color for a higher level? If it is possible to use a level one (weaker) and level two (stronger) alert, that would be perfect! Note: I do not have the Mq4 file. If anyone has it, please post it here.
Try here
These users thanked the author mrtools for the post:
vzulaks

Re: MT4 Indicator requests and ideas

20830
Hey! Hope everyone has a great holiday season!

In tradingveiw there is indicator called "Durango - Mr Yen" and I was wondering if anyone could translate it to MT4

Source code is open so here it is:

//@version=6
indicator(title="Durango", shorttitle="Mr.Yen", overlay=true, timeframe="", timeframe_gaps=true)
length = input.int(500, minval=1)
mult_upper1 = input(3.1, "Upper Multiplie1")
mult_upper2 = input(9.1, "Upper Multiplier2")
mult_upper3 = input(18, "Upper Multiplier3")
mult_lower1 = input(3.1, "Lower Multiplie1")
mult_lower2 = input(9.1, "Lower Multiplier2")
mult_lower3 = input(18, "Lower Multiplier3")
src = input(close, title="Source")
exp = input(true, "Use Exponential MA")
BandsStyle = input.string("Range", options = ["Average True Range", "True Range", "Range"], title="Bands Style")
atrlength = input(10, "ATR Length")
esma(source, length)=>
s = ta.sma(source, length)
e = ta.ema(source, length)
exp ? e : s
ma = esma(src, length)
rangema = BandsStyle == "True Range" ? ta.tr(true) : BandsStyle == "Average True Range" ? ta.atr(atrlength) : ta.rma(high - low, length)
upper1 = ma + rangema * mult_upper1
upper2 = ma + rangema * mult_upper2
upper3 = ma + rangema * mult_upper3
lower1 = ma - rangema * mult_lower1
lower2 = ma - rangema * mult_lower2
lower3 = ma - rangema * mult_lower3
u1 = plot(upper1, color=#2962FF, title="Upper1")
u2 = plot(upper2, color=#ebba34, title="Upper2")
u3 = plot(upper3, color=#eb3434, title="Upper3")
plot(ma, color=#34eb6b, title="Basis")
l1 = plot(lower1, color=#2962FF, title="Lower1")
l2 = plot(lower2, color=#ebba34, title="Lower2")
l3 = plot(lower3, color=#eb3434, title="Lower3")
fill(u1, l1, color=color.rgb(33, 150, 243, 95), title="Background")


Who is online

Users browsing this forum: No registered users and 70 guests