等级: 免费版
- 注册:
- 2022-1-15
- 曾用名:
|

楼主 |
发表于 2022-9-19 16:18
|
显示全部楼层
code:=STKLABEL;
D_code:=STRCAT('Dhour_',code);
K_code:=STRCAT('Khour_',code);
Dtime2:=round(GETINIFILE('C:\alarm.ini','hourset',D_code));//文件不存在时返回0值
Ktime2:=round(GETINIFILE('C:\alarm.ini','hourset',K_code));
m:=if(STRLEN(NUMTOSTR(CURRENTTIME,0))=5,1,2);
nowhour:=DATE()*100+strtonum( STRLEFT(NUMTOSTR(CURRENTTIME,0),m ) );
nowseconds:=strtonum( STRRIGHT(NUMTOSTR(CURRENTTIME,0),2) );
////////////////////////////////////
dhc:=ref(hhv(h,DH),1);
khc:=ref(llv(l,KH),1);
cond_scH:=c>dhc and ISLASTBAR() and range(nowseconds,5,60);
cond_xcH:=c<khc and ISLASTBAR() and range(nowseconds,5,60);
schour:nowhour<>Dtime2 and cond_scH;
if schour then
begin
txet:=STRCAT(STRCAT(STRCAT(STRCAT(STKNAME,STRCAT(STKLABEL,'小时线新高,前高=')),NUMTOSTR(dhc,2)),',现价='),NUMTOSTR(c,2));
WRITEINIFILE('C:\alarm.ini','hourset',D_code ,nowhour );
MSGOUT(1,txet );
END
xchour:nowhour<>Ktime2 and cond_xcH;
if xchour then
begin
txet:=STRCAT(STRCAT(STRCAT(STRCAT(STKNAME,STRCAT(STKLABEL,'小时线新低,前低=')),NUMTOSTR(khc,2)),',现价='),NUMTOSTR(c,2));
WRITEINIFILE('C:\alarm.ini','hourset',K_code ,nowhour );
MSGOUT(1,txet );
END
|
|