【通达信】MA24均价(均线斜、活跃度、涨家数、跌家数)-指标公式源码
MA5:MA(C,5);
MA13:MA(C,13);
MA24:MA(C,24),COLORBLUE,LINETHICK3;
MA72:MA(C,72)LINETHICK2;
MA133:MA(C,133)LINETHICK2;
MA200:MA(C,200)LINETHICK2;
MA250:MA(C,250)COLORLICYAN,LINETHICK2;
MA480:MA(C,480)COLORRED,LINETHICK2;
X1:=EMA(C,24);
X2:=REF(X1,1);
廿四日均线斜率:(X1-X2)/X2*100,NODRAW;
活跃度:IF(DATE>1000101,(MA(VOL,11)+MA(VOL,11*2)+MA(VOL,11*3)+MA(VOL,11*4))/4/CAPITAL*1000,1),NODRAW;
买:IF(MA24>REF(MA24,1),MA24,DRAWNULL),COLORMAGENTA,LINETHICK3;
卖:IF(MA24<REF(MA24,1),MA24,DRAWNULL),COLORFFA042,LINETHICK3;
买1:IF(MA72>REF(MA72,1),MA72,DRAWNULL),COLORGREEN,LINETHICK2;
卖2:IF(MA72<REF(MA72,1),MA72,DRAWNULL),COLOR00DDFF,LINETHICK2;
N:=10;
T1:=CONST(HHVBARS(V,N));
T0:IF(CURRBARSCOUNT<=N+7,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL);
IF(CURRBARSCOUNT=T1+1,T0,DRAWNULL),CIRCLEDOT;
DRAWTEXT(ISLASTBAR,T0,' 量能评台');
涨家数:INDEXADV,COLOR0066FF,NODRAW;
跌家数:INDEXDEC,COLOR99FF99,NODRAW;
量能饱和度:IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100),NODRAW;
DK:=MA24;
STICKLINE(DK<=C AND CLOSE>=OPEN,HIGH,LOW,0,1),COLORRED;
STICKLINE(DK<=C AND CLOSE>=OPEN,CLOSE,OPEN,3.2,0),COLOR000044;
STICKLINE(DK<=C AND CLOSE>=OPEN,CLOSE,OPEN,2.7,0),COLOR000033;
STICKLINE(DK<=C AND CLOSE>=OPEN,CLOSE,OPEN,2.1,0),COLOR000055;
STICKLINE(DK<=C AND CLOSE>=OPEN,CLOSE,OPEN,1.5,0),COLOR000077;
STICKLINE(DK<=C AND CLOSE>=OPEN,CLOSE,OPEN,0.9,0),COLOR000099;
STICKLINE(DK<=C AND CLOSE>=OPEN,CLOSE,OPEN,0.3,0),COLORLIMAGENTA;
STICKLINE(DK<=C AND CLOSE<OPEN,HIGH,LOW,0,1),COLORGREEN;
STICKLINE(DK<=C AND CLOSE<OPEN,CLOSE,OPEN,3.2,0),COLOR003300;
STICKLINE(DK<=C AND CLOSE<OPEN,CLOSE,OPEN,2.7,0),COLOR005500;
STICKLINE(DK<=C AND CLOSE<OPEN,CLOSE,OPEN,2.1,0),COLOR007700;
STICKLINE(DK<=C AND CLOSE<OPEN,CLOSE,OPEN,1.5,0),COLOR009900;
STICKLINE(DK<=C AND CLOSE<OPEN,CLOSE,OPEN,0.9,0),COLOR00CC00;
STICKLINE(DK<=C AND CLOSE<OPEN,CLOSE,OPEN,0.3,0),COLOR00CC00;
STICKLINE(DK>C AND CLOSE>=OPEN,HIGH,LOW,0,1),COLORGREEN;
STICKLINE(DK>C AND CLOSE>=OPEN,CLOSE,OPEN,3.2,0 ),COLORA200A2;
STICKLINE(DK>C AND CLOSE>=OPEN,CLOSE,OPEN,2.7,0 ),COLORCE00CE;
STICKLINE(DK>C AND CLOSE>=OPEN,CLOSE,OPEN,2.1,0),COLORE800E8;
STICKLINE(DK>C AND CLOSE>=OPEN,CLOSE,OPEN,1.5,0 ),COLORFF00FF;
STICKLINE(DK>C AND CLOSE>=OPEN,CLOSE,OPEN,0.9,0 ),COLORFF60FF;
STICKLINE(DK>C AND CLOSE>=OPEN,CLOSE,OPEN,0.3,0 ),COLORFFD2FF;
STICKLINE(DK>C AND CLOSE<OPEN,HIGH,LOW,0,1),COLORCYAN;
STICKLINE(DK>C AND CLOSE<OPEN,CLOSE,OPEN,3.2,0 ),COLOR555555;
STICKLINE(DK>C AND CLOSE<OPEN,CLOSE,OPEN,2.7,0 ),COLOR777777;
STICKLINE(DK>C AND CLOSE<OPEN,CLOSE,OPEN,2.1,0 ),COLOR999999;
STICKLINE(DK>C AND CLOSE<OPEN,CLOSE,OPEN,1.5,0 ),COLOR999999;
STICKLINE(DK>C AND CLOSE<OPEN,CLOSE,OPEN,0.9,0 ),COLORDDDDDD;
STICKLINE(DK>C AND CLOSE<OPEN,CLOSE,OPEN,0.3,0 ),COLORFFFFFF; |