TradingView
DS24
6 de Mai de 2019 06:30

Support and Resistance lines 

USD/CADOANDA

Descrição

This indicator allows you to set 5 SR lines for 8 currency pairs. The SR line variables need to be set in the pine script.
It is easy to add more currency pairs or change the number of SR lines.

The indicator works in the following time frames: 1D, 12H, 8H, 6H, 4H
In the active time frame green and red vertical lines indiate a potential reversal.
Higher time frame occurrences are indicated by e.g. 8H, 12H labels above or below the price line.
So, e.g. in the 12H window you can see D labels. And in the 8H window you can see 12H and D labels.

The indicator recognizes 4 long and 4 short patterns. These patterns are very simple. See the section "Conditions for PriceAction patterns" in the pine script.
If you desire please go ahead and change the patterns or add new ones. This is the most difficult part. If you come up with good ones please post them here.

Comentários
robingeorge331
Amazing indicator, however the lines are not visible.
DS24
I created a new version of the manual SR line script. Compared to the original script that I posted first this new version
1. works with a lot more currency pairs
2. SR line width can be set in the indicator settings
3. the vertical lines, arrows and the SR lines can be turned off in the indicator settings
4. the indicator settings window can be opened by clicking on a star symbol that is placed in the upper right corner of the graph window
DS24
One correction. To change the the width of the visible and invisible SR zones change the numbers on lines 8 and 9.
Previously I said to change lines 63 and 64. That was wrong. Sorry about that.
DS24
The title is a bit generic and doesn't well describe the function of this indicator.
A better title would have been: Manual SR lines with PriceAction indicator

Originally I programmed the script so that the SR lines were entered in the settings popup window.
I removed that feature because I found that it is faster if one updates the SR lines in a text editor and then just copies the whole set into the pine editor.

The visible width of the SR zone (green area) can be set by changing variable SRA on line 63. Increase or decrease the number to make the area wider or narrower.
There is also an invisible SR zone (AZA on line 64). AZA is used in the patter recognition. Usually one would set AZA equal to SRA.
However, if one wants to keep the visible SR zone tight but have a wider window for the patter recognition then increase AZA in relation to SRA.

For the pattern recognition to indicate a hit two events need to happen:
1. the open or close needs to be within the AZA zone (see "Condition for WithinSR", lines 113-127)
2. one of the "Conditions for PriceAction patterns" needs to be met (see lines 130-155)

The value of this indicator depends on 2 things:
1. the quality of the manual set SR areas
2. the quality of the PriceAction patterns

Setting SR lines is relatively easy. But creating good PriceAction patterns is very difficult. By PriceAction I mean the price move that indicates that a reversal is imminent.
I included in the script 4 simple PriceAction patterns for long and short. I did not spend much time developing these PriceAction patterns.
To make the indicator more valuable more and better PriceAction patterns should be added to the script.
Mais