通达信上下针源码

[复制链接]
查看32 | 回复0 | 2021-8-19 19:25:26 | 显示全部楼层 |阅读模式

以下是通达信上下针源码(无源码的请下载附件导入)

ZFA:=(CLOSE/REF(CLOSE,1)-1)*100;
 ZFB:=(CLOSE/OPEN-1)*100;
 ZF:IF(ZFA>=0 OR ZFB>0,MAX(ZFA,ZFB),MIN(ZFA,ZFB)),NODRAW;
 XZ:=(MIN(OPEN,CLOSE)-LOW)*100/LOW;
下针:=IF(XZ>=5,XZ,0);
 SZ:=(HIGH-MAX(OPEN,CLOSE))*100/MAX(OPEN,CLOSE);
 KK:=(HHV(MAX(CLOSE,OPEN),2)-LLV(MIN(OPEN,CLOSE),2))*100/LLV(MIN(OPEN,CLOSE),2);
 SXZ:=REF(SZ>=5 AND ZFB>0 AND ABS(ZFB)<=4,1) AND XZ>=5 AND ABS(ZFB)<=4 OR (REF(SZ>=5 AND ABS(ZFB)<=4,1) AND XZ>=5 AND ZFB>0 AND ABS(ZFB)<=4);
 XD:=MA(REF(HHV(CLOSE,IF(BARSSINCE(CLOSE>0)<120,BARSSINCE(CLOSE>0),120)),1),2);
 XH:=MA(REF(HHV(HIGH,IF(BARSSINCE(CLOSE>0)<120,BARSSINCE(CLOSE>0),120)),1),2);
 VAB1:=COUNT(CLOSE>XD,5)=1 AND CLOSE>XD AND ZF>=6;
 VAB2:=BARSLAST(VAB1);
 VAB3:=REF(XD,VAB2+4);
 KA:=(CLOSE-VAB3)*100/VAB3;
 VBB1:=COUNT(CLOSE>XH,5)=1 AND CLOSE>XH AND ZF>=6;
 VBB2:=BARSLAST(VBB1);
 VBB3:=REF(XH,VBB2+4);
 KB:=(CLOSE-VBB3)*100/VBB3;
上下针:IF(KK<=7.5 AND COUNT(ZF>=9,6)>=1 AND SXZ AND (VAB2<=6 AND CLOSE>VAB3 AND KA<=20 OR (VBB2<=6 AND CLOSE>VBB3 AND KB<=20)),MAX(SZ,XZ),0);
 VCA1:=BARSLAST(ZFA>=9.6);
 XG:=IF(VCA1>=2 AND VCA1<=4 AND COUNT(ABS(ZFB)<=1,VCA1)>=VCA1 AND ABS(ZFB)<=1,VCA1,0);
 NA:=BARSLAST(上下针>=5);
 NX:=IF(NA<20,NA,0);
 NB:=BARSLAST(XG>=2);
 NY:=IF(NB<20,NB,0);

{-----------------------------------}
 

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则