大智慧高级箱体指标公式
bbi:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,colorwhite,linethick2; ebbi:(ema(c,6)+ema(c,18)+ema(c,54)+ema(c,162))/4,colorff00ff,linethick2; DRAWTEXT(cross(bbi,ebbi),l-0.13,'太牛啦'),coloryellow;
DRAWTEXT(CROSS(zig(3,10),REF(ZIG(3,10),1)),LOW*0.99,'←买入') , COLORRED; DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.008,'←走人'),colorgreen;
NN:= DISPstATUS=2;
A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);
B1:=FILTER(A1,3);
C1:=BacKSET(B1,3+1);
D1:=FILTER(C1,3);
A2:=REF(LOW,3)=LLV(LOW,2*3+1);
B2:=FILTER(A2,3);
C2:=BACKSET(B2,3+1);
D2:=FILTER(C2,3);
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT(D1 AND E1=E2));
X1:=REF(BArslAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H1,X2)>0,HHVBARS(IF(H1,HIGH,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
UU:=BACKSET(BARSTATUS,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
UU2:=BACKSET(BARSTATUS,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
前一低支撑:REF(L,BARSLAST(VV)),PRECIS2,COLOR99FF66,LINETHICK1,DOTLINE;
箱体下沿:REF(L,BARSLAST(XX)),ColorFFFF00,PRECIS2;
前一高压力:REF(H,BARSLAST(VV2)),PRECIS2,COLOR99FF66,LINETHICK1,DOTLINE;
箱体上沿:REF(H,BARSLAST(XX2)),PRECIS2,Color00FFFF;
DRAWTEXT(nn,前一低支撑,'前一低支撑: '+NUMTOSTRN(前一低支撑,2)+'元'),ALIGN2,Color00dd00,VALIGN0;
DRAWTEXT(nn,前一高压力,'前一高压力: '+NUMTOSTRN(前一高压力,2)+'元'),ALIGN2,Color00dd00,VALIGN2;
DRAWTEXT(nn,箱体下沿,'箱体下沿: '+NUMTOSTRN(箱体下沿,2)+'元'),ALIGN2,ColorFFFF00,LINETHICK1,VALIGN0;
DRAWTEXT(nn,箱体上沿,'箱体上沿: '+NUMTOSTRN(箱体上沿,2)+'元'),ALIGN2,Color00FFFF,LINETHICK1,VALIGN2;
Y:=(HIGH+LOW)/2;
ao:=MA(Y,5)-MA(Y,21);
DU0:=CROSS(AO,0);
UD0:=CROSS(0,AO);
TDU0:=BARSLAST(DU0);
TUD0:=BARSLAST(UD0);
DU3:=REF(DU0,1);
UD3:=REF(UD0,1);
TDU3:=BARSLAST(DU3);
TUD3:=BARSLAST(UD3);
劫:IF(TDU3<TUD3,REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3)),COLORFF0033,LINETHICK4;
赢:=MA(C,1);
在:=SMA(SMA(SMA(赢,2,1),2,1),2,1);
龙:=MA(在,3);
FILLRGN(在,龙,在>=龙),Color0000FF;
FILLRGN(在,龙,在<龙),color00FF00;
W1:=C=HHV(C,10);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
ZHUIA:=W4 AND COUNT(W4,5)=1;
STICKLINE(ZHUIA>0,O,C,3,0),COLORYELLOW;
{指标网-股票公式网站www.zbgs123.com}
ma2:=sum(AMOUNT/100,2)/sum(v,2);
ma3:=sum(AMOUNT/100,3)/sum(v,3);
ma4:=sum(AMOUNT/100,4)/sum(v,4);
ma5:=sum(AMOUNT/100,5)/sum(v,5);
ma6:=sum(AMOUNT/100,6)/sum(v,6);
ma7:=sum(AMOUNT/100,7)/sum(v,7);
ma8:=sum(AMOUNT/100,8)/sum(v,8);
ma9:=sum(AMOUNT/100,9)/sum(v,9);
ma10:=sum(AMOUNT/100,10)/sum(v,10);
ma11:=sum(AMOUNT/100,11)/sum(v,11);
ma12:=sum(AMOUNT/100,12)/sum(v,12);
ma13:=sum(AMOUNT/100,13)/sum(v,13);
ma14:=sum(AMOUNT/100,14)/sum(v,14);
ma15:=sum(AMOUNT/100,15)/sum(v,15);
ma16:=sum(AMOUNT/100,16)/sum(v,16);
ma17:=sum(AMOUNT/100,17)/sum(v,17);
ma18:=sum(AMOUNT/100,18)/sum(v,18);
ma19:=sum(AMOUNT/100,19)/sum(v,19);
a:max(ma2,max(ma3,max(ma4,max(ma5,max(ma6,max(ma7,max(ma8,max(ma9,max(ma10,max(ma11,max(ma12,max(ma13,max(ma14,max(ma15,max(ma16,max(ma17,max(ma18,ma19))))))))))))))))),LINETHICK0;
DRAWICON(cross(c,a),l ,6);