Le code du screener ci-dessous renverra la liste des valeurs dont le prix est inférieur ou égal à 1.5% (par défaut et modifiable d’un des points pivots R1,R2,R3,S1,S2,S3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Percent = 1.5 //percentage %
If Month <> Month [ 1 ] then
monthlyHigh = Highest [ max (1 ,BarIndex - lastMonthBarIndex)] (High )[ 1 ]
monthlyLow = Lowest [ max (1 ,BarIndex - lastMonthBarIndex)] (Low )[ 1 ]
lastMonthBarIndex = BarIndex
monthlyPivot = (monthlyHigh + monthlyLow + Close [ 1 ] ) / 3
monthlyR1 = 2 * monthlyPivot - monthlyLow
monthlyS1 = 2 * monthlyPivot - monthlyHigh
monthlyR2 = monthlyPivot + (monthlyHigh - monthlyLow)
monthlyS2 = monthlyPivot - (monthlyHigh - monthlyLow)
monthlyR3 = monthlyR1 + (monthlyHigh - monthlyLow)
monthlyS3 = monthlyS1 - (monthlyHigh - monthlyLow)
Endif
data = min (abs (close - monthlyR1),min (abs (close - monthlyr2),min (abs (close - monthlyr3),min (abs (close - monthlys1),min (abs (close - monthlys2),abs (close - monthlys3))))))
c1 = (data/ close * 100 )<= Percent/ 100
screener [ c1] (data/ close * 100 )
Voir ce sujet: screener point pivot mensuel, écart en pourcentage
ou uniquement pour les R3 et S3, proximité de 1.5% :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Percent = 1.5 //percentage %
If Month <> Month [ 1 ] then
monthlyHigh = Highest [ max (1 ,BarIndex - lastMonthBarIndex)] (High )[ 1 ]
monthlyLow = Lowest [ max (1 ,BarIndex - lastMonthBarIndex)] (Low )[ 1 ]
lastMonthBarIndex = BarIndex
monthlyPivot = (monthlyHigh + monthlyLow + Close [ 1 ] ) / 3
monthlyR1 = 2 * monthlyPivot - monthlyLow
monthlyS1 = 2 * monthlyPivot - monthlyHigh
//monthlyR2 = monthlyPivot + (monthlyHigh - monthlyLow)
//monthlyS2 = monthlyPivot - (monthlyHigh - monthlyLow)
monthlyR3 = monthlyR1 + (monthlyHigh - monthlyLow)
monthlyS3 = monthlyS1 - (monthlyHigh - monthlyLow)
Endif
data = min (abs (close - monthlyR3),abs (close - monthlys3))
c1 = (data/ close * 100 )<= Percent/ 100
screener [ c1] (data/ close * 100 )