TradingView
LonesomeTheBlue
18 mar 2020 13:51

Trend Following Moving Averages 

Bitcoin / U.S. dollarBitstamp

Beskrivning

While analysing a chart, one of the biggest problem is to see if there is trend or not. While thinking about it, I found the idea to analyse moving averages in channel and their momentum according to channel width. I already published it as Trend Following Bar as you see at bottom of the chart.


How it Works?

On each bar it creates a channel by highest/lowest point of a MA. highest point is upper line and lowest point is lower line of the MA channel,
It gets highest and lowest point of last 300 bars, (say Price Channel )
If the width of MA channel is greater than certain rate of price channel then it decides there is trend
After it decided there is trend, it calculates the rate between channel and MA. Bigger result means stronger trend.
According to rate of MA channel and the price channel , MA Line becomes lighter/darker. so when you look at the MA Line's color you can see the trend strength.

Some details about my idea:



Options:

You can choose following MA types as source: EMA, SMA , RMA, WMA , VWMA
"Period to Check Trend" is the period to create MA channel. Bigger period cause more sensitivity.
"Trend Channel Rate %" is rate of price channel . Price channel created by using highest/lowest of last 300 bars. I did this to make the script works on all time frames correctly.
"Use Linear Regression" is used to get rid of noise. it may cause 1-2 bars latency.

Trend Following Bar script:
tradingview.com/script/UGgNcgNi-Trend-Following-Bar/


All comments are welcome!.


Enjoy!

Versionsinformation

updated.
Kommentarer
PineCoders
LonesomeTheBlue
@PineCoders, Thank you!
aladin100
Hi

I like very much 😊😉😉 your idea.
How can i add the script in order to see it?

Thank u ❤️
LonesomeTheBlue
@aladin100, hi, click "Add to Favorite Scripts" and after opening chart search it in the Indicators windows (public library)
nobodyxxx
Hi.. I admire your work alot... There is 1 small issue:
ıf you look at it, your indicator is in the middle but comes with no data. I hide and then unhide then it comes as normal... fyi...
LonesomeTheBlue
@nobodyxxx, Hi, interesting, same all the time or once you got this?
nobodyxxx
@LonesomeTheBlue, due to the calculation I guess it takes time to adjust... however not a big issue :) take care & stay healthy
yajdc0000
@nobodyxxx, Hi what indicator are you using below the chart? with the green and red lines
TTTradr
I'm adding this to my chart. One suggestion would be to make an easier way to change opacity and color of the lines. Each line has different sections. It took me like an hour to adjust the opacity. I'd tweak it more but I'm not ready for a other hour of clicking yet.
Exar_Kun
This gets a definite like from me!

Thank you for making it public!
Mer