// SCREENER DIVERGENCES TTI STOCHASTIC EXTREME<br />
// DIVERGENCES TTI STOCHASTIC EXTREME<br />
//TTI Sctochastic Extreme PRC 12.05.2017<br />
//Nicolas @
http://www.prorealcode.com<br />
if close>average[ma] then<br />
x1 = std[ma]<br />
else<br />
x1 = -1*std[ma]<br />
endif<br />
//x2 = (summation[3](x1-lowest[5](x1))/summation[3](highest[5](x1)-lowest[5](x1)))*100<br />
x3 = x1*averagetruerange[5]<br />
x4 = (summation[3](x3-lowest[5](x3))/summation[3](highest[5](x3)-lowest[5](x3)))*100<br />
//a = average[3,1](x2)<br />
b = average[3,1](x4)</p>
<p>//return b as ” ax4 “, 5 style(line) as “level 5”, 95 style(line) as “level 95”,close as “close”<br />
// a style(dottedline)as “ax2″</p>
<p>// Variable :<br />
// ma = 14 entier<br />
///////////////////////////////////////////////////////////////////////<br />
// DIVERGENCES STOCHASTIQUES BAISSIERES et HAUSSIERES d’après le code de HKlisse<br />
x = b [11]<br />
y=average[2](x)<br />
// DIVERGENCES BAISSIERES TTI<br />
if x>y then<br />
hi=max(hi,x)<br />
hico=max(hico,max(high,high[1]))<br />
endif<br />
if x crosses under y then<br />
sto2b=sto1b<br />
sto1b=hi<br />
hi=0<br />
p3b=p1b<br />
p2b=max(p1b,hico1)<br />
p1b=max(highest[3](high),hico)<br />
if p2b=p1b then<br />
p2b=max(p3b,p4b)<br />
endif<br />
hico=0<br />
hico1=0<br />
endif<br />
if x<y then<br />
p4b=hico1<br />
hico1=max(hico1,high)<br />
endif<br />
if p1b>p2b and sto1b<sto2b and x crosses under y and x<x[1] then<br />
signB= 5 //-2<br />
else<br />
signB= 0<br />
endif<br />
// DIVERGENCES HAUSSIERES TTI<br />
if x<y then<br />
lo=min(lo,x)<br />
lowco=min(lowco,min(low,low[1]))<br />
endif<br />
if x CROSSES OVER y then<br />
sto2h=sto1h<br />
sto1h=lo<br />
lo=100<br />
p3h=p1h<br />
p2h=min(p1h,lowco1)<br />
p1h=min(lowest[3](low),lowco)<br />
if p2h=p1h then<br />
p2h=min(p3h,p4h)<br />
endif<br />
lowco=100000<br />
lowco1=100000<br />
endif<br />
if x>y then<br />
p4h=lowco1<br />
lowco1=min(lowco1,low)<br />
endif<br />
if p1h<p2h and sto1h > sto2h and x crosses over y and x>x[1] then<br />
signH= 5 //2<br />
else<br />
signH= 0<br />
endif<br />
////////////////////////////////////////////////<br />
// return signH as ” div TTI H “, signB as ” div TTI B ” , 0 as ” zero “<br />
Ma = 14<br />
SCREENER [ signH or signB ]
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
76
77
78
79
80
81
82
// SCREENER DIVERGENCES TTI STOCHASTIC EXTREME
// DIVERGENCES TTI STOCHASTIC EXTREME
//TTI Sctochastic Extreme PRC 12.05.2017
if close>average[ma] then
x1 = std[ma]
else
x1 = –1*std[ma]
endif
//x2 = (summation[3](x1-lowest[5](x1))/summation[3](highest[5](x1)-lowest[5](x1)))*100
x3 = x1*averagetruerange[5]
x4 = (summation[3](x3–lowest[5](x3))/summation[3](highest[5](x3)–lowest[5](x3)))*100
//a = average[3,1](x2)
b = average[3,1](x4)
//return b as ” ax4 “, 5 style(line) as “level 5”, 95 style(line) as “level 95”,close as “close”
// a style(dottedline)as “ax2”
// Variable :
// ma = 14 entier
///////////////////////////////////////////////////////////////////////
// DIVERGENCES STOCHASTIQUES BAISSIERES et HAUSSIERES d’après le code de HKlisse
x = b [11]
y=average[2](x)
// DIVERGENCES BAISSIERES TTI
if x>y then
hi=max(hi,x)
hico=max(hico,max(high,high[1]))
endif
if x crosses under y then
sto2b=sto1b
sto1b=hi
hi=0
p3b=p1b
p2b=max(p1b,hico1)
p1b=max(highest[3](high),hico)
if p2b=p1b then
p2b=max(p3b,p4b)
endif
hico=0
hico1=0
endif
if x<y then
p4b=hico1
hico1=max(hico1,high)
endif
if p1b>p2b and sto1b<sto2b and x crosses under y and x<x[1] then
signB= 5 //-2
else
signB= 0
endif
// DIVERGENCES HAUSSIERES TTI
if x<y then
lo=min(lo,x)
lowco=min(lowco,min(low,low[1]))
endif
if x CROSSES OVER y then
sto2h=sto1h
sto1h=lo
lo=100
p3h=p1h
p2h=min(p1h,lowco1)
p1h=min(lowest[3](low),lowco)
if p2h=p1h then
p2h=min(p3h,p4h)
endif
lowco=100000
lowco1=100000
endif
if x>y then
p4h=lowco1
lowco1=min(lowco1,low)
endif
if p1h<p2h and sto1h > sto2h and x crosses over y and x>x[1] then
signH= 5 //2
else
signH= 0
endif
////////////////////////////////////////////////
// return signH as ” div TTI H “, signB as ” div TTI B ” , 0 as ” zero “
Ma = 14
SCREENER [ signH or signB ]