炒股指标

显示 收起

通达信顶底捕捉指标公式

通达信顶底捕捉指标公式:

N:=3;E2:=10;E3:15;E4:-15;
MAN:=MA(C,N);MA10:=MA(C,10);MA20:=MA(C,20);MA30:=MA(C,30);MA60:=MA(C,60);
D1:=(MAN-MA10)/MIN(MAN,MA10);
D2:=(MAN-MA20)/MIN(MAN,MA20);
D3:=(MAN-MA30)/MIN(MAN,MA30);
D5:=(MA20-MA10)/MIN(MA20,MA10);
D6:=(MA30-MA10)/MIN(MA30,MA10);
D8:=(MA20-MA30)/MIN(MA20,MA30);
DA:=MA(MAX(MAX(MAX(D1,D2),MAX(D3,D5)),MAX(D6,D8))*100,2);
DB:=MA(MIN(MIN(MIN(D1,D2),MIN(D3,D5)),MIN(D6,D8))*100,2);
GJ:=(2*C+H+L)/4;
顶:=DA>10 AND GJ>MA30 AND REF(DA,1)>MAX(REF(DA,2),DA);
底:=DB<-10 AND GJ<MA30 AND REF(DB,1)<MIN(REF(DB,2),DB);
DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(DB<-10 AND GJ<MA30)))=1,DB*1.1,'底1'),COLORMAGENTA;
DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(DB<-10 AND GJ<MA30)))=2,DB*1.1,'底2'),COLORMAGENTA;
DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(DB<-10 AND GJ<MA30)))=3,DB*1.1,'底3'),COLORMAGENTA;
DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(DB<-10 AND GJ<MA30)))=4,DB*1.1,'底4'),COLORMAGENTA;
DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(DB<-10 AND GJ<MA30)))=5,DB*1.1,'底5'),COLORMAGENTA;
DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(DB<-10 AND GJ<MA30)))=6,DB*1.1,'底6'),COLORMAGENTA;
DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(DA>10 AND GJ>MA30)))=1,DA*1.1,'顶1'),COLORCYAN;
DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(DA>10 AND GJ>MA30)))=2,DA*1.1,'顶2'),COLORCYAN;
DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(DA>10 AND GJ>MA30)))=3,DA*1.1,'顶3'),COLORCYAN;
DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(DA>10 AND GJ>MA30)))=4,DA*1.1,'顶4'),COLORCYAN;
DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(DA>10 AND GJ>MA30)))=5,DA*1.1,'顶5'),COLORCYAN;
DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(DA>10 AND GJ>MA30)))=6,DA*1.1,'顶6'),COLORCYAN;
STICKLINE(DB<-10 AND GJ<MA30,DB,-5,1,0),RGB(0,255,0);
STICKLINE(DA>10 AND GJ>MA30,DA,5,1,0),RGB(255,0,0);
STICKLINE(C,5,-5,15,0),RGB(80,80,80);

通达信顶底捕捉指标公式实例图解:

通达信顶底捕捉指标公式