TradingView
spacetrader
22 Th12 2020 11:12

[ST] S/R density study v3 

Bitcoin / TetherUSBinance

Mô tả

This algorithm draws supports/resistance levels automatically based on historic candle density at each height. The basic idea is the levels where price is rejected quickly is likely to have fewer candles in the past than the levels above and below. This does not take volume into account. The lookback and number of levels has to be kept low to prevent too many calculations. I haven't looked if there's new pinescript features to let me do this more efficiently yet.

It checks for candle density to decrease once or twice and then increase once or twice before it draws a line at that lowest level. There's an option to draw more lines by only checking for a single decrease and increase.

It likely won't catch all the levels but it seems to get a good amount to help me position stops on other side of S/R or exits on the trade side of S/R.

I've been meaning to share more scripts but keep forgetting. Keeping my scripts free but feel free to like or tip haha.



Bình luận
ttll3745
good
contentment
Hello, dear businessman, I have always thought that [ST] S/R density study v3 is a magical indicator, which has greatly helped me. Thank you for your efforts.
Now there's something bothering me. I want to add it to a version=2. There will be problems with floatmax _ top = na floatmin _ bottom = na. I want to ask you, can you help me turn this magical indicator into version=2? Bless you!
CodyMaki
so cool thanks for creating i really like it it seems to match up really well on price
Rginah1974
Nice job! I think this indicator has some great potential if it could take volume into account as well. This way it will kind of find supply and demand zones. And if it could be based on MTF then it would be amazing.
rhanna
Thanks for sharing!
MasBart
Why it gives "loop too long to execute (>200ms)" error?
spacetrader
@MasBart, if # of lines is too big or lookback # of candles is too big. it basically has to go through each candle (e.g. 1500) for each height (e.g. 321) so like 400k calculations. reducing those numbers is a way to fix it. sometimes it still has an issue maybe from temporary server lag, but just turning it off and on fixes the problems usually.
MasBart
@spacetrader, thanks for the explanation.
Thêm nữa