Not tested, but you could try by yourself with this code:
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//short term
a1=ExponentialAverage[50](high)[1]
b1=ExponentialAverage[50](low)[1]
ifclose>a1then
c1=1
Else
IFclose<b1then
c1=-1
endif
ENDIF
ifc1=-1then
D1=a1
ELSE
D1=b1
endif
a2=ExponentialAverage[100](high)[1]
b2=ExponentialAverage[100](low)[1]
ifclose>a2then
c2=1
Else
IFclose<b2then
c2=-1
endif
ENDIF
ifc2=-1then
D2=a2
ELSE
D2=b2
endif
a3=Average[200](high)[1]
b3=Average[200](low)[1]
ifclose>a3then
c3=1
Else
IFclose<b3then
c3=-1
endif
ENDIF
ifc3=-1then
D3=a3
ELSE
D3=b3
endif
ifD1<closethen
result=1
else
result=0
endif
ifD2<closethen
result1=1
else
result1=0
endif
ifD3<closethen
result2=1
else
result2=0
endif
c10=(result+result1+result2)
test=c10=3andc10[1]<>3
screener[test]
I changed the EMA200 to a MA200 (EMA200 needs much more data than a simple moving average and could not be correctly calculated by ProScreener with its 254 bars limitations).
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue