以下是通达信小平台选股及画线公式
通达信小平台选股及画线公式
源码
TJ1:=MAX(C,O)<REF(MAX(C,O),1) AND H>=REF(MAX(C,O),1) AND REF(H>MAX(C,O),1);
TJ2:=MAX(C,O)>REF(MAX(C,O),1) AND MAX(C,O)<=REF(H,1) AND H>MAX(C,O);
TJ:=TJ1 OR TJ2;
TJ3:=MAX(C,O)<REF(MAX(C,O),2) AND H>=REF(MAX(C,O),2);
TJ4:=MAX(C,O)>REF(MAX(C,O),2) AND MAX(C,O)<=REF(H,2) AND H>MAX(C,O);
TJA:=(TJ3 OT TJ4) AND TJ;
T:=BARSLAST(REF(TJ,1) AND TJA);
QF:=BACKSET(T=0,3);
QFT:=BARSLAST(CROSS(QF=1,0.5));
HH:=REF(HHV(H,QFT+1),T);
A:=H<HH AND (HHV(H,QFT+1)-LLV(L,QFT+1))/LLV(L,QFT+1)*100<5;
ZD:=FILTERX(A=1,QFT+1);
ZDT:=BARSLAST(ZD);{}
N:DRAWLINE(QFT=0,REFX(HHV(H,QFT+1),BARSNEXT(ZDT=0)),ZDT=0 AND EVERY(A=1,T+1) AND QFT>2,HHV(H,QFT+1),0),COLORYELLOW;
M:DRAWLINE(QFT=0,REFX(LLV(L,QFT+1),BARSNEXT(ZDT=0)),ZDT=0 AND EVERY(A=1,T+1)AND QFT>2,LLV(L,QFT+1),0),COLORYELLOW;
STICKLINE(QFT=0,N,M,0,0),COLORYELLOW;
STICKLINE(ZDT=0 ,N,M,0,0),COLORYELLOW;
DRAWTEXT(T=0,N*1.02,’3K’),COLORYELLOW;
选股
TJ1:=MAX(C,O)<REF(MAX(C,O),1) AND H>=REF(MAX(C,O),1) AND REF(H>MAX(C,O),1);
TJ2:=MAX(C,O)>REF(MAX(C,O),1) AND MAX(C,O)<=REF(H,1) AND H>MAX(C,O);
TJ:=TJ1 OR TJ2;
TJ3:=MAX(C,O)<REF(MAX(C,O),2) AND H>=REF(MAX(C,O),2);
TJ4:=MAX(C,O)>REF(MAX(C,O),2) AND MAX(C,O)<=REF(H,2) AND H>MAX(C,O);
TJA:=(TJ3 OT TJ4) AND TJ;
T:=BARSLAST(REF(TJ,1) AND TJA);
QF:=BACKSET(T=0,3);
QFT:=BARSLAST(CROSS(QF=1,0.5));
HH:=REF(HHV(H,QFT+1),T);
A:=H<HH AND (HHV(H,QFT+1)-LLV(L,QFT+1))/LLV(L,QFT+1)*100<5;
ZD:=FILTERX(A=1,QFT+1);
ZDT:=BARSLAST(ZD);
N:=DRAWLINE(QFT=0,REFX(HHV(H,QFT+1),BARSNEXT(ZDT=0)),ZDT=0 AND EVERY(A=1,T+1) AND QFT>2,HHV(H,QFT+1),0),COLORYELLOW;
N!=DRAWNULL;
评论(0)