I took a look at your post, but if I’m correct it allows me to find breakout. I’m looking instead how to find stocks that are near resistance or support and have not already passed the level.
There’s a section in there for when the current high is within +/- 1% of the previous pivot level:
1
2
3
4
5
6
7
8
9
//Define the pivot criteria
V1=PIVOT(MIN=15,TYPE=High);
//Get the current high price and when the last V1 pivot occurred
H1=HIGH();
V2=VALUEWHEN(HIGH(),V1);
//Calc 1% rule
WITHINRANGE(V2,H1,PERCENT=1.00)
Note: To use the latest closing price instead of high change H1 = HIGH(); to H1 = CLOSE();
This example will only show those whose current closing price is within 2% of the previous pivot high but hasn’t crossed. Note that the WITHIN() function will calculate 2% above or below, so we have to use a different formula from above:
1
2
3
4
5
6
7
8
9
10
V1=PIVOT(MIN=10,TYPE=High);
V2=VALUEWHEN(HIGH(),V1);
C1=CLOSE();
R1=(C1/V2);
//Set % range
(R1>=0.98andR1<=1)and
//High must also be less than Pivot;
HIGH()<V2
Note that a pivot level isn’t necessarily a significant support or resistance level – I would still look at the charts to visually confirm. For example, PEP is within 2% of the pivot level which was set by last week’s all-time high (confirmed because this week has a lower high) whereas CELG is at significant historical support and resistance level, found in the above scan on weekly data:
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.