dgtrd

WaveTrend [LazyBear] vX by DGT

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

Note di rilascio: small update : alert condition added
Note di rilascio: 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)
Note di rilascio: added a label to display current values of the wavetrend and signal level
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?

Commenti

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
+1 Rispondi
dgtrd gestevens67
@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
Rispondi
Thanks , it's always your creative way of incorporating ideas in study ..makes them so beautiful and very useful..keep up the good job..from good to better !!!
Rispondi
dgtrd sandyrindal
@sandyrindal, thanks to you and other traders like you who have been contributing to make all those studies better and better.
Rispondi
@dgtrd thank you for your work! It is amazing. Can you tell me if you tested this with Heikin Ashi candles? And if yes, what opinion do you have?
Rispondi
dgtrd wojtek85CH
@wojtek85CH, thank you

No i haven't tested with Heikin Ashi candles and calculation wise the study uses standard candles
Rispondi
Had this script as a strategy for a while and been using it actively in an algo. I have changed mine a bit differently using DCA in oversold/bought areas.
If You plot it into an oscillator and mark oversold/bought areas your exit point could be when the oscillator moves onto neutral territory.

I found out lower timeframes gives way better signals. HTF signals could have swings in them > 10-30% moves
Rispondi
dgtrd RwTrades
hello @RwTrades, as you probaly know the original author is LazyBear of WaveTrend study, and my intention was to keep its logic and only chage the display on top of the price chart.So i did not considered to do further changes but your comment is worth trying and if you had used with succes in algo than even better.

btw, just not to get you wrong, what you meant by DCA exactly

In algo, I was assuming the EWO-S, they provides almost same signals simultaneously

Rispondi
@dgtrd,

Dollar-Cost average which is extremely hard to backtest on tradingview and has to be calculated on each instrument.
Also, my bad - I had lazy bears study as well and changed that one a bit.
Please disregard all the other crosses - had to save some alerts so the same one can be used to long/short exit at the same time.

for example -
Rispondi
Hi how do I access this many thankz
Rispondi