以下是通达信主图牛启动指标公式(无源码的请下载附件导入)
NJ:=27;P1J:=3;P2J:=3;
RSVJ:=(C-LLV(L,NJ))/(HHV(H,NJ)-LLV(L,NJ))*100;
KJ:=SMA(RSVJ,P1J,1);
DJ:=SMA(KJ,P2J,1);
JJ:=3*KJ-2*DJ;
RAV5Q:=SMA(((C-LLV(L,9))/(HHV(H,9)-LLV(L,9)))*100,3,1);
短线:=(3*RAV5Q-2*SMA(RAV5Q,3,1))*1.1;
RSVSK:=(C-LLV(L,20))/(HHV(H,20)-LLV(L,20))*100;
长线2:=3*SMA(RSVSK,8,1)-2*SMA(SMA(RSVSK,8,1),7,1);
云端2:=IF(C/REF(C,1)>1.050 AND HIGH/C<1.010 AND IF(C>REF(C,1),88,0)>0, 91, 0);
DX:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
VAR1T:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
VAR2T:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
VAR3T:=(SMA(VAR2T,3,1)-18)*1.55;
VAR4T:=SMA(VAR3T,3,1);
VAR5T:=(C-LLV(L,100))/(HHV(H,100)-LLV(L,100))*100;
VAR6T:=SMA(VAR5T,10,1);
VAR7T:=(EMA(SMA(VAR6T,8,1),34)-25)*2.6;
VAR8T:=POW(MA(C,5),2)+MA(C,5);
VAR9T:=POW(MA(L,5),2)+MA(L,5);
VARAT:=POW(MA(H,5),2)+MA(H,5);
VARBT:=((VAR8T-LLV(VAR9T,64))/(HHV(VARAT,64)-LLV(VAR9T,64))*150+65-10)/2;
VARCT:=SMA(VARBT,3,1)*1.5-46;
VARDT:=SMA(VARCT,3,1);
VARET:=3*VARCT-2*VARDT;
VARFT:=(VAR1T+VAR2T+VAR5T)/3;
VAR10T:=((VAR3T+VAR3T+VAR6T+VARCT)/4-15)*1.67;
VAR11T:=((VAR4T+VAR4T+VAR7T+VARDT)/4-15)*1.67;
VAR12T:=((VAR1T+VAR5T*2+VARFT+VAR10T+VAR11T+VARBT+VARCT+VARDT+VARET)/10-15)*1.67;
VAR13T:=(HHV(H,5)-C)/(HHV(H,5)-LLV(L,5))*(-1)+0.9;
VAR14T:=(HHV(H,10)-C)/(HHV(H,10)-LLV(L,10))*(-1)+0.92;
VAR15T:=(HHV(H,15)-C)/(HHV(H,15)-LLV(L,15))*(-1)+0.93;
VAR16T:=(HHV(H,55)-C)/(HHV(H,55)-LLV(L,55))*(-1)+0.94;
VAR17T:=(HHV(H,89)-C)/(HHV(H,89)-LLV(L,89))*(-1)+0.95;
VAR18T:=(HHV(H,120)-C)/(HHV(H,180)-LLV(L,180))*(-1)+0.96;
VAR19T:=(HHV(H,180)-C)/(HHV(H,180)-LLV(L,180))*(-1)+0.96;
VAR1AT:=((VAR13T*8+VAR14T*8+VAR15T*8+VAR16T+VAR17T+VAR18T+VAR19T)/28-0.1)*185;
VAR1BT:=SMA(VAR1AT,3,1);
VAR1CT:=(SMA(VAR1BT,8,1)-8)*1.18;
浮筹1:=(VAR10T+VAR11T+VAR12T+VARCT+VARDT+VARET+VAR1CT+VAR7T)/13;
浮筹2:=(VAR10T+VAR11T+VAR12T+VARCT+VARDT+VARET+VAR1CT+VAR7T)/21;
浮筹3:=(VAR10T+VAR11T+VAR12T+VARCT+VARDT+VARET+VAR1CT+VAR7T)/34;
RSI57:=((SMA(MAX((C - REF(C,1)),0),5,1) / SMA(ABS((C - REF(C,1))),5,1)) * 100);
TR1:=SUM(MAX(MAX((H - L),ABS((H - REF(C,1)))),ABS((L - REF(C,1)))),10);
HD:=(H - REF(H,1));
LD:=(REF(L,1) - L);
DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);
PDI:=((DMP * 100) / TR1);
MDI:=((DMM * 100) / TR1);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI57);
WR10:=((100 * (HHV(H,10) - C)) / (HHV(H,10) - LLV(L,10)));
多方趋势:=((7)*(SMA(((C-LLV (L,27))/(HHV(H,27)-LLV(L,27)))*30,4,1))-(3)*(SMA(SMA(((C-LLV(L,27))/(HHV(H,27)-LLV(L,27)))*30,4,1),3,1))-SMA(SMA(SMA(((C-LLV(L,27))/(HHV(H,27)-LLV(L,27)))*(30),4,1),3,1),2,1));
空方趋势:=(EMA(MA(多方趋势,5),7));
AA9:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5;
BB9:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5;
TJ0:=CROSS(EMA(AA9,2),EMA(BB9,5));
TJ1:=CROSS(EMA(C,3),EMA(C,5));
TJ2:=EMA(C,3)>REF(EMA(C,3),1);
BB5:=ATAN(EMA((C+L+H)/3,5)-REF(EMA((C+L+H)/3,5),1))*3.1416*10;
TJ3:=BB5>1 AND EMA((C+L+H)/3,5)>REF(EMA((C+L+H)/3,3),1);
DRAWTEXT(TJ1 AND TJ2 AND TJ0 AND TJ3 AND 短线<100 AND 空方趋势>REF(空方趋势,1) AND 空方趋势>20 AND JJ>REF(JJ,1)
AND JJ>5,L*0.98,'牛启动'),COLORWHITE;
DRAWTEXT(TJ1 AND TJ2 AND TJ0 AND TJ3 AND CROSS((RSI57 + ADX) + RSI57-WR10,0) AND JJ>REF(JJ,1),L*0.93,'大牛'),COLORWHITE;
J6:=(3*EMA((C-LLV(L,18))/(HHV(H,18) - LLV(L,18))*100,3)-2*EMA(EMA((C-LLV(L,18))/(HHV(H,18) - LLV(L,18))*100,3),3));
反转:=IF(FILTER(REF(COUNT(J6<REF(J6,1),5)>=3,1) AND REF(J6,1)<20 AND J6>REF(J6,1),3),30,0);
STICKLINE(反转,O,C,6,0),COLORBLUE;
V33:=(C-LLV(L,8))/(HHV(H,8)-LLV(L,8))*100;
抄底:=(IF(SMA(V33,2,1)>REF(SMA(V33,2,1),1) AND REF(SMA(V33,2,1),1)<REF(SMA(V33,2,1),2) AND SMA(V33,2,1)<23 ,1.5,0))*80;
STICKLINE(抄底,L,H,7,0),COLORBLUE;
KS:=SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1);
DS:=SMA(KS,3,1);
JS:=3*KS-2*DS;
STICKLINE(CROSS(JS,REF(JS+0.01,1)) AND LLV(JS,2)=LLV(JS,8) AND JS<20,L,H,4,0),COLORYELLOW;
DBX:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6);
买DD:=IF(LLV(DBX,2)=LLV(DBX,7) AND COUNT(DBX<0,2) AND CROSS(DBX,MA(DBX,2)),1,0);
DRAWTEXT(FILTER(买DD=1,5) AND (反转 OR 抄底) ,L*0.99,'B'),COLORWHITE;
DRAWTEXT(FILTER(买DD=1,5) AND (TJ1 AND TJ2 AND TJ0 AND TJ3 AND 买 AND FILTER(云端2>1,5)) ,L*0.99,'B'),COLORYELLOW;
DRAWTEXT(FILTER(买DD=1,5) AND (TJ1 AND TJ2 AND TJ0 AND TJ3 AND CROSS((RSI57 + ADX) + RSI57-WR10,0) AND JJ>REF(JJ,1)) ,L*0.99,'B'),COLORRED;
712499959.png
|