龙吻买法 TRT选股
variable:p1=0;
c1:=INTPART(cyc(5)*100*0.96)/100;
p2:=intpart(ref(cyc(5),1)*100)/100;
p3:=intpart(ref(cyc(5),1)*0.96*100)/100;
vv:=intpart(min(capital*0.05,ref(ma(vol,34),1))/100);
p40:=intpart(maxcyc*100)/100;
p41:=intpart(ref(MAXCYC,1)*100)/100;
p4:=p1=0 and c>p2 or (ref(vol/100,1)<vv and c>intpart(p2*0.98*100)/100 and vol>min(capital*0.05,ref(ma(vol,34),1)));
p5:=p1=1 and c<min(p3,p41);
p1:=if(p4=1,1,if(p5=1,0,ref(p1,1)));
STICKLINE(p1=1 and c<o,c,o,8,1),color5454ff,layer0;
STICKLINE(p1=1 and c<o,c,o,6,0),colorffff54;
STICKLINE(p1=1 and c<o,c,l,0.5,0),color5454ff;
STICKLINE(p1=1 and c<o,h,o,0.5,0),color5454ff;
STICKLINE(p1=0 and c>o,c,o,8,1),colorffff54;
STICKLINE(p1=0 and c>o,c,h,0.5,0),colorffff54;
STICKLINE(p1=0 and c>o,l,o,0.5,0),colorffff54;
DRAWTEXT(cross(p1,0),l*0.97,'买入'),colorred,LINETHICK3;
DRAWTEXT(cross(1,p1),h*1.03,'卖出'),COLORgreen,LINETHICK3;
DRAWFLAGTEXT(p1=0 and (c1*0.98-c)/c>0.1,c,'持币');
DRAWFLAGTEXT(p1=0 and (c1*0.98-c)/c<=0.1 and ref(vol/100,1)<vv,c,'明日收盘价超过'+str(c1)+';或收盘价超过'+str(intpart(c1*0.98*100)/100)+'且成交量大于'+str(vv)+'买入');
DRAWFLAGTEXT(p1=0 and (c1*0.98-c)/c<=0.1 and ref(vol/100,1)>=vv,c,'明日收盘价超过'+str(c1)+'买入');
DRAWFLAGTEXT(p1=1 and (c-min(c1,p40))/min(c1,p40)>0.1 ,c,'持股');
DRAWFLAGTEXT(p1=1 and (c-min(c1,p40))/min(c1,p40)<=0.1 ,c,'明日收盘价跌破'+str(min(c1,p40))+'卖出');;
A:=MA(CLOSE,5);
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,COLORRED;
马线:MA(牛线,5),COLORGREEN;
VAR0:=SMA(MAX(CLOSE-REF(C,1),0),12,1)/SMA(ABS(CLOSE-REF(C,1)),15,1)*100;
决策线:EMA((MA(CLOSE,5)),3),colorGreen;
PARTLINE(决策线,决策线 > (REF(决策线,3)),RGB(255,0,0)),linethick5,colorRed;
DRAWTEXTABS(10,10,STKLABEL+' '+STKNAME+' '+BKNAME),COLOR00FFFF;
现价:=C;
底部:=COST(5);
买入:= COST(30);
卖出:= COST(75);
{顶部: COST(95),COLORFF00FF;}
TJ:=(L<= 马线) AND (C>=马线) AND (C<O<A) AND (L<=A) AND (A>=马线);
STICKLINE(TJ,H,L,0.5,0),COLORYELLOW;
STICKLINE(TJ,O,C,4,0),COLORYELLOW;
DRAWTEXT(CROSS(C,买入),买入,'龙吻'),COLORCYAN;
FILLRGN(牛线,马线,牛线>马线,RGB(255,255,0),牛线<马线,RGB(0,0,255));
量能:=WINNER(CLOSE);
MA1:=MA(量能,M1);
MA2:=MA(量能,M2);
突破线:=MA(量能,M3);
均量:=(MA1+MA2)/2;
DRAWTEXT(CROSS(均量,突破线),l,'量价齐升'),COLORYELLOW;
MA20:=MA(CLOSE,20);
MA120:=MA(CLOSE,120);
MA30:=MA(CLOSE,37);
MAP:=MA(CLOSE,8);
AA5:=MA(CLOSE,21);
AA10:MA(CLOSE,8),colorffffff;
AA12:MA(CLOSE,12),color0000FF;
BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);
BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);
MA13:=MA(CLOSE,13);
VVAR1:=((((OPEN + LOW) + HIGH) + CLOSE) / 4);
{N 24 1 100 1}
aa:=N;
A1:=REF(H,aa)=HHV(H,2*aa); B1:=FILTER(A1,aa); C1:=BACKSET(B1,aa);
D1:=FILTER(C1,aa);A2:=REF(L,aa)=LLV(L,2*aa); B2:=FILTER(A2,aa);
C2:=BACKSET(B2,aa); D2:=FILTER(C2,aa);
R1:=BACKSET(DISPSTATUS=2,BARSLAST(D1)+1); S1:=R1>REF(R1,1);
T1:=BACKSET(DISPSTATUS=2,BARSLAST(D2)+1); U1:=T1>REF(T1,1);
R2:=BACKSET(S1,REF(BARSLAST(D1),1)+2); S2:=R2>REF(R2,1);
T2:=BACKSET(U1,REF(BARSLAST(D2),1)+2); U2:=T2>REF(T2,1);
R3:=BACKSET(S2,REF(BARSLAST(D1),1)+2); S3:=R3>REF(R3,1);
T3:=BACKSET(U2,REF(BARSLAST(D2),1)+2); U3:=T3>REF(T3,1);
R4:=BACKSET(S3,REF(BARSLAST(D1),1)+2); S4:=R4>REF(R4,1);
T4:=BACKSET(U3,REF(BARSLAST(D2),1)+2); U4:=T4>REF(T4,1);
DRAWLINE(S2,H,S1,H,1),Colorff0033;
DRAWLINE(U2,L,U1,L,1),LINETHICK2,POINTDOT,Colorffff00;
DRAWLINE(S3,H,S2,H,1),Color008833;
DRAWLINE(U3,L, U2,L,1),LINETHICK3,POINTDOT,Color338833;
DRAWLINE(S4,H,S3,H,1),Color00CCCC;
DRAWLINE(U4,L, U3,L,1),LINETHICK5,Color0000CC; |