以下是通达信立桩量指标公式源码和截图
通达信立桩量指标公式源码:
N:=80;
M:=3;
M1:=3;
M2:=6;
M3:=12;
M4:=24;
M5:=34;
M6:=48;
M7:=89;
M8:=144;
M9:=21;
水平面:ma(CLOSE,89),COLORFFA2FF;
bbi:(MA(CLOSE,M1)+MA(CLOSE,M2)+MA(CLOSE,M3)+MA(CLOSE,M4))/4;
BAA:(MA(CLOSE,M5)+MA(CLOSE,M6)+MA(CLOSE,M7)+MA(CLOSE,M8)+MA(CLOSE,M9))/5,COLOR0000CD,LINETHICK4;
ebbi:(EMA(C,6)+EMA(C,18)+EMA(C,54)+EMA(C,162))/4,COLORFF00FF,LINETHICK2;
stICKLINE(crOSS(BBI,长线EBBI),L,L-0.09,4,0),COLORYELLOW;
DRAWTEXT(CROSS(BBI,长线EBBI),L-0.13,'走牛'),COLORYELLOW;
STICKLINE(CROSS(BBI,BAA),L,L-0.11,5,0),COLORWHITE;
DRAWTEXT(CROSS(BBI,BAA),L-1.0,'买入持股'),COLORFFA2FF,LINETHICK3;
DRAWTEXT(CROSS(BAA,BBI),L-0.13,'注意仓位'),COLOR00E300,LINETHICK3;
IF(BBI REF(BBI,1),BBI,DRAWNULL),COLORRED,LINETHICK2;
IF(BBI REF(BBI,1),BBI,DRAWNULL),COLORBLUE,LINETHICK2;
MA1:MA(CLOSE,24),COLOR00E300,LINETHICK1;
V2:=IF(CURRBARSCOUNT=1,*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);
STICKLINE(V2 =1,O,C,2,0),COLORYELLOW;
MA13:=MA(CLOSE,13);
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
A1:=MIN(O,C);
B1:=Abs(O-C);
T1:=FILTER(BB13 1ANDEMA(X1,13) REF(EMA(X1,8),1),10);
STICKLINE(T1,A1,A1+B1/4,2,0),COLOR007575;
STICKLINE(T1,A1+B1/4,A1+B1/2,2,0),COLORFF0000;
STICKLINE(T1,A1+B1/2,A1+B1*3/4,2,0),COLOR007575;
STICKLINE(T1,A1+B1*3/4,A1+B1,2,0),COLORFF0000;
LC:=REF(CLOSE,1);
:=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1))*100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
{DRAWTEXT(CROSS(FF,MA15),(LOW*0.97),'底'),COLORA6E500;
DRAWTEXT(CROSS(88,RSI),(HIGH*1.04),'顶背离'),COLOR1880FF;}
STICKLINE(CROSS(FF,MA15),A1,A1+B1/2,2,0),COLOR7F017F;
STICKLINE(CROSS(88,RSI),A1+B1,A1+B1/2,2,0),COLORGREEN;
T2:=COUNT(CROSS(BBI,3),3)=1ANDCROSS(C,BBI);
DRAWTEXT(T2,H*1.05,''),COLORWHITE;
STICKLINE(T2,O,C,2,0),COLORRED;
T12:=V2
T0:=BArslAST(T12);
L1:=REF(L,T0);
H1:=REF(H,T0);
STICKLINE(REF(T12,1)ORREF(T12,2)ORREF(T12,3),H1,H1,4,-1),COLORWHITE;
STICKLINE(REF(T12,1)ORREF(T12,2)ORREF(T12,3),L1,L1,4,-1),COLORWHITE;
{T11:=REF(T12,3)ANDCOUNT(L L1,4)=0ANDCOUNT(L H1,4)
DRAWTEXT(T11,H*1.05,'三天'),COLORWHITE;
STICKLINE(T11,O,C,2,0),COLORFF00FF;}
{(REF(V2 =1,3)ORREF(V2 =1,2)ORREF(V2 =1,1))};
L11:=MIN(REF(L,1),L);
L10:=MIN(L11,REF(L,2));
L21:=MAX(REF(L,1),L);
L20:=MAX(L21,REF(L,2));
T111:=(REF(V2 =1,3)ORREF(V2 =1,2)ORREF(V2 =1,1))AND
((L10 L1ANDL20 H1)OR(L11 L1ANDL21 H1));
T11:=T111ANDREF(T111,1)=0;
STICKLINE(T11,O,C,2,0),COLORFF00FF;
高:=REF(HHV(H,N),M);
低:=REF(LLV(L,N),M);
H19:=高-(高-低)*0.191;
H38:=高-(高-低)*0.382;
H中:=高-(高-低)*0.5;
H61:=高-(高-低)*0.618;
H80:=高-(高-低)*0.809;
顶点:REFDATE(高,DATE),POINTDOT,LINETHICK2,COLORWHITE;
%19.8:REFDATE(H19,DATE),POINTDOT,LINETHICK2,COLORYELLOW;
%38.2:REFDATE(H38,DATE),POINTDOT,LINETHICK2,COLORGREEN;
%50:REFDATE(H中,DATE),POINTDOT,LINETHICK2,COLORRED;
%61.8:REFDATE(H61,DATE),POINTDOT,LINETHICK2,COLORMAGENTA;
%80.9:REFDATE(H80,DATE),POINTDOT,LINETHICK2,COLORBLUE;
低点:REFDATE(低,DATE),POINTDOT,LINETHICK2,COLORWHITE;
DRAWTEXT(ISLASTBAR,顶点,'顶点'),COLORWHITE;
DRAWTEXT(ISLASTBAR,低点,'低点'),COLORWHITE;
STICKLINE(T1,A1,A1+B1/2,2,0),COLOR007575;
STICKLINE(T1,A1+B1/2,A1+B1,2,0),COLORBLUE;
STICKLINE(T11ANDT12,A1,A1+B1/2,2,0),COLORFF00FF;
STICKLINE(T11ANDT12,A1+B1/2,A1+B1,2,0),COLORYELLOW;
STICKLINE(T1ANDT12,A1+B1/3,A1+B1,2,0),COLORYELLOW;
STICKLINE(T1ANDT12,A1,A1+B1/3,2,0),COLOR007575;
STICKLINE(T1ANDT12,A1+B1/3,A1+B1*2/3,2,0),COLORBLUE;
STICKLINE(T2ANDT12,A1+B1/2,A1+B1,2,0),COLORRED;
STICKLINE(T2ANDT12,A1,A1+B1/2,2,0),COLORYELLOW;
M1:2,500,5
M2:2,500,10
VVOL:IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
MAVOL1:MA(VOLUME,M1);
MAVOL2:MA(VOLUME,M2);
V2:IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1),NODRAW,COLORRED;
STICKLINE(V2 =1,0,VOL,2,0),COLORYELLOW;
换手:VOL/CAPITAL*100,POINTDOT;
十日换手:SUM(换手,10);
二十日换手:SUM(换手,20);
六十日换手:SUM(换手,60);
九十日换手:SUM(换手,90);
一二十日换手:SUM(换手,120);
STICKLINE(C =O,C,O,3,0),COLOR000045;
STICKLINE(C =O,C,O,2.5,0),COLOR000065;
STICKLINE(C =O,C,O,2,0),COLOR000085;
STICKLINE(C =O,C,O,1.5,0),COLOR0000A5;
STICKLINE(C =O,C,O,1,0),COLOR0000C5;
STICKLINE(C =O,C,O,0.5,0),COLOR0000E5;
STICKLINE(C =O,H,L,0,0),COLOR0000F5;
STICKLINE(C O,C,O,3,0),COLOR353500;
STICKLINE(C O,C,O,2.5,0),COLOR454500;
STICKLINE(C O,C,O,2,0),COLOR555500;
STICKLINE(C O,C,O,1.5,0),COLOR656500;
STICKLINE(C O,C,O,1,0),COLOR757500;
STICKLINE(C O,C,O,0.5,0),COLOR858500;
STICKLINE(C O,H,L,0,0),COLOR959500;
AAA:=(3*C+H+L+O)/6;
VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
DRAWBAND(VAR1,RGB(155,50,50),VAR6,RGB(250,250,0));
:VAR1,COLORWHITE;
:VAR6,COLORYELLOW;
下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;
TJ1:=VOL=HHV(VOL,10)ANDVOL 2*REF(VOL,1)ANDCLOSE VAR1;
立桩量:=FILTER(TJ1,5);
TJ2:=IF(BARSLAST(立桩量)=1ANDCLOSE REF(HIGH,1),1,IF(BARSLAST(立桩量)=2ANDCLOSE REF(HIGH,2),1,IF(BARSLAST(立桩量)=3ANDCLOSE REF(HIGH,3),1,0)));
:=TJ2=1;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;
STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;
TJ3:=IF(BARSLAST(立桩量)=1ANDCLOSE REF(LOW,1),1,IF(BARSLAST(立桩量)=2ANDCLOSE REF(LOW,2),1,IF(BARSLAST(立桩量)=3ANDCLOSE REF(LOW,3),1,0)));
三天法则:=TJ3=1;
成立:=三天法则AND突破;
条件成立:=FILTER(成立,3);
DRAWTEXT(条件成立,L*0.99,'成立'),COLORYELLOW;
通达信立桩量指标公式截图