Re: Wave trend Oscillator coding
61A new version of Wave trend oscillator posted here Trend indicators
- These users thanked the author mrtools for the post:
- Chickenspicy
Made this one, can you please verify how close to his it is?andrewstone wrote: Fri Mar 08, 2024 1:22 am This is there a MT5 version of the exact indicator from Tradingveiw/ Lazybear?
It's pretty close but some entries are different from the one on tradingview. Nice job!mrtools wrote: Fri Mar 08, 2024 7:02 am Made this one, can you please verify how close to his it is?
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?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!
Hi Mr Tools, I think the indicator code that the friend above mentions is this one: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?
//
// @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)
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)
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.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?
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.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.