通达信每个波段无未来主图指标公式

[复制链接]
查看80 | 回复0 | 2021-8-19 15:21:24 | 显示全部楼层 |阅读模式

以下是通达信每个波段无未来主图指标公式(无源码的请下载附件导入)

日线锁定:=(PERIOD==5) AND (C>0) AND V>0; 

引力:=(MA(C,30)+MA(C,72))/2; 

下轨:=引力*0.73; 

下轨75:=引力*0.75; 

下轨71:=引力*0.71; 

下轨68:=引力*0.68; 

过滤周期:=1; 

VAR1:=EMA(EMA(CLOSE,9),9); 

控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;

资金:=EMA(EMA(CLOSE,8),8); 

资金抬轿:=(资金-REF(资金,1))/REF(资金,1)*1000; 

有庄控盘:=资金抬轿>0; 无庄控盘:=资金抬轿<=0; 买线:=EMA(C,3);

卖线:=EMA(SLOPE(C,22)*20+C,54); 

BU1:=CROSS(买线,卖线);  

SEL1:=CROSS(卖线,买线); 

BU2:=IFF(BU1 AND 有庄控盘,1,IFF(COUNT(BU1 AND 无庄控盘,BARSLAST(SEL1)+1)==1 AND  CROSS(资金抬轿,0),1,0)); 

BU:=BU2 AND COUNT(BU2,BARSLAST(SEL1)+1)==1; 

SEL:=SEL1 AND COUNT(SEL1,BARSLAST(BU)+1)==1; 

BUNEW:=BU; 

止损条件:=CLOSE/REF(OPEN,BARSLAST(BU))<(1-7/100) AND COUNT(BU,BARSLAST(BU)+1)==1 AND COUNT(SEL,BARSLAST(BU)+1)==0; 

SELNEW:=IFF(止损条件 AND COUNT(止损条件,BARSLAST(BU)+1)==1,1,IFF(SEL AND COUNT(止损条件,BARSLAST(BU)+1)==0,1,0));

重新买入:=COUNT(止损条件,BARSLAST(BUNEW)+1)>=1 AND CROSS(C,0.965*REF(O,BARSLAST(BUNEW))); 

不在同一天1:=((重新买入 AND SELNEW)==0); BUNEW2:=((BUNEW AND COUNT(SELNEW,过滤周期)==0) OR 重新买入) AND 不在同一天1; 

二次止损:=(CLOSE/REF(OPEN,BARSLAST(重新买入))<(1-7/100) AND COUNT(重新买入,BARSLAST(重新买入)+1)==1 AND COUNT(SEL,BARSLAST(重

新买入)+1)==0); 

重新卖出:=(SEL AND COUNT(重新买入,BARSLAST(BUNEW2)+1)==1) OR (二次止损 AND SUM(二次止损,0)==1);    

不在同一天2:=((重新卖出 AND BUNEW2)==0); 

SELNEW2:=((SELNEW AND COUNT(SELNEW,BARSLAST(BUNEW2)+1)==1) OR 重新卖出) AND 不在同一天2; 

BUNEW3:=BUNEW2 AND COUNT(BUNEW2,BARSLAST(SELNEW2)+1)==1; 

SELNEW3:=SELNEW2 AND COUNT(SELNEW2,BARSLAST(BUNEW3)+1)==1;  

D:=BARSLAST(BUNEW3)+1>=1 AND COUNT(SELNEW3,BARSLAST(BUNEW3)+1)==0; 

K:=BARSLAST(SELNEW3)+1>=1 AND COUNT(BUNEW3,BARSLAST(SELNEW3)+1)==0; 

修正部分定位:=IFF(COUNT(SELNEW3,BARSCOUNT(C))==0 AND COUNT(BUNEW3,BARSCOUNT(C))==0,1,0); 

修正部分累计:=SUM(修正部分定位,1000)+1; 

精准修正累计:=IFF(修正部分累计==REF(修正部分累计,1) AND REF(修正部分累计,2)<修正部分累计,修正部分累计,0); 

上市修正B:=修正部分定位 AND CROSS(控盘,0);

上市修正S:=修正部分定位 AND CROSS(0,控盘) AND COUNT(上市修正B,BARSLAST(C>0))>=1;

上市D:=COUNT(上市修正B,BARSLAST(上市修正B)+1)==1 AND COUNT(上市修正S,BARSLAST(上市修正B)+1)==0 AND COUNT  (SELNEW3,BARSCOUNT

(C))==0; 

上市K:=COUNT(上市修正S,BARSLAST(上市修正S)+1)==1 AND COUNT(上市修正B,BARSLAST(上市修正S)+1)==0 AND COUNT  

(BUNEW3,BARSCOUNT(C))==0; 

SSXZBZS:=COUNT(上市修正B,BARSCOUNT(C)); 

SSXZSZS:=COUNT(上市修正S,BARSCOUNT(C)); 

QB:=IFF(修正部分定位,上市修正B,BUNEW3); 

QS:=IFF(修正部分定位,上市修正S AND (SSXZBZS==SSXZSZS AND SSXZBZS>=0 AND COUNT(SELNEW3,BARSCOUNT(C))==1 AND COUNT

(BUNEW3,BARSCOUNT(C))==0)==0, SELNEW3 AND (SSXZBZS==SSXZSZS AND SSXZBZS>=0 AND COUNT(SELNEW3,BARSCOUNT(C))==1 AND COUNT

(BUNEW3,BARSCOUNT(C))==0)==0);   

K补:=(COUNT(上市修正B,BARSLAST(C>0))==0 AND COUNT(QB,BARSLAST(C>0))==0)==0;

定位B68:=QB AND COUNT(L<下轨68,10)>=1; 

定位B71:=QB AND COUNT(L<下轨71,10)>=1; 

定位B75:=QB AND COUNT(L<下轨75,10)>=1; 

定位68B:=EXIST(定位B68,BARSLAST(BUNEW)+1) AND 重新买入 AND QB; 

定位71B:=EXIST(定位B71,BARSLAST(BUNEW)+1) AND 重新买入 AND QB; 

定位75B:=EXIST(定位B75,BARSLAST(BUNEW)+1) AND 重新买入 AND QB; 

概率1:=IFF(定位B68,5,IFF(定位B71,4,IFF(定位B75,3,0))); 

概率2:=IFF(定位68B,5,IFF(定位71B,4,IFF(定位75B,3,0))); 

概率:=IFF(概率1>0,概率1,概率2);    

STICKLINE((D AND 日线锁定) OR (上市D AND 日线锁定),H,L,0.00,0),COLOR0000FF; 

STICKLINE((D AND 日线锁定) OR (上市D AND 日线锁定),C,O,3.00,0),COLOR0000FF;  

STICKLINE((K AND K补 AND 日线锁定) OR (上市K AND 日线锁定),H,L,0.00,0),COLORFFFF00; 

STICKLINE((K AND K补 AND 日线锁定) OR (上市K AND 日线锁定),C,O,3.00,0),COLORFFFF00;  

STICKLINE(C==O AND (D OR 上市D) AND 日线锁定,C,C,3,0),COLOR0000FF; 

STICKLINE(C==O AND (K AND K补) AND 日线锁定,C,C,3,0),COLORFFFF00; 

绘制多头:=(D AND 日线锁定) OR (上市D AND 日线锁定); 

绘制空头:=(K AND K补 AND 日线锁定) OR (上市K AND 日线锁定); 

代修复部分:=绘制多头==0 AND 绘制空头==0;  

B修:=BARSLAST(QB); 

S修:=BARSLAST(QS); 

补充绘制:=IFF(B修<S修 AND 代修复部分,1,IFF(B修>S修 AND 代修复部分,2,0));

STICKLINE(日线锁定 AND 补充绘制==1,H,L,0.00,0),COLOR0000FF; 

STICKLINE(日线锁定 AND 补充绘制==1,C,O,3.00,0),COLOR0000FF; 

STICKLINE(日线锁定 AND 补充绘制==2,H,L,0.00,0),COLORFFFF00; 

STICKLINE(日线锁定 AND 补充绘制==2,C,O,3,0),COLORFFFF00;

DRAWICON(QB AND 日线锁定,LOW,1); 

DRAWICON(QB AND 日线锁定,LOW*0.995,7); 

DRAWICON(QS AND 日线锁定,HIGH,2); 

DRAWICON(QS AND 日线锁定,HIGH*1.005,8); 

DRAWICON(概率==5 AND 日线锁定,L*0.97,14); 

DRAWICON(概率==4 AND 日线锁定,L*0.97,13); 

DRAWICON(概率==3 AND 日线锁定,L*0.97,11);

MA5:MA(CLOSE,5),COLORWHITE;

MA10:MA(CLOSE,10),COLORYELLOW;

MA20:MA(CLOSE,20),COLORMAGENTA;

MA60:MA(CLOSE,60),COLORGREEN;

712177003.png

712177003.png

回复

使用道具 举报

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

本版积分规则