通达信兰色飘带主图指标公式

[复制链接]
查看88 | 回复0 | 2021-8-19 13:40:18 | 显示全部楼层 |阅读模式

以下是通达信兰色飘带主图指标公式(无源码的请下载附件导入)

N:=5;CT:=0;
 TON:=TOTALBARSCOUNT;
 NN:=IF(BARSCOUNT(C)<N,BARSCOUNT(C),N);
上轨:REF(MA(H,NN),1),NODRAW;
下轨:REF(MA(L,NN),1),NODRAW;
带宽:100*(上轨/下轨-1),NODRAW;
 STICKLINE(C,上轨,下轨,4,0),COLOR660000;
 PA:=IF(CT=0,上轨,下轨);
BS:=FILTER(CROSS(C,PA),9);
信号:IF(BS,PA,0),NODRAW;
 DRAWKLINE(HIGH,OPEN,LOW,CLOSE),COLOR00FFFF;
 
 BN:=BARSLAST(BS>0); 信号数:SUM(BS>0,0),NODRAW;
 BJJ:=REF(PA,BN);
 DRAWICON(信号>0 AND (BJJ/REF(BJJ,1)-1)*100<-N*2,LLV(L,7)*0.99,3);
 DRAWICON(信号>0,LLV(L,7)*0.99,7);
 P1:=HHV(H>BJJ*1.03 AND BN>0 AND BN<=3,BN+1);
短线机会%3:100*SUM(P1=1 AND REF(P1,1)=0,0)/信号数,NODRAW;
 P2:=HHV(H>BJJ*1.05 AND BN>0 AND BN<=7,BN+1);
%7:100*SUM(P2=1 AND REF(P2,1)=0,0)/信号数,NODRAW;
 M3:MA(C,30),LINETHICK2;
 M6:MA(C,60),LINETHICK2;
 M12:MA(C,125),LINETHICK2;
 M25:MA(C,250),LINETHICK2;
 N1:=300;{注:锁定显示区为310条K线时正常显示}
N2:=IF(TON<N1,TON,N1);
 AH:=CONST(HHV(H,N2)); AL:=CONST(LLV(L,N2)); AHL:=AH-AL;
 DRAWTEXT(CURRBARSCOUNT=N2,AH+AHL*0.05,IF(CT=0,'上轨★信号数','下轨★信号数')),COLOR00FFFF;
 DRAWTEXT(CURRBARSCOUNT=INTPART(N2*0.85),AH+AHL*0.05,' ★短线概率 ■三天3%】'),COLOR00FFFF;
 DRAWTEXT(CURRBARSCOUNT=INTPART(N2*0.63),AH+AHL*0.05,' % ■七天5%】 %★短线概率高低说明操盘相对安全性'),COLOR00FFFF;
 DRAWNUMBER(CURRBARSCOUNT=INTPART(N2*0.9),AH+AHL*0.05, CONST(信号数)),COLOR0088FF;
 DRAWNUMBER(CURRBARSCOUNT=INTPART(N2*0.68),AH+AHL*0.05,CONST(短线机会%3)),COLOR0088FF;
 DRAWNUMBER(CURRBARSCOUNT=INTPART(N2*0.52),AH+AHL*0.05,CONST(%7)),COLOR0088FF;

938555609.jpg

938555609.jpg

回复

使用道具 举报

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

本版积分规则