TJalam

Support Resistance Zones using confluence & Std. Deviation

Overview:
This indicator takes (interactive) input from the user for support and resistance levels and plots important zones considering the other confluence levels in the indicator.

Working of indicator:
This indicator takes six input of Support/resistance level form the user
It has following 32 confluence levels
a.4 Recent positive Divergence levels (DN1, DN2, DN3, DN4)
b.4 recent negative divergence levels (DP1, DP2, DP3, DP4)
d.5 Fibonacci levels (Fib0, Fib236, Fib5, Fib618, Fib786)
e. 7 Pivot levels (P, PR1, PR2, PR3, PS1, PS2, PS3)
f.4 EMAs (E20, E200, E100, E50)
g. ATH, ATL, Weekly High, Weekly Low, two days ago high, two days ago low, previous day high , previous day low

The code checks nearest ‘n’ CONFLUENCE for each level (“Number of confluences to check”) in the indicator, after getting the nearest confluence it calculates the standard deviation of those levels WITH RESPECT TO THE MANUAL INPUT LEVELS.
If the Std. Deviation is less than the input value (“Minimum standard deviation” option) then the zone is displayed on the chart.

How to use:
Add the indicator on the chart select your important support and resistance levels.
Set standard deviation, if the confluence is less than the input standard deviation then you will see those zones on the chart.

You can display all divergence levels; you can display all fib levels. All confluences can be displayed by using the setting of the indicator

How to read the indicator values:
The zone will show all the confluence it has in its zone,
Example:
Table details:
The table shows the maximum and minimum deviation out of all six levels .To see at least one zone you have to make sure that Input value Std. Deviation must be greater than Min Std. Deviation of the table

Sources & refences :
Big thank to www.pinecoders.com/faq_and_code/ and kodify.net/tradingvi...rogramming-articles/

Standard deviation :
www.investopedia.com...tandarddeviation.asp

function to find 'k' closest elements :
www.techiedelight.co...o-given-value-array/

Interactive support resistance :

Divergence for many indicators:

Auto fib level by DGT:
www.tradingview.com/...Fib-Channels-by-DGT/

An enthusiast trader. I code my strategies in pine script.DM me for any Info.
Buy me coffee at:
paypal : tabrejalam786007@gmail.com
BTC : 15zY6PUsrV55UQvcfaSqk5hJexKZAwhpcK
TRC20: TPutH6FDYg6bJFF7xCjesp4n44qrMnizc7
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?