Page 2039 of 2045

Re: MT4 Indicator requests and ideas

Posted: Tue Apr 16, 2024 5:37 am
by -L-
mrtools wrote: Tue Apr 16, 2024 3:31 am Have you tried this one?
Yes it worked, thanks a lot Mrtools.
btw, what is color red for? the one with "color late" buffer?


Also, was wondering if for MT4 already exist ot its possible to make something like this indicator from tradingview that calculates angles of bollinger bands:

this is the explanation of the indicator:
"This script is used to calculate angle of Bollinger Bands and also setup alerts.

The angle is based on the rules:

- if the previous 2 is 1.1, previous 1 is 1, and the current is 1.1, then the angle should be 90 degrees.
- if the previous 2 is 0.9, previous 1 is 1, and the current is 0.9, then the angle should be 270 degrees

If upper angle is below 90 degrees and close is above the average, it is long signal.
If lower angle is above 270 degrees and close is below the average, it is short signal.

- It is good for catch trend trading.
- Not good for swing trading as the BB changes are very tiny but angles for upper may hit below 90 degrees or angle of lower may be above 270 degrees.


this is the code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © jesselau76 https://jesselau.com


//@version=4
study(shorttitle="BBAngle", title="Angle of Bollinger Bands Alert", overlay=true, resolution="")

// input
length = input(5, minval=1)
src = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50, title="StdDev")
basis = sma(src, length)
dev = mult * stdev(src, length)
upper = basis + dev
lower = basis - dev
offset = input(0, "Offset", type = input.integer, minval = -500, maxval = 500)
plot(basis, "Basis", color=#872323, offset = offset)
p1 = plot(upper, "Upper", color=color.teal, offset = offset)
p2 = plot(lower, "Lower", color=color.teal, offset = offset)
fill(p1, p2, title = "Background", color=#198787, transp=95)

anglealert = input(90.0, minval=0.0, maxval=360, title="Angle Alert")

//calculate angles
//Base on the rules: if 1 change to 2 than change to 1, the angle shoulbe 270 degree. if 2 change to 1 then change to 2, the angle should be 90 degree.

rad2degree = 180 / 3.141592653589793238462643 //pi

ang1 = 180 - rad2degree * atan((upper[0] - upper[1]) / abs(upper[1]-upper[2])) - rad2degree * atan((upper[2] - upper[1]) / abs(upper[1]-upper[2]))
ang2 = 180 - rad2degree * atan((lower[0] - lower[1]) / abs(lower[1]-lower[2])) - rad2degree * atan((lower[2] - lower[1]) / abs(lower[1]-lower[2]))

// Signals
turnGreen = close > basis and ang1 < anglealert

turnRed = close < basis and ang2 > 360 - anglealert



plotshape(turnGreen, style = shape.triangleup, location = location.belowbar, color = color.green, size=size.small)
plotshape(turnRed, style = shape.triangledown, location = location.abovebar, color = color.red, size=size.small)

// Alerts
alertcondition(turnGreen, title= "bbangle_green", message= "{{ticker}} LONG")
alertcondition(turnRed, title= "bbangle_red", message= "{{ticker}} SHORT")

Re: MT4 Indicator requests and ideas

Posted: Tue Apr 16, 2024 9:12 am
by alimpe2000
delp wrote: Mon Apr 15, 2024 5:42 pm Mrtools, can I ask you for one more favor, we need to change the pointer signal as in the picture, add color levels 0.3; 0.5; 0.7
hello mrtools

may You add arrows when lines crosses the other .
Of course it is, but sometimes it doesn't work.
And add some options to it.
thank you

Re: MT4 Indicator requests and ideas

Posted: Tue Apr 16, 2024 10:13 am
by mrtools
It repaints, it's the same as step stochastic, there are some non-repainting versions posted in the forum.

Re: MT4 Indicator requests and ideas

Posted: Tue Apr 16, 2024 10:24 am
by delp
mrtools wrote: Tue Apr 16, 2024 3:26 am Are you aware that that version can repaint.
Mrtools thanks for the answer.
I was thinking of using it as a semaphore, for a complex signal
In the system that I want to make for NINA the main role is not assigned,
it roughly looks like this.
Redrawing is not too scary, I have a fairly reliable filter for it.

Re: MT4 Indicator requests and ideas

Posted: Tue Apr 16, 2024 3:17 pm
by Batman
Batman wrote: Tue Apr 09, 2024 3:10 am Hello, the indicator attached has an issue with digits, I'm not able to apply it on every instrument. Can you please fix it?
Thank you.
No interest to my request??

Re: MT4 Indicator requests and ideas

Posted: Tue Apr 16, 2024 3:34 pm
by josi
TransparentTrader wrote: Tue Apr 16, 2024 3:22 am "Expansion Contraction Indicator" by Brian Latta
Looks interesting enough

Re: MT4 Indicator requests and ideas

Posted: Tue Apr 16, 2024 4:42 pm
by boytoy
Batman wrote: Tue Apr 16, 2024 3:17 pm No interest to my request??
Sorta wasn't an interesting request because no chart image or simple explanation to what this indicator is.... so what benefit will it give to other traders 🤷‍♀️

Re: MT4 Indicator requests and ideas

Posted: Tue Apr 16, 2024 8:03 pm
by alimpe2000
mrtools wrote: Tue Apr 16, 2024 10:13 am It repaints, it's the same as step stochastic, there are some non-repainting versions posted in the forum.
hello mrtools
is this repaint ?
download/file.php?id=3483997

Re: MT4 Indicator requests and ideas

Posted: Wed Apr 17, 2024 3:21 am
by kvak
TransparentTrader wrote: Tue Apr 16, 2024 3:22 am "Expansion Contraction Indicator" by Brian Latta

mrtools, kvak, and the master coders here, I was wondering if it would be possible to have this indicator ported for MT4.

FYI, I'm working on it but it's still not finished….

Re: MT4 Indicator requests and ideas

Posted: Wed Apr 17, 2024 3:33 am
by TransparentTrader
kvak wrote: Wed Apr 17, 2024 3:21 am FYI, I'm working on it but it's still not finished….
Looks good! Can't wait to see the final product.