通达信献精品决策 本人珍藏成功率极高的金牛自动射线指标源码
2017-11-19原创 编 辑:翔博软件
公式源码:
{MACD}
DIF:EMA(CLOSE,12) - EMA(CLOSE,26),COLOR00FFFF;
DEA:EMA(DIF,9),COLORWHITE,NODRAW,LINETHICK2;
MACD:2*(DIF-DEA),COLORRED,NODRAW;
{乖离率}
乖离率:(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100,COLORGREEN,NODRAW,LINETHICK1;
{自动射线}
OBV:=DIF;
P:=12;
A1:=REF(OBV,P)=HHV(OBV,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);{高点1}
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
压:DRAWLINE(D1,OBV,S11,OBV,1),COLORFF7F00,DOTLINE;
AA:=REF(OBV,3)=HHV(OBV,2*3+1);
QY:=BACKSET(AA,3+1);
CC:=FILTER(QY,3) AND OBV=HHV(OBV,3+1);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
GDCS1:=CONST(DINGBUTS);
力:DRAWLINE(CURRBARSCOUNT=GDCS1,OBV,ISLASTBAR,REF(OBV,GDCS1-1),1),COLORCYAN,DOTLINE;
A2:=REF(OBV,P)=LLV(OBV,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);{低点1}
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
支:DRAWLINE(D2,OBV,U11,OBV,1),COLORLIRED,DOTLINE;
Q:=5;
AAA:=REF(OBV,Q)=LLV(OBV,2*Q+1);
BBB:=FILTER(AAA,Q);
CCC:=BACKSET(BBB,Q+1);
DDD1:=FILTER(CCC,Q);
T12:=BACKSET(ISLASTBAR,BARSLAST(DDD1)+1);
U12:=T12>REF(T12,1);
撑:DRAWLINE(DDD1,OBV,U12,OBV,1),COLORWHITE,DOTLINE;
{红绿箭头}
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DEA,2);
{DIF变色线没有未来函数}
DEA1:EMA(DIF,9),COLORWHITE,LINETHICK2;
DIF,IF(DEA1,DIF,DRAWNULL),COLOR00FFFF,LINETHICK2;
IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2;
IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
强弱:0,COLORRED;
{金牛启动}
年:=MA(CLOSE,240);
涨幅%:=(C-REF(C,1))/REF(C,1)*100;
RSVV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;
VARB2:=(RSVV/2+22)*1;
量:=EMA(VOL,13);
资金:=EMA(AMOUNT,13);
过滤:=((资金 /量) / 100);
提纯:=(((CLOSE -过滤) / 过滤) * 100);
黄金:=((提纯 < (0)) AND ZXNH);
买:=IF(黄金 AND RSVV<VARB2-2,180,0) AND 涨幅%>0 AND C<年;
DRAWTEXT(买>0,0.0001,' 买'),COLORFFFFFF;
DRAWTEXT(买>0,0.0001,'▲'),COLORFF00FF;