资金趋势主图,不错
源码
G3:EMA(C, 3), COLORRED;
G5:EMA(C, 5), COLORGREEN;
G8:EMA(C, 8), COLORGREEN;
G12:EMA(C, 12), COLORGREEN;
G15:EMA(C, 15), COLORRED;
K30:EMA(C,30), COLORBLUE;
K35:EMA(C,35), COLORBLUE;
K40:EMA(C,40), COLORBLUE;
K45:EMA(C,45), COLORBLUE;
K50:EMA(C,50), COLORBLUE;
K60:EMA(C,60), COLORBLUE;
K3:=EMA(C,3);
K5:=EMA(C,5);
K8:=EMA(C,8);
K13:=EMA(C,13);
K15:=EMA(C,15);
DTQS := K30 > K35 AND K35 > K40 AND K40 > K45 AND K45 > K50 AND K50 > K60;
KTQS := K30 < K35 AND K35 < K40 AND K40 < K45 AND K45 < K50 AND K50 < K60;
NOQS := NOT(DTQS OR KTQS);
DRAWTEXT(DTQS AND CROSS(K3 ,K15) ,H+0.2,'卖出');
DRAWTEXT( CROSS(K15 ,K3) ,L,'买入');
DRAWTEXT(KTQS AND CROSS(K15 ,K3) ,L,'买入'),colorwhite;
DRAWTEXT( CROSS(K3 ,K15) ,H+0.3,'卖出'),coloryellow;
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+
15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+
5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,
linethick2,COLORyellow;
马线:MA(牛线,6),linethick2,COLORwhite;
PARTLINE(牛线,牛线>REF(牛线,1)),Colorff00ff,LINETHICK2,LAYER0;
PARTLINE(马线,马线>REF(马线,1),RGB(255,0,0),马线<REF(马线,1),RGB(0,255,0)),LINETHICK2;
if DISPSTATUS=2 then aaa:=BARPOS;
if DISPSTATUS=1 then bbb:=BARPOS;
ddd:=aaa-bbb;
ee:=hhv(h,ddd);
MSTATUS:=BARSTATUS=2;
{箱体空间}
NN:= DISPSTATUS=2;
A1p:=REF(HIGH,3)=HHV(HIGH,2*3+1);
B1p:=FILTER(A1p,3);
C1p:=BACKSET(B1p,3+1);
D1p:=FILTER(C1p,3);
A2p:=REF(LOW,3)=LLV(LOW,2*3+1);
B2p:=FILTER(A2p,3);
C2p:=BACKSET(B2p,3+1);
D2p:=FILTER(C2p,3);
E1p:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;
E2p:=(HIGH+LOW)/2;
H1p:=(D1p AND NOT(D2p AND E1p>=E2p)) OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
L1p:=(D2p AND NOT(D1p AND E1p=E2p));
X1p:=REF(BARSLAST(H1p),1)+1;
F1p:=BACKSET(H1p AND COUNT(L1p,X1p)>0,LLVBARS(IF(L1p,LOW,10000),X1p));
G1p:=F1p>REF(F1p,1);
I1p:=BACKSET(G1p,2);
LDp:=I1p>REF(I1p,1);
L2p:=LDp OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
X2p:=REF(BARSLAST(L2p),1)+1;
F2p:=BACKSET(L2p AND COUNT(H1p,X2p)>0,HHVBARS(IF(H1p,HIGH,0),X2p));
G2p:=F2p>REF(F2p,1);
I2p:=BACKSET(G2p,2);
HDp:=I2p>REF(I2p,1);
UUp:=BACKSET(BARSTATUS,BARSLAST(LDp)+1);
VVp:=UUp>REF(UUp,1);
WWp:=BACKSET(VVp,REF(BARSLAST(LDp),1)+2);
XXp:=WWp>REF(WWp,1);
UU2p:=BACKSET(BARSTATUS,BARSLAST(HDp)+1);
VV2p:=UU2p>REF(UU2p,1);
WW2p:=BACKSET(VV2p,REF(BARSLAST(HDp),1)+2);
XX2p:=WW2p>REF(WW2p,1);
前一低支撑:REF(L,BARSLAST(VVp)),PRECIS2,COLOR99FF66,LINETHICK1,DOTLINE;
箱体下沿:REF(L,BARSLAST(XXp)),ColorFFFF00,PRECIS2;
前一高压力:REF(H,BARSLAST(VV2p)),PRECIS2,COLOR99FF66,LINETHICK1,DOTLINE;
箱体上沿:REF(H,BARSLAST(XX2p)),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;
{缺口}
STICKLINE(l>ref(h,1),l,ref(h,1),30,1),pointdot,COLORRED;
STICKLINE(h<ref(l,1),h,ref(l,1),30,1),pointdot,colorgreen;