超级指标2通达信公式 副图 源码附图L2
AA:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
预测:AA/10000;
BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主买:主动买/10000,COLORRED;
主动卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
主卖:-主动卖/10000,COLORLIBLUE;
主力净买:(主动买+主动卖)/10000,COLORMAGENTA;
持币:IF(SAR(10,2,20)>=H,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORBLUE;
持股:IF(SAR(10,2,20)<=L,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORRED;
上涨家:INDEXADV,COLOR0080FF,NODRAW;
下跌家:INDEXDEC,COLORGREEN,NODRAW;
STICKLINE(CLOSE=REF(CLOSE,1),0,VOL,3.5,0),COLORWHITE;
STICKLINE(CLOSE>REF(CLOSE,1),0,VOL,3.5,0),COLORRED;
STICKLINE(CLOSE<REF(CLOSE,1),0,VOL,3.5,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 3.5 , 0 ) , COLOR00FFFF ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 3.2 , 0 ) , COLOR007777 ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 2.7 , 0 ) , COLOR009999 ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 2.1 , 0 ) , COLOR00BBBB ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 1.5 , 0 ) , COLOR00DDEE ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 0.9 , 0 ) , COLOR66FFFF ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 0.2 , 0 ) , COLORFFFFFF ;
STICKLINE(主动买>=0,VOL,-主动卖,3.2,0),COLOR000033;
STICKLINE(主动买>=0,VOL,-主动卖,2.7,0),COLOR000066;
STICKLINE(主动买>=0,VOL,-主动卖,2.1,0),COLOR000099;
STICKLINE(主动买>=0,VOL,-主动卖,1.5,0),COLOR0000CC;
STICKLINE(主动买>=0,VOL,-主动卖,0.9,0),COLOR0000FF;
STICKLINE(主动买>=0,VOL,-主动卖,0.2,0),COLORCC66FF;
STICKLINE(主动卖<=0,0,-主动卖,3.2,0),COLOR990000;
STICKLINE(主动卖<=0,0,-主动卖,2.7,0),COLORCC0000;
STICKLINE(主动卖<=0,0,-主动卖,2.1,0),COLORFF4400;
STICKLINE(主动卖<=0,0,-主动卖,1.5,0),COLORFF8800;
STICKLINE(主动卖<=0,0,-主动卖,0.9,0),COLORFFCC00;
STICKLINE(主动卖<=0,0,-主动卖,0.2,0),COLORCYAN;
AA01:=VOL>REF(V,1)*1.9;
STICKLINE(AA01,0,V,0.5,0),COLORYELLOW;
五日:=MA(V,5),COLOR40FF00,LINETHICK2;
三五日:= MA(V,35),COLORYELLOW;
一三五日:=MA(V,135),COLOR0080FF;
NOTEXT强:=IF(五日>MA(五日,2),五日,DRAWNULL),COLORRED,LINETHICK2;
N:=IF(TOTALBARSCOUNT>=120,120,TOTALBARSCOUNT);
HH0:=HHV(H,N);
LL0:=LLV(L,N);
MM0:=CONST((HH0+LL0)*0.5);
S01:=CONST(IF(REF(C,N-15)>MM0,1.00,-0.08));
S02:=CONST(IF(REF(C,N-15)>MM0,-1,1));
S1:=IF(FINDSTR(EXTERNSTR(0,13),'万元'),S01+(0.08*S02),S01),NODRAW;
S2:=IF(FINDSTR(EXTERNSTR(0,12),'。'),S1+(0.08*S02),S1),NODRAW;
S3:=IF(FINDSTR(EXTERNSTR(0,8),'公告'),S2+(0.08*S02),S2),NODRAW;
S4:=IF(FINDSTR(EXTERNSTR(0,10),','),S3+(0.08*S02),S3);
S5:=IF(FINDSTR(EXTERNSTR(0,15),'-'),S4+(0.08*S02),S4);
S6:=IF(FINDSTR(EXTERNSTR(0,1),','),S5+(0.08*S02),S5);
S7:=IF(FINDSTR(EXTERNSTR(0,14),'-'),S6+(0.08*S02),S6);
S8:=IF(FINDSTR(EXTERNSTR(0,11),'-'),S7+(0.08*S02),S7);
S9:=IF(FINDSTR(EXTERNSTR(0,9),'-'),S8+(0.08*S02),S8);
K:=IF(S1<=0,0.05,IF(S1>=0,-0.05,0));
量_价:=1;
CTKG:=1;
W:=量_价;
EPSL:=0.0001;
ZZ:=(C+H+L)/3;
TJA:=ZZ>=MAX(C,O) AND CTKG=1;
TJB:=ZZ<=MIN(C,O) AND CTKG=1;
ZF:=IF(TJA,1,IF(TJB,-1,0));
TJ0:=TJA OR TJB;
TJ1:=H=L AND C>REF(C,1);
TJ2:=H=L AND C<REF(C,1);
TJ3:=H=L AND C=REF(C,1);
量_价:=IF(W=1,VOL,AMOUNT),STICK,COLOREEFFEE;
EE:=IF(TJ1,EPSL,IF(TJ2,-EPSL,0));
ZL:=2*(H-L)+ABS(C-O)+3*IF(TJ3,EPSL,ABS(EE));
JGL_DX:=(IF(TJ0,2/3*(2*C-H-L)+ZF*ABS(C-O),(C-O))+EE)/ZL;
买卖差:=JGL_DX*量_价,COLOR13AADD,NODRAW;
DX%:JGL_DX*100,NODRAW,COLORGREEN,NODRAW;
DX连红:BARSLASTCOUNT(DX%>0),COLORRED,NODRAW,NODRAW;
买盘:=量_价*(1+JGL_DX)/2,COLOR1133AA,NODRAW;
卖盘:=量_价*(1-JGL_DX)/2,COLORFFFF00,NODRAW;
VAR11:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
DDX:=买盘-卖盘;
MADDX:=MA(DDX,5)*15;
DDX1:SMA(MADDX,3,1),COLORRED,LINETHICK1;
DDX2:SMA(DDX1,3,1),COLORGREEN,LINETHICK1;
DDX3:SMA(DDX2,3,1),COLORYELLOW,LINETHICK1;
DRAWRECTREL(0,250,175,999.4,IF(120,RGB(10,0,0),0));
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW;
超大单:=(超B)-(超S),NODRAW;
大单:=(大B)-(大S),NODRAW;
中单:=(中B)-(中S),NODRAW;
小单:=(小B)-(小S),NODRAW;
DAZHI:=CONST(MAX(ABS(净流入),MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW;
DRAWRECTREL(0,CONST(830-(ABS(超大单)*500/DAZHI)),30,935,IF(CONST(超大单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(35,CONST(830-(ABS(大单)*500/DAZHI)),65,935,IF(CONST(大单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(70,CONST(830-(ABS(中单)*500/DAZHI)),100,935,IF(CONST(中单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(105,CONST(830-(ABS(小单)*500/DAZHI)),135,935,IF(CONST(小单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(140,CONST(830-(ABS(净流入)*500/DAZHI)),170,935,IF(CONST(净流入)>0,RGB(255,0,0{255,255,255}),RGB(23,125,255)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.002,0.25,0,'资金搏弈 (万元)'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.002,0.55,0,INTPART(超大单)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.035,0.555,0,INTPART(大单)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.070,0.550,0,INTPART(中单)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.106,0.55,0,INTPART(小单)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.145,0.55,0,INTPART(净流入)),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.002,1,0,'超大'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.040,1,0,'大单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.075,1,0,'中单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.112,1,0,'小单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.145,1,0,'净流'),COLORYELLOW;
{T6:=IF(FINDSTR(EXTERNSTR(0,1),','),STRCAT('千股千评:',EXTERNSTR(0,1)),'');
DRAWTEXT_FIX(1,0.00,0.00,0,T6),COLOR00FFFF;};
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
如果CURRBARSCOUNT=1 AND PERIOD=5返回成交量*240/FROMOPEN否则返回DRAWNULL
输出预测:AA/10000
BB赋值:成交量/((最高价-LOW)*2-收盘价-OPEN的绝对值)
主动买赋值:IF(收盘价>OPEN,BB*(最高价-LOW),IF(收盘价
输出主买:主动买/10000,画红色
主动卖赋值:IF(收盘价>OPEN,0-BB*((最高价-收盘价)+(OPEN-LOW)),IF(收盘价
输出主卖:-主动卖/10000,COLORLIBLUE
输出主力净买:(主动买+主动卖)/10000,COLORMAGENTA
输出持币:IF(SAR(10,2,20)>=H,SAR(10,2,20),DRAWNULL),CIRCLEDOT, 画蓝色
输出持股:IF(SAR(10,2,20)<=L,SAR(10,2,20),DRAWNULL),CIRCLEDOT,画红色
输出上涨家:INDEXADV,COLOR0080FF,NODRAW
输出下跌家:INDEXDEC,COLORGREEN,NODRAW
STICKLINE(收盘价=1日前的收盘价,0,成交量,3.5,0),COLORWHITE
STICKLINE(收盘价>1日前的收盘价,0,成交量,3.5,0),画红色
STICKLINE(收盘价<1日前的收盘价,0,成交量,3.5,0),COLORGREEN
当满足条件CURRBARSCOUNT=1 AND PERIOD=5时,在AA和1 之间画柱状线
当满足条件CURRBARSCOUNT=1 AND PERIOD=5时,在AA和1 之间画柱状线
当满足条件CURRBARSCOUNT=1 AND PERIOD=5时,在AA和1 之间画柱状线
当满足条件CURRBARSCOUNT=1 AND PERIOD=5时,在AA和1 之间画柱状线
当满足条件CURRBARSCOUNT=1 AND PERIOD=5时,在AA和1 之间画柱状线
当满足条件CURRBARSCOUNT=1 AND PERIOD=5时,在AA和1 之间画柱状线
当满足条件CURRBARSCOUNT=1 AND PERIOD=5时,在AA和1 之间画柱状线
当满足条件主动买>=0时,在成交量和-主动卖之间画柱状线
当满足条件主动买>=0时,在成交量和-主动卖之间画柱状线
当满足条件主动买>=0时,在成交量和-主动卖之间画柱状线
当满足条件主动买>=0时,在成交量和-主动卖之间画柱状线
当满足条件主动买>=0时,在成交量和-主动卖之间画柱状线
当满足条件主动买>=0时,在成交量和-主动卖之间画柱状线
当满足条件主动卖<=0时,在0和-主动卖之间画柱状线
当满足条件主动卖<=0时,在0和-主动卖之间画柱状线
当满足条件主动卖<=0时,在0和-主动卖之间画柱状线
当满足条件主动卖<=0时,在0和-主动卖之间画柱状线
当满足条件主动卖<=0时,在0和-主动卖之间画柱状线
当满足条件主动卖<=0时,在0和-主动卖之间画柱状线
AA01:=成交量>1日前的V*1.9
当满足条件AA01时,在0和V之间画柱状线
五日赋值:V的5日简单移动平均,COLOR40FF00,LINETHICK2
三五日赋值: V的35日简单移动平均,COLORYELLOW
一三五日赋值:V的135日简单移动平均,COLOR0080FF
NOTEXT强赋值:IF(五日>五日的2日简单移动平均,五日,DRAWNULL),画红色,LINETHICK2
如果TOTALBARSCOUNT>=120返回120否则返回TOTALBARSCOUNT
HH0赋值:N日内H最高值
LL0赋值:N日内L最低值
MM0赋值:CONST((HH0+LL0)*0.5)
S01赋值:CONST(IF(N-15日前的C>MM0,1.00,-0.08))
S02赋值:CONST(IF(N-15日前的C>MM0,-1,1))
S1赋值:IF(FINDSTR(EXTERNSTR(0,13),'万元'),S01+(0.08*S02),S01),NODRAW
S2赋值:IF(FINDSTR(EXTERNSTR(0,12),'。'),S1+(0.08*S02),S1),NODRAW
S3赋值:IF(FINDSTR(EXTERNSTR(0,8),'公告'),S2+(0.08*S02),S2),NODRAW
S4赋值:IF(FINDSTR(EXTERNSTR(0,10),','),S3+(0.08*S02),S3)
S5赋值:IF(FINDSTR(EXTERNSTR(0,15),'-'),S4+(0.08*S02),S4)
S6赋值:IF(FINDSTR(EXTERNSTR(0,1),','),S5+(0.08*S02),S5)
S7赋值:IF(FINDSTR(EXTERNSTR(0,14),'-'),S6+(0.08*S02),S6)
S8赋值:IF(FINDSTR(EXTERNSTR(0,11),'-'),S7+(0.08*S02),S7)
S9赋值:IF(FINDSTR(EXTERNSTR(0,9),'-'),S8+(0.08*S02),S8)
K赋值:IF(S1<=0,0.05,IF(S1>=0,-0.05,0))
量_价赋值:1
CTKG:=1
W赋值:量_价
EPSL赋值:0.0001
ZZ赋值:(C+H+L)/3
TJA赋值:ZZ>=C和O较大值 AND CTKG=1
TJB赋值:ZZ<=C和O的较小值 AND CTKG=1
ZF赋值:IF(TJA,1,IF(TJB,-1,0))
TJ0赋值:TJA OR TJB
TJ1赋值:H=L AND C>1日前的C
TJ2赋值:H=L AND C<1日前的C
TJ3赋值:H=L AND C=1日前的C
如果W=1返回成交量否则返回AMOUNT
EE赋值:IF(TJ1,EPSL,IF(TJ2,-EPSL,0))
ZL赋值:2*(H-L)+C-O的绝对值+3*IF(TJ3,EPSL,ABS(EE))
JGL_DX赋值:(IF(TJ0,2/3*(2*C-H-L)+ZF*C-O的绝对值,(C-O))+EE)/ZL
买卖差赋值:JGL_DX*量_价,COLOR13AADD,NODRAW
输出DX%:JGL_DX*100,NODRAW,COLORGREEN,NODRAW
输出DX连红:BARSLASTCOUNT(DX%>0),画红色,NODRAW,NODRAW
买盘赋值:量_价*(1+JGL_DX)/2,COLOR1133AA,NODRAW
卖盘赋值:量_价*(1-JGL_DX)/2,COLORFFFF00,NODRAW
VAR11赋值:成交量/((最高价-LOW)*2-收盘价-OPEN的绝对值)
DDX赋值:买盘-卖盘
MADDX赋值:DDX的5日简单移动平均*15
MADDX的3日[1日权重]移动平均
DDX1的3日[1日权重]移动平均
DDX2的3日[1日权重]移动平均
DRAWRECTREL(0,250,175,999.4,IF(120,RGB(10,0,0),0))
超B赋值:L2_AMO(0,2)/10000.0
大B赋值:L2_AMO(1,2)/10000.0
中B赋值:L2_AMO(2,2)/10000.0
小B赋值:L2_AMO(3,2)/10000.0
超S赋值:L2_AMO(0,3)/10000.0
大S赋值:L2_AMO(1,3)/10000.0
中S赋值:L2_AMO(2,3)/10000.0
小S赋值:L2_AMO(3,3)/10000.0
净流入赋值:(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW
超大单赋值:(超B)-(超S),NODRAW
大单赋值:(大B)-(大S),NODRAW
中单赋值:(中B)-(中S),NODRAW
小单赋值:(小B)-(小S),NODRAW
DAZHI赋值:CONST(MAX(净流入的绝对值,MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW
DRAWRECTREL(0,CONST(830-(超大单的绝对值*500/DAZHI)),30,935,IF(CONST(超大单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(35,CONST(830-(大单的绝对值*500/DAZHI)),65,935,IF(CONST(大单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(70,CONST(830-(中单的绝对值*500/DAZHI)),100,935,IF(CONST(中单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(105,CONST(830-(小单的绝对值*500/DAZHI)),135,935,IF(CONST(小单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(140,CONST(830-(净流入的绝对值*500/DAZHI)),170,935,IF(CONST(净流入)>0,RGB(255,0,0{255,255,255}),RGB(23,125,255)))
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.002,0.25,0,'资金搏弈 (万元)'),COLORYELLOW
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.002,0.55,0,INTPART(超大单)),COLORYELLOW
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.035,0.555,0,INTPART(大单)),COLORYELLOW
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.070,0.550,0,INTPART(中单)),COLORYELLOW
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.106,0.55,0,INTPART(小单)),COLORYELLOW
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.145,0.55,0,INTPART(净流入)),COLORYELLOW
当满足条件CURRBARSCOUNT=1时,在横轴0.002纵轴1位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.040纵轴1位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.075纵轴1位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.112纵轴1位置书写文字
当满足条件CURRBARSCOUNT=1时,在横轴0.145纵轴1位置书写文字
{T6赋值:IF(FINDSTR(EXTERNSTR(0,1),','),STRCAT('千股千评:',EXTERNSTR(0,1)),'')
当满足条件1时,在横轴0.00纵轴0.00位置书写文字
}