TradingView
dgtrd
28 יוני 2020 16:08

WaveTrend [LazyBear] vX by DGT 

EOS / TetherUSBinance

תיאור

DGT interpreted version of LazyBear's WaveTrend, visualizing on Price Chart

Original Author : LazyBear

Crosses above or below threshold are emphasized with bigger labels
- crosses above threshold : probable short indications with a bigger label and relativly small label for probable long indications
- crosses below threshold : probable long indications with a bigger label and relativly small label for probable short indications
All rest crosses within threshold boundaries with relatively small labels for both long and short probable indications

הערות שחרור

small update : alert condition added

הערות שחרור

update thanks to @sandyrindal suggestions, special thanks to him

added ability to change the signal length
added ability to compare with other symbols, can be symbols that are directly correlated or inversely correlated symbols






Here is the modified code for the ones who enjoy the WaveTrend Oscillator on separate pane

//@version=4 //@author LazyBear, modified by dgtrd study(title="WaveTrend [LazyBear]", shorttitle="WT_LB vX ʙʏ DGT ☼☾") n1 = input(10, "Length : Channel ", inline = "LEN") n2 = input(21, "Average", inline = "LEN") s1 = input(4 , "Signal Length") obLevel1 = input( 60, "Over Bought Level 1", inline = "OB") obLevel2 = input( 53, "Level 2" , inline = "OB") osLevel1 = input(-60, "Over Sold Level 1" , inline = "OS") osLevel2 = input(-53, "Level 2" , inline = "OS") f_getWT(s) => ap = s 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, s1) [wt1, wt2] plot(0 , color=color.gray ) plot(obLevel1, color=color.red ) plot(osLevel1, color=color.green) plot(obLevel2, color=color.red , style=3) plot(osLevel2, color=color.green, style=3) [wt1, wt2] = f_getWT(hlc3) plot(wt1 , color=color.green) plot(wt2 , color=color.red , style=3) plot(wt1-wt2, color=color.blue , style=plot.style_area, transp=80) compare = input(false, "Compare with Symbol", inline = "CPR") symbol = input("CBOE:VIX" , "", type=input.symbol, inline = "CPR") extSrc = security (symbol , timeframe.period, hlc3, barmerge.gaps_off, barmerge.lookahead_on) [wt1x, wt2x] = f_getWT(extSrc) plot(compare ? wt1x : na, color=color.aqua) plot(compare ? wt2x : na, color=color.yellow, style=3) plot(compare ? wt1x-wt2x : na, color=color.olive, style=plot.style_area, transp=80)

הערות שחרור

added a label to display current values of the wavetrend and signal level

הערות שחרור

Update
* overlay wavetrand display addition, better interpretation
* enhanced signal customizations


Similar Indicators
Oscillators Overlay w/ Divergencies/Alerts : Oscillators-Overlay-with-Divergencies-Alerts
Elliott Wave Oscillator Signals : EWO-Signals
תגובות
gestevens67
Many thanks, very interesting. I increased the size of the labels as I felt they were a little lost in the chart.

For the Strong labels: size=size.normal
And the standard labels: size=size.small

I use the LazyBear Wavetrend and find it very useful, so thanks again for your take. I'm just wondering if I can include your strong indicator flags/labels in the original Wavetrend....hmmm
dgtrd
@gestevens67, thank you and thank you for your interes in the study

usually i avoid making the labels big so they do not make the chart too messy expecially when other indicators are included as well

unfortunetly, due to pine limitation you can not add labels to the original one. pine is not supporting lables, lines etc to be ploted on top of the price (main) chart if the study is performed to be displied on different pane. the only possibility available with this version of pine is to be able to change the bar colors. so you may modify the original version but insted labels you may use barcolor to change the colors of the bars. for stong and week ones you may decide to use different colors. hope this helps

regards
bigbang74
Merhaba, indikatörün sadece aşırı alım satım bölgelerindeki güçlü al sat sinyallerini gösterir bir versiyonunu multi timeframe olarak yapmak mümkün müdür? Örneğin günlük grafikte 3 günlük, 1 haftalık vb ya da alt zaman dilimlerinde sinyalleri görmek ? İyi çalışmalar
dgtrd
selam @bigbang74, asagıdaki çlışmada farklı zman dilimleri için RSI yı uyrlamıştım belki bunun için de benzer bir çalışma düşünüle bilir, inceleyip test ediyor olurum. teşelürler tradingview.com/script/kcqc3J2y-HTF-Candles-by-DGT/
bigbang74
@dgtrd, geçen gün tr.tradingview.com/v/KGYEY6k6/ bu indikatörü görünce Bollinger alt bandının altına düştüğünde ya da üst bandının üzerine çıktığına dönüş yerlerini gözlemlemek için nasıl olur diye aklıma gelmişti. Stoch rsi yerine stochastic, rsi, relative momentum index, wavetrend oscillator aklıma geldi.
gsat033
I'm trying to convert the WT into MACD wrapping around BB, after added 2nd BB line, when enabled fill option I get color filled from 0 line to last bar of the signal line (bleeding).

f_getWT(s, n1, n2, s1) =>
// esa = ta.ema(s, n1)
// d = ta.ema(math.abs(s - esa), n1)
// ci = (s - esa) / (0.015 * d)
wt3 = ta.ema(close, 6) - ta.ema(close, 21)
Avg = ta.ema(wt3, 9)
SDev = ta.stdev(wt3, 9)
wt1 = (Avg + 0.8 * SDev)
wt2 = (Avg - 0.8 * SDev)
[wt1, wt2, wt3]

array.push(a_lines, line.new(bar_index[barIndex], oscPlacement == 'Middle' ? priceLowest + (signal2[barIndex] - oscLowest) * (priceHighest - priceLowest) / (oscHighest - oscLowest) :
oscPlacement == 'Top' ? priceHighest * (1 + signal2[barIndex] / oscHighest * hight) : priceLowest * (1 + signal2[barIndex] / oscHighest * hight),
bar_index[barIndex + 1], oscPlacement == 'Middle' ? priceLowest + (signal2[barIndex + 1] - oscLowest) * (priceHighest - priceLowest) / (oscHighest - oscLowest) :
oscPlacement == 'Top' ? priceHighest * (1 + signal2[barIndex + 1] / oscHighest * hight) : priceLowest * (1 + signal2[barIndex + 1] / oscHighest * hight), xloc.bar_index, extend.none, highlight ? wt3[barIndex] < wt2[barIndex] ? color.red : color.red : color.red, line.style_solid, 1)) //oscColor : signal2Color : signal2Color

if highlight
array.push(a_fill, linefill.new(array.get(a_lines, 3 * barIndex + 5), array.get(a_lines, 3 * barIndex + 6), wt3[barIndex] > wt1[barIndex] ? color.new(color.green, 0) : na ))
array.push(a_fill, linefill.new(array.get(a_lines, 3 * barIndex + 4), array.get(a_lines, 3 * barIndex + 5), wt3[barIndex] < wt2[barIndex] ? color.new(color.red, 0) : na ))
dgtrd
hello @gsat033, can you please share the full code and to keep its formating stracture you can use codeshare.io/ and share only the link
gsat033
@dgtrd, codeshare.io/wn1gvP
drawing is fine in 1H or higher. lower TF 15m show the red filled from midline "0"
gsat033
too long
UnknownUnicorn40403838
dude your sooooo intelligent i love this actually a ton thank you very much cheers
עוד