ZenAndTheArtOfTrading

S&R Zone Signals

This indicator allows you to specify price zones in which to detect basic candlestick patterns.

In the example above, I have specified the most immediate support and resistance zones on GBP/USD and set the script to detect engulfing candles. If a bearish engulfing candle occurs within the resistance zone a signal will be generated; likewise for bullish engulfing candles within the support zone .

The purpose of this indicator is to generate trading alerts when these patterns occur in order to reduce the screen-time required to monitor setups. This indicator is intended for structure traders primarily, although it could be used by anyone who uses zones and candlestick patterns to enter trades.

If you leave either zone set to 0 then that zone will not be used, meaning that you can use this to detect both support and resistance signals, or only signals at support, or only signals at resistance.

Settings:
R1: First Resistance Price
R2: Second Resistance Price
S1: First Support Price
S2: Second Support Price

Draw Signals: Enable/Disable Visual Signals
How Far To Look Back: Used For Detecting Fractal Highs/Lows
Doji Size (in pips): This Changes the Size of Detected Doji Candles
Hammer Wick Size: This Changes the Size of Detected Hammers/Shooting Stars
Engulf Wick: If Enabled, Only Engulfing Candles That Engulf the Wick Will Be Valid

Show Engulfing Candles: Enable/Disable Visual Signals For Engulfing Candles
Show Doji Candles: Enable/Disable Visual Signals For Doji Candles
Show Hammer Candles: Enable/Disable Visual Signals For Hammer/Shooting Star Candles

Source Code:
Go to zenandtheartoftradin...stance-zone-signals/ for the source code – it’s free!
Release Notes:
- Updated to PSv4
Release Notes:
Several small optimizations and improvements
Release Notes:
-
- Improved settings interface & info
- Improved hammers & stars detection
- Added stop loss plots (ATR-based)
- Fixed deprecated "transp" parameters
Release Notes:
Updated to Pine Script v5
Release Notes:
Accidentally reverted some code to an old version in the v5 update. Fixed now. Also added confirm parameter to S&R zones.

My Resources Hub: theartoftrading.com
FREE YouTube Lessons: rebrand.ly/zyt
FREE Pine Script Basics Course: rebrand.ly/zpsbc
Pine Script MASTERY Course: rebrand.ly/zpsmc
My Indicators & Strategies: rebrand.ly/zmisc
Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
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?