ma5:=
ma
(
c
,
5
);
ma10:=
ma
(
c
,
10
);
ma20:=
ma
(
c
,
20
);
ma30:=
ma
(
c
,
30
);
ma60:=
ma
(
c
,
60
);
l1:=
min
(
min
(
min
(ma10,ma20),ma30),ma60) ;
l2:=
max
(
max
(
max
(ma10,ma20),ma30),ma60) ;
a:ma5>l1&&(
c
<
ref
(
c
,
1
) ||
ref
(
c
,
1
)<
ref
(
c
,
2
)
|| ma5<ma10 )&&(ma5>ma20 || ma5>ma60) &&(( ( l1>(
l
-(
hhv
(
h
,
5
)-
l
)*
0.30
)
and
ref
(
c
,
1
)>
ref
(l1,
1
) )
||(
l
<l1
and
(
ref
(
c
,
1
)>
ref
(l1,
1
) ||
c
>l1)))) ;
b:ma5<l2&&(
c
>
ref
(
c
,
1
) ||
ref
(
c
,
1
)>
ref
(
c
,
2
)
|| ma5>ma10 )&&(ma5<ma20 || ma5<ma60) &&(( ( l2<(
h
+(
h
-
llv
(
l
,
5
))*
0.30
)
and
ref
(
c
,
1
)<
ref
(l2,
1
) )
||(
h
>l2
and
(
ref
(
c
,
1
)<
ref
(l2,
1
) ||
c
<l2)))) ;
sellcond:=a;
buycond:=b;
abb:
time0
-
timetot0
(
dynainfo
(
207
)),
NODRAW
;
str1:
STKLABEL
&
't1'
;
str2:
STKLABEL
&
't2'
;
t1:
extgbdata
(str1);
t2:
extgbdata
(str2);
if
sellcond
and
t1<
time
and
abb<=
5
then
begin
平预警:
1
;
extgbdataset
(str1,
time
);
end
if
buycond
and
t2<
time
and
abb<=
5
then
begin
开预警:
1
;
extgbdataset
(str1,
time
);
end