Hi!
Parabolic SAR needs high and low to be calculated.
https://www.prorealcode.com/topic/calculo-de-parabolica-sar/
Here you have the code so you could make your own tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// SAR - Parabolic SAR
//
// https://www.prorealcode.com/topic/parabolic-sar-code/page/2/#post-174049
//
// Parameters:
//
SARinit = 0.02
SARstep = 0.02
SARlimit = 0.2
//
IF BARINDEX < 2 THEN
parabolic = LOW
islong = 1
af = SARlimit
hp = HIGH
lp = LOW
ELSE
IF islong THEN
parabolic = parabolic + af * (hp - parabolic)
parabolic = MIN (parabolic, LOW [ 1 ] )
parabolic = MIN (parabolic, LOW [ 2 ] )
ELSE
parabolic = parabolic + af * (lp - parabolic)
parabolic = MAX (parabolic, HIGH [ 1 ] )
parabolic = MAX (parabolic, HIGH [ 2 ] )
ENDIF
reverse = 0
IF islong THEN
IF LOW < parabolic THEN
islong = 0
reverse = 1
parabolic = hp
lp = LOW
af = SARinit
ENDIF
ELSE
IF HIGH > parabolic THEN
islong = 1
reverse = 1
parabolic = lp
hp = HIGH
af = SARinit
ENDIF
ENDIF
IF NOT reverse THEN
IF islong THEN
IF HIGH > hp THEN
hp = HIGH
af = af + SARstep
af = MIN (af,SARlimit)
ENDIF
ELSE
IF LOW < lp THEN
lp = LOW
af = af + SARstep
af = MIN (af,SARlimit)
ENDIF
ENDIF
ENDIF
ENDIF
RETURN parabolic as "parabolic SAR"
1 user thanked author for this post.