Page 7 of 8

Re: Wave trend Oscillator coding

Posted: Thu Oct 06, 2022 5:11 am
by mrtools
A new version of Wave trend oscillator posted here Trend indicators

Re: Wave trend Oscillator coding

Posted: Sat Feb 03, 2024 5:37 pm
by mrtools
This is an vhf adaptive wave trend, the adaption seems to work best using a longer channel period.

Re: Wave trend Oscillator coding

Posted: Fri Mar 08, 2024 1:22 am
by andrewstone
This is there a MT5 version of the exact indicator from Tradingveiw/ Lazybear?

Re: Wave trend Oscillator coding

Posted: Fri Mar 08, 2024 7:02 am
by mrtools
andrewstone wrote: Fri Mar 08, 2024 1:22 am This is there a MT5 version of the exact indicator from Tradingveiw/ Lazybear?
Made this one, can you please verify how close to his it is?

Re: Wave trend Oscillator coding

Posted: Fri Mar 08, 2024 9:44 am
by andrewstone
mrtools wrote: Fri Mar 08, 2024 7:02 am Made this one, can you please verify how close to his it is?
It's pretty close but some entries are different from the one on tradingview. Nice job!

Re: Wave trend Oscillator coding

Posted: Fri Mar 08, 2024 10:51 am
by mrtools
andrewstone wrote: Fri Mar 08, 2024 9:44 am It's pretty close but some entries are different from the one on tradingview. Nice job!
If when you get a chance could you please post the code you are using and will see if I can make them the same?

Re: Wave trend Oscillator coding

Posted: Fri Mar 08, 2024 2:42 pm
by RodrigoRT7
mrtools wrote: Fri Mar 08, 2024 10:51 am If when you get a chance could you please post the code you are using and will see if I can make them the same?
Hi Mr Tools, I think the indicator code that the friend above mentions is this one:

//
// @author LazyBear
//
// If you use this code in its original/modified form, do drop me a note.
//
study(title="WaveTrend [LazyBear]", shorttitle="WT_LB")
n1 = input(10, "Channel Length")
n2 = input(21, "Average Length")
obLevel1 = input(60, "Over Bought Level 1")
obLevel2 = input(53, "Over Bought Level 2")
osLevel1 = input(-60, "Over Sold Level 1")
osLevel2 = input(-53, "Over Sold Level 2")

ap = hlc3
esa = ema(ap, n1)
d = ema(abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ema(ci, n2)

wt1 = tci
wt2 = sma(wt1,4)

plot(0, color=gray)
plot(obLevel1, color=red)
plot(osLevel1, color=green)
plot(obLevel2, color=red, style=3)
plot(osLevel2, color=green, style=3)

plot(wt1, color=green)
plot(wt2, color=red, style=3)
plot(wt1-wt2, color=blue, style=area, transp=80)



but I have the impression that I have already seen the Wave Trend Oscillator here.

Re: Wave trend Oscillator coding

Posted: Fri Mar 08, 2024 3:11 pm
by andrewstone
mrtools wrote: Fri Mar 08, 2024 10:51 am If when you get a chance could you please post the code you are using and will see if I can make them the same?

Code: Select all

//
// @author LazyBear
//
// If you use this code in its original/modified form, do drop me a note. 
//
study(title="WaveTrend [LazyBear]", shorttitle="WT_LB")
n1 = input(10, "Channel Length")
n2 = input(21, "Average Length")
obLevel1 = input(60, "Over Bought Level 1")
obLevel2 = input(53, "Over Bought Level 2")
osLevel1 = input(-60, "Over Sold Level 1")
osLevel2 = input(-53, "Over Sold Level 2")
 
ap = hlc3 
esa = ema(ap, n1)
d = ema(abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ema(ci, n2)
 
wt1 = tci
wt2 = sma(wt1,4)

plot(0, color=gray)
plot(obLevel1, color=red)
plot(osLevel1, color=green)
plot(obLevel2, color=red, style=3)
plot(osLevel2, color=green, style=3)

plot(wt1, color=green)
plot(wt2, color=red, style=3)
plot(wt1-wt2, color=blue, style=area, transp=80)

Re: Wave trend Oscillator coding

Posted: Fri Mar 08, 2024 3:15 pm
by andrewstone
mrtools wrote: Fri Mar 08, 2024 10:51 am If when you get a chance could you please post the code you are using and will see if I can make them the same?
If you figure it out. Could you add a colored histogram when only the green line closes above or below the middle level? Thanks in advance.

Re: Wave trend Oscillator coding

Posted: Sat Mar 09, 2024 2:53 am
by mrtools
andrewstone wrote: Fri Mar 08, 2024 3:15 pm If you figure it out. Could you add a colored histogram when only the green line closes above or below the middle level? Thanks in advance.
Went over the code again and code wise they are the same all I can figure out either it's the broker's feed difference or maybe the pine script ma's are figured a little differently, anyway just in case did the histogram mod you requested which IMHO was a nice idea.