以下是通达信擒牛指标公式源码
通达信中线擒牛指标公式源码:
LC:=REF(CLOSE,1);
1:=SMA(maX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
G:=BArslAst(crOSS(RSI1,RSI2))/2+28;
XG1:RSI1
XG2:G RSI1;
DRAWICON(CROSS(XG1,XG2),XG1,1);
DRAWICON(RSI1 80,XG1,12);
天数:=30;
XA_1:=FINANCE(1)/100000000;
XA_2:=AMOUNT//100;
XA_3:=XA_1*XA_2;
XA_4:=FINVALUE(276)/100000000;
XA_5:=XA_3/XA_4;
滚动市盈率:IF(XA_5/REF(XA_5,1) 0.88,REF(XA_5,1),XA_5),COLORLImaGENTA,LINETHICK2;
高估区:HHV(滚动市盈率,天数);
低估区:LLV(滚动市盈率,天数);
安全边际:(高估区-低估区)/2+低估区;
NOTEXT1:IF(滚动市盈率 安全边际,滚动市盈率,DRAWNULL),COLORCYAN,LINETHICK2;
股息率:FINANCE(45),NODRAW;
XA_6:=FINVALUE(0);
XA_7:=XA_6;
XA_8:=INTPART(XA_7/10000);
XA_9:=XA_7-XA_8*10000;
XA_10:=IF(XA_9=1231,XA_8,XA_8-1);
XA_11:=FINONE(197,XA_10,1231);
XA_12:=FINONE(197,XA_10-1,1231);
XA_13:=FINONE(197,XA_10-2,1231);
XA_14:=FINONE(202,XA_10,1231);
XA_15:=FINONE(202,XA_10-1,1231);
XA_16:=FINONE(202,XA_10-2,1231);
XA_17:=FINONE(199,XA_10,1231);
XA_18:=FINONE(199,XA_10-1,1231);
XA_19:=FINONE(199,XA_10-2,1231);
近3年ROE:(XA_11+XA_12+XA_13)/3,NODRAW;
近3年毛利率:(XA_14+XA_15+XA_16)/3,NODRAW;
近3年净利率:(XA_17+XA_18+XA_19)/3,NODRAW;
TJ1:=REF(CROSS(MA(C,5),C),1)ANDCROSS(C,MA(C,5));
TJ2:=REF(CROSS(MA(C,10),C),1)ANDCROSS(C,MA(C,10));
TJ3:=REF(CROSS(MA(C,20),C),1)ANDCROSS(C,MA(C,20));
TJ4:=TJ1ORTJ2ORTJ3;
TJ5:=REF(C,2)/REF(C,1) =1.045ANDREF(C,1) REF(O,1)ANDC/REF(C,1) 1.09ANDC=HANDTJ4;
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
中线:=EMA(X,13);
KKA:=EMA(C,5);
KKB:=EMA(KKA,8);
KKC:=EMA(KKB,13);
1:=EMA(KKC,50);
KAAA3:=REF(C,1) REF(中线,1)ANDC
KBBB3:=C/REF(C,1) 1+0.01*9.00;
KCCC3:=中线/长线1 1+0.01*20.00;
擒大牛:KAAA3ANDKBBB3ANDKCCC3ANDTJ5;
通达信中线擒牛指标公式截图