
等级: 新手上路
- 注册:
- 2023-1-19
- 曾用名:
|

楼主 |
发表于 2023-2-16 16:36
|
显示全部楼层
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.15) 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.15) and ref(c,1)< ref(l2,1) )
||( h>l2 and (ref(c,1)< ref(l2,1) || c<l2)))) ;
sellcond:=a;
buycond:=b;
str1:STKLABEL&' '&NUMTOSTR(datatype,0)&' t11';
str2:STKLABEL&' '&NUMTOSTR(datatype,0)&' t22';
t11:extgbdata(str1);
t22:extgbdata(str2);
IF DATE<>REF(DATE,1) THEN BEGIN
extgbdataset(str1,0);
extgbdataset(str2,0);
END
if sellcond and t11<TIME then
begin
平预警:1;//预警条件1
extgbdataset(str1,TIME);
DEBUGFILE('D:\AAA\AAA L.TXT',stklabel&' sellcond:%.0f'&' 周期类型=%.2f'&NUMTOSTR(datatype,0)' ma5:'&NUMTOSTR(ma5,3)&' ma10:'&NUMTOSTR(ma10,3)&' ma20:'&NUMTOSTR(ma20,3),sellcond);
end
if buycond and t22<TIME then
begin
开预警:1;//预警条件2
extgbdataset(str2,TIME);
DEBUGFILE('D:\AAA\UMS###.TXT',stklabel&' BUYCON:%.0f'&' 周期类型='&NUMTOSTR(datatype,0)',buycond); |
|