通达信两峰三峰箱体主图源码附图

通达信公式 两峰三峰箱体主图

N1:=10;
N2:=60;
N3:=10;
A1:=REFX(HHV(H,N1),N1-1);{N1为峰的宽度}{N2为箱体宽度}
A2:=IF(H=HHV(H,N1)&&H=A1,H,DRAWNULL);
高点:=IF(A2=REF(A2,1),DRAWNULL,A2);
F1:=FINDHIGH(高点,0,N2,1);
F2:=FINDHIGH(高点,0,N2,2);
AVGH:=(H+C+O+L)/4;
平均:=(F1+F2+AVGH)/3;
方差:=POW(F1-平均,2)+POW(F2-平均,2)+POW(AVGH-平均,2);
标准差:=SQRT(方差);
B1:=标准差<=(N3/100);
C1:=COUNT(B1>0 AND REF(B1,1)=0,0);
C2:=CONST(C1)-C1;
P1:=BARSLAST(C2=0 AND REF(C2,1)>=1);
P2:=CONST(P1);
L1:=CONST(REF(AVGH,P1));
LL1:IF(H>L1,DRAWNULL,L1),DOTLINE;
L2:IF(CURRBARSCOUNT<=(N2+P2) AND CURRBARSCOUNT>=P2,L1,DRAWNULL)COLORYELLOW,DOTLINE;
LOW1:=IF(ISLASTBAR,FINDLOW(L,P2,N2,1),DRAWNULL);
L3:IF(CURRBARSCOUNT<=(N2+P2) AND CURRBARSCOUNT>=P2,CONST(LOW1),DRAWNULL)COLORYELLOW,DOTLINE;
STICKLINE(CURRBARSCOUNT=P2 OR CURRBARSCOUNT=(P2+N2),L2,L3,0.000001,0)COLORYELLOW;
F3:=FINDHIGH(高点,0,N2,3);
B平均:=(F1+F2+F3+AVGH)/4;
BFC:=POW(F1-平均,2)+POW(F2-平均,2)+POW(F3-B平均,2)+POW(AVGH-平均,2);
BBZC:=SQRT(BFC);
BB1:=BBZC<=(N3/70);
BC1:=COUNT(BB1>0 AND REF(BB1,1)=0,0);
BC2:=CONST(BC1)-BC1;
BP1:=BARSLAST(BC2=0 AND REF(BC2,1)>=1);
BP2:=CONST(BP1);
BL1:=CONST(REF(AVGH,BP1));
BBL1:IF(H>BL1,DRAWNULL,BL1),DOTLINE;
BL2:IF(CURRBARSCOUNT<=(N2+BP2) AND CURRBARSCOUNT>=BP2,BL1,DRAWNULL)COLORYELLOW,DOTLINE;
BLOW1:=IF(ISLASTBAR,FINDLOW(L,BP2,N2,1),DRAWNULL);
BL3:IF(CURRBARSCOUNT<=(N2+BP2) AND CURRBARSCOUNT>=BP2,CONST(BLOW1),DRAWNULL)COLORYELLOW,DOTLINE;
STICKLINE(CURRBARSCOUNT=BP2 OR CURRBARSCOUNT=(BP2+N2),BL2,BL3,0.000001,0)COLORYELLOW;
 




未来函数检测结果如下:
该公式包含未来函数:DHIGH
该公式包含未来函数:DLOW
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图