TradingView
tugskh9w
15. Dez. 2021 07:16

Triple-Angle Trend Signal 

Bitcoin / TetherUSBinance

Beschreibung

An enhancement and iteration of lmatl's "angle bar colors [LM]" to enable multiple angle bars (up to 3) each with customisable price sources, angle periods, thresholds of degrees, line thicknesses and colours. Full history is displayed of when the selected angle bars have all been within higher degrees (green background) and lower degrees (red background).
This indicator is useful when it is customised to suit individual charts where it can specify conditions to find entries on uptrends and exits on downtrends.
Kommentare
satishsnc
Hi Mdeacey,

below is the correct formula
ang= rad2degree * atan((src[0]-open[period])/lock price to bar ratio)

in my case i use angle between current candle close and open of last 6th candle, and my lock price to bar ratio is 0.00045, based on this, below is my formula

ang= rad2degree * atan((src[0]-open[period])/0.00045)

*note-you can find the lock price to bar ratio at the top right setting button>chart settings>scales>Lock price to bar ratio
nguyenthuylien1804
@satishsnc, Thank you for your contribution. It is very helpful.
If I don't lock the price bar to the bar ratio, so what formula should I use?
satishsnc
Hi Mdeacey

thanks for your program it helps greatly, but would like to correct the formula to show up the correct angle
Incorrect formula
ang = rad2degree * atan((src[0] - src[period]) / atr(period))

correct formula
ang = rad2degree * atan((src[0] - src[period]) / lock price to bar ratio * (period-1))

thanks
satish
mikemiller2021
@satishsnc, Thanks Satish for this error notice, I also see that mistake in angle calculation. I have tried to replace incorrect formula to one which you provided, but script stoped working. Would you be kind to share corrected script. thanks in advance.
Indicator-Jones
What I was looking for 😊

It would be perfect if the highest price (on the displayed chart) would automatically be selected, instead of a fixed number of candles.
But this is very helpful, thank you 🙏
Mehr