 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- FireScript
|
那不行。没法子一套代码搞定。
日线以及以上周期的处理方案:
sellcond:=a;
buycond:=b;
str1:STKLABEL&' '&NUMTOSTR(datatype,0)&' t1';
str2:STKLABEL&' '&NUMTOSTR(datatype,0)&' t2';
t1:extgbdata(str1);
t2:extgbdata(str2);
if sellcond and t1<date then
begin
平预警:1;//预警条件1
extgbdataset(str1,date);
DEBUGFILE('C:\AAA.TXT',stklabel&' sellcond:%.0f'&' 周期类型='&NUMTOSTR(datatype,0),sellcond);
end
if buycond and t2<date then
begin
开预警:1;//预警条件2
extgbdataset(str2,date);
DEBUGFILE('C:\BBB.TXT',stklabel&' BUYCON:%.0f'&' 周期类型='&NUMTOSTR(datatype,0),buycond);
end
小周期你参考上面方式去掉abb变量的使用就行了。
|
|