通達信牛金追漲買賣指標公式
- 指標類別: 通達信指標公式
- 授權(quán)方式: 免費版
- 指標評級: ★★★★★
- 指標分類: 趨勢
- 畫線方法: 副圖
- 日期:2024-09-19 來源:互聯(lián)網(wǎng)
通達信牛金追漲買賣指標公式:
VAR1:=EMA(CLOSE,17) - EMA(CLOSE,34);
動力線:=SUM(VAR1-REF(VAR1,1),5)*100;
動力1:=EMA(動力線,5),COLORRED;
動力2:=EMA(動力線,10),COLORYELLOW;
動力3:=EMA(動力線,17),COLORBLUE;
動力:=IF(動力線>0 AND 動力線>REF(動力線,1),動力線,0);
動力線HX:=IF(動力線>0 AND 動力線<=REF(動力線,1),動力線,0);
動力線LX:=IF(動力線<0 AND 動力線<REF(動力線,1),動力線,0);
動力線LS:=IF(動力線<0 AND 動力線>REF(動力線,1),動力線,0);
DRAWBAND(動力3,RGB(60,10,0),動力2,RGB(60,10,0));
DRAWBAND(動力3,RGB(6,30,40),動力2,RGB(6,30,40));
DRAWBAND(動力1,RGB(255,0,255),動力2,RGB(0,255,0));
DRAWBAND(動力1,RGB(255,10,0),動力2,RGB(0,255,10));
{趨勢}
N:=2;M:=3;
趨勢線:=SMA(EMA(((C+L)/2-LLV(L,21))/(HHV((H+C)/2,21)-LLV(L,21))*100,3),7,1)-(13),LINETHICK2,COLORF0F000;
判斷:=(SMA(((C+L)/2-LLV(L,21))/(HHV((H+C)/2,21)-LLV(L,21))*100,2,1)-8);
強勢:判斷>趨勢線,COLORRED,NODRAW;
強1:STICKLINE(強勢,32,35,4,2),COLORRED;
強2:STICKLINE(強勢,-32,-35,4,2),COLORRED;
弱勢:判斷<趨勢線,COLORLIGREEN,NODRAW;
弱1:STICKLINE(弱勢,32,35,4,2),COLORLIGREEN;
弱2:STICKLINE(弱勢,-32,-35,4,2),COLORLIGREEN;
{底A}
VAR22:=REF(CLOSE,1);
VAR23:=SMA(MAX(CLOSE-VAR22,0),7,1)/SMA(ABS(CLOSE-VAR22),7,1)*100;
VAR24:=SMA(MAX(CLOSE-VAR22,0),13,1)/SMA(ABS(CLOSE-VAR22),13,1)*100;
VAR25:=BARSLAST(VAR24<23)<=3 AND CROSS(VAR23,VAR24);
VAR26:=(CLOSE-MA(CLOSE,23))/MA(CLOSE,20)*100<-12.5;
VAR27:=LLV(LOW,5);
VAR28:=HHV(HIGH,10);
VAR29:=EMA((CLOSE-VAR27)/(VAR28-VAR27)*100,4);
VAR2A:=EMA(0.667*REF(VAR29,1)+0.333*VAR29,2);
底A:0-(-1)*VAR25 AND VAR26 AND CROSS(VAR29,VAR2A) AND VAR29<=25,COLORMAGENTA,NODRAW;
STICKLINE(底A>0,-24,-32,8,0),COLORMAGENTA;
{底B}
VAR2:=1;
VAR3:=REF(HIGH,1)*1.1;
VAR4:=HIGH*1.1;
VAR5:=(VAR4*VOL+VAR3*(CAPITAL-VOL))/CAPITAL;
VAR6:=REF(LOW,1)*0.9;
VAR7:=LOW*0.9;
VAR8:=(VAR7*VOL+VAR6*(CAPITAL-VOL))/CAPITAL;
VAR9:=EMA(VAR8,30);
VARA:=EMA(VAR5,30);
VARB:=VARA-2;
VARC:=IF(CLOSE<=VAR9,VARB,VARA);
VARD:=MA(CLOSE,80)-MA(CLOSE,10)/17;
底B:(VARC-VARB=0 AND VAR2 AND CROSS((EMA(EMA(EMA(CLOSE,N),N),N)-REF(EMA(EMA(EMA(CLOSE,N),N),N),1))/REF(EMA(EMA(EMA(CLOSE,N),N),N),1)*100,MA((EMA(EMA(EMA(CLOSE,N),N),N)-REF(EMA(EMA(EMA(CLOSE,N),N),N),1))/REF(EMA(EMA(EMA(CLOSE,N),N),N),1)*100,M))),COLORRED,NODRAW;
底1:STICKLINE(VARC-VARB=0 AND VAR2 AND CROSS((EMA(EMA(EMA(CLOSE,N),N),N)-REF(EMA(EMA(EMA(CLOSE,N),N),N),1))/REF(EMA(EMA(EMA(CLOSE,N),N),N),1)*100,MA((EMA(EMA(EMA(CLOSE,N),N),N)-REF(EMA(EMA(EMA(CLOSE,N),N),N),1))/REF(EMA(EMA(EMA(CLOSE,N),N),N),1)*100,M)),-24,-32,5,0),COLORRED;
{頂}
頂部:CROSS(83,RSI),COLORGREEN;
頂1:STICKLINE(頂部,24,32,6,0),COLOR00FF00;
{投資A}
AA:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5;
BB:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5;
CC:=EMA(AA,2);
DD:=EMA(BB,5);
TJ0:=CROSS(CC,DD);
上:=EMA(C,3);
中:=EMA(C,5);
下:=EMA(中,5);
TJ1:=CROSS(上,中);
TJ2:=上>REF(上,1);
X1:=(C+L+H)/3;
BB5:=ATAN(EMA(X1,5)-REF(EMA(X1,5),1))*3.1416*10;
EMA3:=EMA(C,3);
TJ3:=BB5>1 AND EMA(X1,5)>REF(EMA(X1,3),1);
投A:TJ1 AND TJ2 AND TJ0 AND TJ3,COLOR0099EE,NODRAW;
STICKLINE(TJ1 AND TJ2 AND TJ0 AND TJ3,-24,-32,6,0),COLOR0066BB;
STICKLINE(TJ1 AND TJ2 AND TJ0 AND TJ3,-24,-32,3,0),COLOR0077CC;
STICKLINE(TJ1 AND TJ2 AND TJ0 AND TJ3,-24,-32,1,0),COLOR0088DD;
{投B}
VAR11:=EMA(HHV(HIGH,500),21);
VAR12:=EMA(HHV(HIGH,250),21);
VAR13:=EMA(HHV(HIGH,90),21);
VAR14:=EMA(LLV(LOW,500),21);
VAR15:=EMA(LLV(LOW,250),21);
VAR16:=EMA(LLV(LOW,90),21);
VAR17:=EMA((VAR14*0.96+VAR15*0.96+VAR16*0.96+VAR11*0.558+VAR12*0.558+VAR13*0.558)/6,21);
VAR18:=EMA((VAR14*1.25+VAR15*1.23+VAR16*1.2+VAR11*0.55+VAR12*0.55+VAR13*0.65)/6,21);
VAR19:=EMA((VAR14*1.3+VAR15*1.3+VAR16*1.3+VAR11*0.68+VAR12*0.68+VAR13*0.68)/6,21);
VARA1:=EMA((VAR17*3+VAR18*2+VAR19)/6*1.738,21);
VARB1:=REF(LOW,1);
VARC1:=SMA(ABS(LOW-VARB1),3,1)/SMA(MAX(LOW-VARB1,0),3,1)*100;
VARD1:=EMA(IF(CLOSE*1.35<=VARA1,VARC1*10,VARC1/10),3);
VARE1:=LLV(LOW,30);
VARF1:=HHV(VARD1,30);
VAR20:=IF(MA(CLOSE,58),1,0);
投資1:=EMA(IF(LOW<=VARE1,(VARD1+VARF1*2)/2,0),3)/618*VAR20;
投B:(REF(投資1,2)<REF(投資1,1)AND 投資1>REF(投資1,1))*投資1,COLOR0033CC,NODRAW;
投資2:STICKLINE(投B,24,32,3,0),COLOR0033CC;
{投資C}
低:=REF(LLV(L,90),3);
低點:=REFDATE(低,DATE);
投C:低點=L AND ((C-L)>(O-C) OR (O-L)>(C-O)),COLORYELLOW,NODRAW;
STICKLINE(投C,24,32,1.5,0),COLORYELLOW;
{投機}
投機1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLOR0080FF,NODRAW;
投機2:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLOR0080FF,NODRAW;
投機:CROSS(投機1,投機2),COLOR0080FF,NODRAW;
STICKLINE(CROSS(投機1,投機2),24,32,0.5,1),COLOR0080FF;
{持股}
B1:=(HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100- 70;
B2:=SMA(B1,9,1)+100;
B3:=(C-LLV(L,9))/(HHV(H,9)- LLV(L,9))*100;
B4:=SMA(B3,3,1);
B5:=SMA(B4,3,1)+100;
B6:=B5-B2;
持股:IF(B6>60,B6-60,0),COLORLIMAGENTA,NODRAW;
持1:STICKLINE(REF(持股,1)<持股,24,22,4,0),COLORLIMAGENTA;
持2:STICKLINE(REF(持股,1)<持股,-24,-22,4,0),COLORLIMAGENTA;
{持幣}
B8:=(HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100-70;
B9:=SMA(B8,9,1)+100;
B10:=(C-LLV(L,9))/(HHV(H,9)- LLV(L,9))*100;
B11:=SMA(B10,3,1);
B12:=SMA(B11,3,1)+100;
B13:=B12-B9;
持幣:IF(B13<60,B13-60,0),COLORLICYAN,NODRAW;
持3:STICKLINE(REF(持幣,1)>持幣,24,22,4,0),COLORLICYAN;
持4:STICKLINE(REF(持幣,1)>持幣,-24,-22,4,0),COLORLICYAN;
{追漲}
HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;
HHJSJDB:=(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)
+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)
+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+
REF(HHJSJDA,20))/210;
HHJSJDC:=MA(HHJSJDB,5);
QQ1:=MA(MA(CLOSE,3),3);
QQ2:=MA(MA(CLOSE,15),9);
XYSQS1:=(QQ1-REF(QQ1,1))/REF(QQ1,1)*10;
XYSQS2:=(QQ2-REF(QQ2,1))/REF(QQ2,1)*10;
XYSHSL:=EMA(VOL/CAPITAL*100,13);
STICKLINE(XYSQS2>=REF(XYSQS2,1)AND XYSHSL>1,-4,4,3,0),COLORYELLOW;
STICKLINE(XYSQS2>=REF(XYSQS2,1)AND XYSHSL>1 AND C>HHJSJDB AND HHJSJDB>HHJSJDC,-2,2,3,0),COLORBLUE;
追漲:IF(XYSQS2>=REF(XYSQS2,1) AND XYSHSL>1,XYSQS1*178,0),COLORMAGENTA,LINETHICK2;
{底部}
TYP := (HIGH + LOW + CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
A:=REF(C,1);
RSI:=SMA(MAX(C-A,0),6,1)/SMA(ABS(C-A),6,1)*100;
A1:=(C/MA(C,5)-1)*100<-10;
A2:=(C/MA(C,13)-1)*100<-10;
A3:=(C/MA(C,34)-1)*100<-15;
A4:=RSI<18;
A5:=CCI<-120;
A6:=COUNT(ABS(C/REF(C,1)-1)*100>=6,30)>=1;
底部:=A1 AND A2 AND A3 AND A4 AND A5 AND A6;
STICKLINE(底部,-24,-32,3,0),COLORWHITE;
通達信牛金追漲買賣指標公式實例圖解:
通達信牛金追漲買賣指標公式