# Support and Resistance (Barry)

5573 5
Support and Resistance levels for Binary Options.
Code Originally written by Matthew Spancer. I have just updated it to make it work like the one found for Meta trader 4.

The red, green and blue line is 12 period Variable moving average written by LazyBear.
```//@version=2
// Bill Williams Fractal Template
//Initially Coded By: Matthew Spencer (Fractals)
//Updated by Kunal Patel - Based on Support and Resistance (Barry)

// If you like this script or use it's code in one of yours, please donate to Matthew Spancer. I did it for free.
// PayPal: ma.spencer@gmx.com Bitcoin: 1foxypuyuoNp5n1LNCCCCmjZ4RAXntQ8X

study("Support and Resistance (Barry)",shorttitle="Kay_SR Levels", overlay=true)

// Define "n" as the number of periods and keep a minimum value of 2 for error handling.
n = input(title="Periods", defval=2, minval=2, type=integer)

dnFractal = (high[n-2] < high[n]) and (high[n-1] < high[n]) and (high[n+1] < high[n]) and (high[n+2] < high[n]) ? high : fixnan(dnFractal[1])
upFractal = (low[n-2] > low[n]) and (low[n-1] > low[n]) and (low[n+1] > low[n]) and (low[n+2] > low[n]) ? low : fixnan(upFractal[1])

// Plot the fractals as shapes on the chart.
plotshape(dnFractal, title= "D", style=shape.circle, location=location.absolute, color=blue, transp=10) // Down Arrow above candles
plotshape(upFractal, title="U", style=shape.circle, location=location.absolute, color=orange, transp=10)  // Up Arrow below candles```
thx so much man, it is really cool
Updated script is here. Much better in finding support and resistance levels. Can be used in breakout trading.
@trading.kay27, Thanks, I have been looking for one that worked like MT4. Much appreciated.
Thank you!!!
bloem60
Hope its helps you..!!
English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt

한국어

Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter