Pivot Pattern Boundaries [cajole]
This script automatically detects horizontal support / resistance levels based on user-programmable criteria.
For example, you can detect boundaries with >3 touches within 200 days, allowing a tolerance of 1/4*ATR.
"Touches" are defined from pivots on the chart. The best way to search for larger/smaller patterns is to increase/decrease the pivot size.*
Future versions will allow "exceptions (i.e. keep drawing the horizontal line even if it is breached once or twice).
*TradingView's Pine script defines a Pivot as the highest point in a group. So, entering "2" means that a day's high needs to be above 2 days before and after (xxYxx) to be considered a high pivot.
This script can be an aid in drawing multiple patterns with horizontal boundaries (rectangles, triangles, head and shoulders, cup & handles, VCPs). I have intentionally avoided trying to code detection of the "other side" of these patterns, as that is where the craft of charting becomes an art.
Horizontalsupportandresistance
Horizontal Plot Lines - Max. 24 - grid strategy - DARK LINESWhen I looked for something like this I couldn't find it. Although simple in appearance, this script was actually quite long and complicated to create. It allows you to break up any horizontal space in up to 24 lines. Just remember that 13 lines equal 12 levels, as the top and bottom lines are the placeholders. So, if you are using quarters theory, you would want to select 5 lines.
It automatically sets the top line at a user-selectable place, like the close of the highest candlestick. It also allows you to select the lowest point as the close or the low. This way you can use the bodies of the candlestick or the wicks. You can also set the lookback period, so that your high and low can be set as far back as you prefer in the timescale you are looking at.
You can use these lines in things like quarters theory, or analyze buy and sell points in a grid bot strategy. This indicator could help you to determine where to equally place your buy and sells in a grid with up to 24 different placements.
This version has dark lines and is suitable for the light template. There is a matching light line version for a dark template.
Horizontal Line Pattern (adj #of lines, color, timeframe, top)The simple script allows you to subdivide and price range into a number of equal segments. For example, you can divide 50,000 to 60,000 into 2,4, or 7 lines. You can also set the beginning date and the end date. This can be useful as prices tend to hover around whole numbers or ratios of whole numbers.
You must use settings to set the number of lines and the start and end dates. You can also change the line thickness and the color scheme.