通达信筹码顶底开口主图指标 源码分享 附图
MM:=0.1;
筹码顶:REFDATE(CONST(COST(99.999)),DATE),DOTLINE,COLORMAGENTA,LINETHICK2;
筹码底:REFDATE(CONST(COST(0.001)),DATE),DOTLINE,COLORCYAN,LINETHICK2;
{DD:=筹码底;
SD:=(C-DD)/2;
SC:DD+SD,DOTLINE,COLORRED,LINETHICK1;}
W50:=((筹码顶-筹码底)/2)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W:=(筹码顶-筹码底)/10;
W60:=(W*6)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W90:=(W*9)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W100:=筹码顶,DOTLINE,COLORYELLOW,LINETHICK1;
W110:=(W*11)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W80:=(W*8)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W70:=(W*7)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W30:=(W*3)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W40:=(W*4)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W20:=(W*2)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W10:=(W*1)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
WA10:=(W*-1)+筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
W00:=筹码底,DOTLINE,COLORYELLOW,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=1,W90*0.998,' 90'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,W100*0.998,' 100'),COLORWHITE;
{DRAWTEXT(CURRBARSCOUNT=1,W110*0.998,' 110'),COLORWHITE;}
{DRAWTEXT(CURRBARSCOUNT=1,W80*0.998,' 80'),COLORWHITE;}
DRAWTEXT(CURRBARSCOUNT=1,W70*0.998,' 70'),COLORWHITE;
{DRAWTEXT(CURRBARSCOUNT=1,W60*0.998,' 60'),COLORWHITE;}
DRAWTEXT(CURRBARSCOUNT=1,W50*0.998,' 50'),COLORWHITE;
{DRAWTEXT(CURRBARSCOUNT=1,W40*0.998,' 40'),COLORWHITE;}
DRAWTEXT(CURRBARSCOUNT=1,W30*0.998,' 30'),COLORWHITE;
{DRAWTEXT(CURRBARSCOUNT=1,W20*0.998,' 20'),COLORWHITE;}
DRAWTEXT(CURRBARSCOUNT=1,W10*0.998,' 10'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,W00*0.998,' 0'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,WA10*0.998,'-10'),COLORWHITE;
VAR2:=5;
VAR3:=3;
VAR4:=(EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;
VAR5:=IF(YEAR>=2025,0,1);
VAR6:=EMA(EMA(LOW,21)+6.8*STD(LOW,2),55);
VAR7:=EMA(CLOSE/VAR6*(1.88*CLOSE+LOW+OPEN)/2.75,3);
VAR8:=(VAR7-VAR6)/VAR6/2;
VAR9:=EMA(VAR7-VAR8*VAR7,5)*VAR5;
VAR10:=EMA(CLOSE,300)-3*STD(CLOSE,300);
漏斗下:IF(VAR4>VAR9,VAR4,VAR9)*VAR5,COLORYELLOW,LINETHICK2;
漏斗上:IF(VAR9<VAR4 AND VAR9<CLOSE*0.15,EMA(CLOSE,300)-3*STD(CLOSE,300),VAR9),COLORYELLOW,LINETHICK2;
漏:IF(VAR9>VAR4,漏斗上,DRAWNULL),COLORGREEN,LINETHICK2;
开口XG:=BARSLASTCOUNT(漏斗下!=漏斗上)=1,NODRAW;
{筹码平均成本线}
生命线:IF(CURRBARSCOUNT<13,CONST(COST(67.5)),DRAWNULL),COLORWHITE,DOTLINE;
{DRAWTEXT(CURRBARSCOUNT=1,生命线*0.998,' 生命线'),COLORWHITE;}
漏斗:=漏斗下;
AAA:=CROSS(H,漏斗下);
ZC:=COUNT(AAA,6)>=1;
PP:=H>=漏斗;
PPB:=C<=漏斗;
PPA:=REF(PP,1);
生命:=生命线;
{ASR:(WINNER(C*1.1)-WINNER(C*0.9))/WINNER(HHV(H,0))*100,NODRAW;}
{ASRD:=-((WINNER(C*1.1)-WINNER(C*0.9))/WINNER(HHV(H,0))*100);
分:=CONST(LLV(ASRD,90));
百:=CONST(HHV(ASRD,90))-分;
基点:=CONST(LLV(L,90));
基:=CONST(HHV(H,90))-基点;
CC比:=(ASRD-分)/百;
XCX:=CC比*基+基点;
ASRR:XCX,LINETHICK1,COLORWHITE;}
{DRAWICON(ASRR<REF(ASRR,1) AND REF(ASRR,1)>REF(ASRR,2) AND ASRR>C AND C>REF(C,1),ASRR+1,2);}
{IF(ASRR>REF(ASRR,1) AND C>REF(C,1), ASRR,DRAWNULL),LINETHICK1,COLORRED;};
BAAA:=CONST(HHV(H,190));
TS1:=0+0.01;
TS2:=TS1+0.03;
TS3:=TS2+0.07;
TS4:=TS3+0.08;
{DRAWTEXT(CURRBARSCOUNT=60,BAAA-(BAAA*TS1),'<一>.写上自己需要的文字'),COLORFF00FF ;}
DRAWTEXT(CURRBARSCOUNT=100,BAAA-(BAAA*TS2),' 1.紫线为筹码顶, 蓝线为筹码低, 右则为筹码空间比例.80以上为高位,谨慎操作,小心被套'),COLORYELLOW ;
DRAWTEXT(CURRBARSCOUNT=100,BAAA-(BAAA*TS3),' 2.绿线为区域顶, 绿变黄,并成两条黄线, 则为妖.当天股价超过绿线,但绿线未变黄则逢高减仓。'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=100,BAAA-(BAAA*TS4),' 3.如果绿线变黄线后,当天股价远离黄线。则逢高减仓'),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:WINNER
该公式包含未来函数:COST
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
MM赋值:0.1
输出筹码顶:REF日期(CONST(获利盘为99.999%的成本分布),日期),DOTLINE,画洋红色, 线宽为2
输出筹码底:REF日期(CONST(获利盘为0.001%的成本分布),日期),DOTLINE,画青色, 线宽为2
{DD赋值:筹码底
SD赋值:(C-DD)/2
输出SC:DD+SD,DOTLINE,画红色, 线宽为1
}
W50赋值:((筹码顶-筹码底)/2)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W赋值:(筹码顶-筹码底)/10
W60:=(W*6)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W90:=(W*9)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W100:=筹码顶,DOTLINE,COLORYELLOW, 线宽为1
W110:=(W*11)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W80:=(W*8)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W70:=(W*7)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W30:=(W*3)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W40:=(W*4)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W20:=(W*2)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W10:=(W*1)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
WA10:=(W*-1)+筹码底,DOTLINE,COLORYELLOW, 线宽为1
W00:=筹码底,DOTLINE,COLORYELLOW, 线宽为1
当满足条件CURRBARSCOUNT=1时,在W90*0.998和' 90'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W100*0.998和' 100'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W110*0.998和' 110'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W80*0.998和' 80'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W70*0.998和' 70'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W60*0.998和' 60'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W50*0.998和' 50'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W40*0.998和' 40'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W30*0.998和' 30'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W20*0.998和' 20'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W10*0.998和' 10'位置书写文字
当满足条件CURRBARSCOUNT=1时,在W00*0.998和' 0'位置书写文字
当满足条件CURRBARSCOUNT=1时,在WA10*0.998和'-10'位置书写文字
VAR2赋值:5
VAR3赋值:3
VAR4赋值:(收盘价的5日指数移动平均*7+收盘价的10日指数移动平均*3)/10
如果YEAR>=2025返回0否则返回1
VAR6赋值:LOW的21日指数移动平均+6.8*LOW的2估算标准差,55)
VAR7赋值:EMA(收盘价/VAR6*(1.88*收盘价+LOW+开盘价)/2.75,3)
VAR8赋值:(VAR7-VAR6)/VAR6/2
VAR9赋值:VAR7-VAR8*VAR7的5日指数移动平均*VAR5
VAR10赋值:收盘价的300日指数移动平均-3*收盘价的300估算标准差
如果VAR4>VAR9返回VAR4否则返回VAR9
输出漏斗上:IF(VAR9如果VAR9>VAR4返回漏斗上否则返回DRAWNULL
开口XG赋值: 条件连续成立次数(漏斗下!=漏斗上)=1,NODRAW
输出{筹码平均成本线}
生命线:IF(CURRBARSCOUNT<13,CONST(获利盘为67.5%的成本分布),DRAWNULL),COLORWHITE,DOTLINE
当满足条件CURRBARSCOUNT=1时,在生命线*0.998和' 生命线'位置书写文字
}
漏斗:=漏斗下
AAA赋值:H上穿漏斗下
ZC赋值:统计6日满足AAA的天数>=1
PP赋值:H>=漏斗
PPB:=C<=漏斗
PPA:=1日前的PP
生命赋值:生命线
输出{ASR:(C*1.1计算的获利盘比例-WINNER(C*0.9))/WINNER(0日内H最高值)*100,NODRAW
}
{ASRD:=-((C*1.1计算的获利盘比例-WINNER(C*0.9))/WINNER(0日内H最高值)*100)
分赋值:CONST(90日内ASRD最低值)
百赋值:CONST(90日内ASRD最高值)-分
基点赋值:CONST(90日内L最低值)
基赋值:CONST(90日内H最高值)-基点
CC比赋值:(ASRD-分)/百
XCX赋值:CC比*基+基点
输出ASRR:XCX, 线宽为1,COLORWHITE
}
{DRAWICON(ASRR<1日前的ASRR AND 1日前的ASRR>2日前的ASRR AND ASRR>C AND C>1日前的C,ASRR+1,2)
}
{IF(ASRR>1日前的ASRR AND C>1日前的C, ASRR,DRAWNULL), 线宽为1,画红色
}
BAAA赋值:CONST(190日内H最高值)
TS1赋值:0+0.01
TS2赋值:TS1+0.03
TS3赋值:TS2+0.07
TS4赋值:TS3+0.08
{DRAWTEXT(CURRBARSCOUNT=60,BAAA-(BAAA*TS1),'<一>.写上自己需要的文字'),COLORFF00FF
}
DRAWTEXT(CURRBARSCOUNT=100,BAAA-(BAAA*TS2),' 1.紫线为筹码顶, 蓝线为筹码低, 右则为筹码空间比例.80以上为高位,谨慎操作,小心被套'),COLORYELLOW
DRAWTEXT(CURRBARSCOUNT=100,BAAA-(BAAA*TS3),' 2.绿线为区域顶, 绿变黄,并成两条黄线, 则为妖.当天股价超过绿线,但绿线未变黄则逢高减仓。'),COLORYELLOW
DRAWTEXT(CURRBARSCOUNT=100,BAAA-(BAAA*TS4),' 3.如果绿线变黄线后,当天股价远离黄线。则逢高减仓'),COLORYELLOW