最新通達信天潭趨勢主圖公式
最新通達信天潭趨勢主圖公式
參數:
N1.00 100.00 9.00X1.00 250.00 3.00Y1.00 250.00 10.00N11.00 100.00 10.00
P0.10 20.003.00獲利盤百分比 1.0099.00 90.00獲利盤線MA周 1.00 100.00 5.00P12.00 30.005.00
P22.0060.00 13.0010P32.00 120.0034.0011N21.00 100.0020.0012M1.00 100.0032.00
公式源碼:
JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));DDD1:=(DYNAINFO(5)<0.01 ||DYNAINFO(6)<0.01);JJJT:=IF(DDD1,1,(JJJ<(DYNAINFO(5)+0.01)&&JJJ>(DYNAINFO(6)-0.01)));CYC1:IF(JJJT,0.01*EXPMA(AMOUNT,P1)/EXPMA(VOL,P1),EMA((HIGH+LOW+CLOSE)/3,P1));CYC2:IF(JJJT,0.01*EXPMA(AMOUNT,P2)/EXPMA(VOL,P2),EMA((HIGH+LOW+CLOSE)/3,P2));CYC3:IF(JJJT,0.01*EXPMA(AMOUNT,P3)/EXPMA(VOL,P3),EMA((HIGH+LOW+CLOSE)/3,P3));CYC??:IF(JJJT,DMA(AMOUNT/(100*VOL),100*VOL/FINANCE(7)),EMA((HIGH+LOW+CLOSE)/3,120));
{畫K線}DRAWKLINE(H,O,L,C);{黃金分割}{TS:=130;K:=3;高:=CONST(REF(HHV(H,TS),K));低:=CONST(REF(LLV(L,TS),K));H19:=高-(高-低)*0.191;H38:=高-(高-低)*0.382;H中:=高-(高-低)*0.5;H61:=高-(高-低)*0.618;H80:=高-(高-低)*0.809;頂點:=REFDATE(高,DATE),COLORWHITE;.8:=REFDATE(H19,DATE),COLORYELLOW;8.2:=REFDATE(H38,DATE),COLORMAGENTA;P:=REFDATE(H中,DATE),COLORGREEN;a.8:=REFDATE(H61,DATE),COLORMAGENTA;.9:=REFDATE(H80,DATE),COLORYELLOW;低點:=REFDATE(低,DATE),COLORWHITE;DRAWTEXT(ISLASTBAR,.8,"%19.8"),COLORYELLOW;DRAWTEXT(ISLASTBAR,P,"%50"),COLORGREEN;DRAWTEXT(ISLASTBAR,?.9,"%80.9"),COLORYELLOW;{CG:=MA(C,17),COLORYELLOW,LINETHICK0;STICKLINE(CLOSE>=CG,LOW,HIGH,0.4,1),COLORRED;STICKLINE(CLOSE>=CG,OPEN,CLOSE,3,0),COLORRED;STICKLINE(CLOSE>=CG ANDCLOSE>OPEN,OPEN,CLOSE,3,1),COLORRED;STICKLINE(CLOSE<CG,HIGH,LOW,0.4,0),COLORGREEN;STICKLINE(CLOSE<CG,CLOSE,OPEN,3,0),COLORGREEN;STICKLINE(CLOSE<CG ANDCLOSE>=OPEN,CLOSE,OPEN,3,1),COLORGREEN;}
{自動畫線}NN:=100;高點:=CONST(HHV(H,NN));低點:=CONST(LLV(L,NN));AA:=REF(H,N)=HHV(H,2*N+1);AA1:=REF(L,N)=LLV(L,2*N+1);QY:=BACKSET(AA,N+1); QY1:=BACKSET(AA1,N+1);CC:=FILTER(QY,N) AND H=HHV(H,N+1);CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);DDD:=BARSLAST(CC); DD1:=BARSLAST(CC1);GDTS:=IF(CC,CURRBARSCOUNT,0);DDTS:=IF(CC1,CURRBARSCOUNT,0);DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);GDCS1:=CONST(DINGBUTS);DDCS1:=CONST(DDTS1);GDCS13:=CONST(REF(HIGH,GDCS1-1));DDCS13:=CONST(REF(L,DDCS1-1));DINGBUTS1:=REF(DINGBUTS,DDD+1);DDTS2:=REF(DDTS1,DD1+1);GDCS2:=CONST(DINGBUTS1);DDCS2:=CONST(DDTS2);M:=INTPART(3*N/5);AAA:=REF(H,M)=HHV(H,2*M+1);QYY:=BACKSET(AAA,M+1);CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);DDDD:=BARSLAST(CCC),NODRAW;GDTSS:=IF(CCC,CURRBARSCOUNT,0);DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);GDCS11:=CONST(DINGBUTSS);DINGBUTS11:=REF(DINGBUTSS,DDDD+1);GDCS22:=CONST(DINGBUTS11);AA11:=REF(L,M)=LLV(L,2*M+1);QY11:=BACKSET(AA11,M+1);CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);DD11:=BARSLAST(CC11);DDTSS:=IF(CC11,CURRBARSCOUNT,0);DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);DDCS11:=CONST(DDTS11);DDTS22:=REF(DDTS11,DD11+1);DDCS22:=CONST(DDTS22);ZGD:=HHV(H,60)*1.01.00;ZGD2:=CONST(ZGD);高點壓力M:=DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORRED,LINETHICK1;低點支撐M:=DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1),COLORRED,LINETHICK1;高點壓力1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1),COLORBLUE,LINETHICK1;低點支撐1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),COLORBLUE,LINETHICK1;IF(BETWEEN(高點壓力M,高點,低點),高點壓力M,DRAWNULL),COLORFF6699,LINETHICK2;IF(BETWEEN(低點支撐M,高點,低點),低點支撐M,DRAWNULL),COLORFF6699,LINETHICK2;IF(BETWEEN(高點壓力1,高點,低點),高點壓力1,DRAWNULL),COLORWHITE,LINETHICK2;IF(BETWEEN(低點支撐1,高點,低點),低點支撐1,DRAWNULL),COLORWHITE,LINETHICK2;DRAWTEXT(CROSS(CLOSE,高點壓力M) ORCROSS(CLOSE,高點壓力1),0.93*CLOSE,"突");牛線:MA(REF(HHV(C,89),1),2),COLORBLUE,LINETHICK4;BLZ:=VOL>REF(V,1)*1.3 ANDC>REF(C,1);DRAWTEXT(BLZ,LOW-0.1,""),COLORBLUE;AA201:=MA(C,20);AA301:=MA(C,30);VAR1:=(AA201-AA301)>REF((AA201-AA301),1) ANDAA201>REF(AA201,1) ANDAA301>REF(AA301,1);VAR2:=(AA301-AA201)<REF((AA301-AA201),1) ANDAA201<REF(AA201,1) ANDAA301<REF(AA301,1);BB30:=ATAN((AA301/REF(AA301,1)-1)*100)*180/3.1416;DRAWTEXT(REF(((HHV(H,5)-LLV(L,5))/LLV(L,5)),1)<=(100/100)AND C>=REF(HHV(H,5),1) ANDBARSCOUNT(C)>5,H*1.03,"?"),COLORYELLOW;底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) ORCROSS(HIGH,底),0.85*CLOSE,"底");X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;X2:=EMA(X1,10);X3:=REF(X2,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);X6:=REF(CLOSE,1);X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;X8:=CROSS(79,X7);X9:=FILTER(X8,4);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) ANDVAR8T;VARA:=IF(CLOSE>1000,VAR8T,VAR9T);起步:=VAR3T AND VAR4T;逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(XL2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1);DRAWTEXT(CROSS(X4,X5),HIGH*1.015,"減"),COLOR00FF00;DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9,5),HIGH*1.02,"跑"),COLOR00FF00;
DRAWTEXT_FIX(1,0.00,0,0,HYBLOCK)COLOR0080FF;DRAWTEXT_FIX(1,0.06,0,0,DYBLOCK)COLOR00FFFF;DRAWTEXT_FIX(1,0.12,0,0,EXTERNSTR(0,5))COLOR0000FF;DRAWTEXT_FIX(1,0.00,0.06,0,EXTERNSTR(0,1))COLORFF88FF;DRAWTEXT_FIX(1,0.00,0.12,0,EXTERNSTR(0,3)),COLORLICYAN;DRAWTEXT(CROSS(REF(SMA(MA(IF(CLOSE>OPEN,VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN))*(HIGH-LOW),IF(CLOSE<OPEN,VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN))*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2))- IF(CLOSE>OPEN,VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN))*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN))*(HIGH-LOW),VOL/2)),3)*100,3,1),1), SMA(MA(IF(CLOSE>OPEN,VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN))*(HIGH-LOW),IF(CLOSE<OPEN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LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLORYELLOW;線1:DRAWLINE(C=HHV(C,60),HHV(H,3),C=HHV(C,30) ANDC<HHV(C,45),HHV(HIGH,3),1),COLORYELLOW;線2:DRAWLINE(HIGH>=HHV(HIGH,30),HIGH,LOW<=LLV(LOW,10),HHV(HIGH,6),1),COLORFFCCCC;線3:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLORYELLOW;DRAWTEXT(CROSS(CLOSE,高點壓力M) OR CROSS(CLOSE,高點壓力1) ORCROSS(CLOSE,線1) OR CROSS(CLOSE,線2) ORCROSS(CLOSE,線3),0.93*CLOSE,"突") ANDEXIST(C/REF(C,1)>1.093,90)AND DYNAINFO(4)>0 ANDIF(DYNAINFO(7)=CLOSE ANDDYNAINFO(10)=AMOUNT,MAX(VOL,DYNAINFO(17)*REF(MA(VOL,5),1)),0)>=1.3*REF(V,1);指數期貨標記:=CODELIKE("999") OR CODELIKE("399") OR CODELIKE("88") ORCODELIKE("39") OR CODELIKE("IF");MA獲利盤線:MA(IF(獲利盤百分比1=0 OR指數期貨標記,DRAWNULL,COST(獲利盤百分比1)),獲利盤線MA周期),COLORBROWN,LINETHICK4;GET:ZIG(3,3),COLORMAGENTA;DRAWTEXT(FILTER((IF(((CLOSE)/(REF(CLOSE,1))>1.015)AND ((HIGH)/(CLOSE)<1.01) AND(IF((CLOSE>REF(CLOSE,1)),88,0)>0),91,0)>90),34),(LOW)*(0.97),"◆"),COLORRED;X11:=(C+L+H)/1.5;X22:=EMA(X11,3);X33:=EMA(X22,2.5);DRAWICON(CROSS(X22,X33),L*0.98,9),COLORRED;STICKLINE(X22>=X33,LOW,HIGH,0,1),COLORRED;STICKLINE(X22>=X33,CLOSE,OPEN,3.2,2),COLORRED;STICKLINE(X22<X33,LOW,HIGH,0,1),COLOR00FF00;STICKLINE(X22<X33,CLOSE,OPEN,3.2,2),COLOR00FF00;STICKLINE(CROSS(X33,X22),OPEN,CLOSE,3.2,0),COLOR00FF00;STICKLINE(CROSS(X22,X33),OPEN,CLOSE,3.2,0),COLORRED;STICKLINE((CLOSE>OPEN) AND(X22<X33),CLOSE,OPEN,3.2,2)COLOR00FF00;STICKLINE((CLOSE>OPEN) AND(X22>=X33),CLOSE,OPEN,3.2,2)COLORRED;STICKLINE((CLOSE<OPEN) AND(X22<X33),CLOSE,OPEN,3.2,0)COLOR00FF00;STICKLINE((CLOSE<OPEN) AND(X22>=X33),CLOSE,OPEN,3.2,0)COLORRED;
推薦閱讀:
※抗腫瘤表觀遺傳藥物的現狀與發展新趨勢(2017.5)
※全球2015時尚配飾趨勢曝光
※未來LED燈具技術趨勢
※港股保持上升趨勢 資金「借基」掘金港股
※何為大趨勢+趨勢的判斷+支撐位與阻力位+移動平均線在趨勢中的運用