這是趨勢主圖,注意要選擇主圖疊加哦,參數(shù)自己設(shè)置。 紫色是生命線,只要突破生命線,說明新一輪行情隨時啟動,很準的。 下面是公式源碼。 趨勢主圖公式源碼 A1:=REF(H,N)=HHV(H,2*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); E1:=FILTER(C1,N); R11:=BACKSET(ISLASTBAR,BARSLAST(E1)+1); S11:=R11>REF(R11,1); 上檔線1: DRAWLINE(E1,H,S11,H,1),COLORWHITE; A2:=REF(L,N)=LLV(L,2*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); E2:=FILTER(C2,N); T11:=BACKSET(ISLASTBAR,BARSLAST(E2)+1); U11:=T11>REF(T11,1); 下檔線1:DRAWLINE(E2,L,U11,L,1),COLORRED; M:=INTPART(3*N/5); A12:=REF(H,M)=HHV(H,2*M+1); B12:=FILTER(A12,M); C12:=BACKSET(B12,M+1); D12:=FILTER(C12,M); R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1); S112:=R112>REF(R112,1); 上檔線2:DRAWLINE(D12,H,S112,H,1),COLORGREEN; A22:=REF(L,M)=LLV(L,2*M+1); B22:=FILTER(A22,M); C22:=BACKSET(B22,M+1); D22:=FILTER(C22,M); T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1); U112:=T112>REF(T112,1); 下檔線2:DRAWLINE(D22,L,U112,L,1),COLORYELLOW; VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3); VAR2222:=CROSS(VAR1111,0.9); VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3); VAR4444:=CROSS(VAR3333,0.9); 壓力:REF(HIGH,BARSLAST(VAR2222))NODRAW; STICKLINE(CLOSE,壓力,壓力,0.5,1),COLORGRAY,LINETHICK9; 支撐:REF(LOW,BARSLAST(VAR4444))NODRAW; STICKLINE(CLOSE,支撐,支撐,0.5,1),COLOR00B4FF,LINETHICK3; R1:=(((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13)))*100); K1:=SMA(R1,3,1); D1:=SMA(K1,3,1); J1:=((3*K1)-(2*D1)); R2:=(((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)))*100); K2:=SMA(R2,3,1); D2:=SMA(K2,3,1); J2:=((3*K2)-(2*D2)); 上箱體:IF(CROSS(J2,J1),HIGH,REF(HIGH,BARSLAST(CROSS(J2,J1)))),NODRAW; 壓力位:=IF(ISLASTBAR,上箱體,DRAWNULL); STICKLINE(ISLASTBAR ,壓力位,壓力位,120,0),LINETHICK4,COLORFFFFFF; 下箱體:LLV(HIGH,30),NODRAW; 底部位:=IF(ISLASTBAR,下箱體,DRAWNULL); STICKLINE(ISLASTBAR ,底部位,底部位,100,0),LINETHICK4,COLOR00FF00; 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),LINETHICK2,COLORMAGENTA; MA5:=MA(C,5); MA10:=MA(C,10); MA20:=MA(C,20); MA30:=MA(C,30); BIAS5:=(C-MA5)/MA5*100; BIAS30:=(C-MA30)/MA30*100; BB05:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416; V5:=SMA(EMA((MA5-REF(MA5,1))/REF(MA5,1),3)*100,3,1); VV5:=EMA((V5-REF(V5,1)),3); 加倉:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND MA5>REF(MA5,1) AND BIAS30>REF(BIAS30,1) AND MA10>REF(MA10,1) AND VV5>REF(VV5,1) AND V5>REF(V5,1) ,10); JC:=CROSS(0,BIAS5) AND BIAS30<REF(BIAS30,1) AND MA10>REF(MA10,1); 減倉:=FILTER(JC,10); MR:=COUNT(CROSS(BIAS5,0),3)>=1 AND BIAS30>REF(BIAS30,1) AND MA5>REF(MA5,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<MA30; 買入:=FILTER(MR,10); DRAWTEXT(加倉 ,LOW,'←--加倉'),COLORMAGENTA; DRAWTEXT(減倉,HIGH,'←--減倉'),COLORCYAN; DRAWTEXT(買入,LOW*0.98,'←--買入'),COLORYELLOW; TYP:=(HIGH+LOW+CLOSE)/3; CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)); VAR6:=CCI>=200; DRAWTEXT(VAR6,HIGH,'←--小心'),COLORYELLOW; LC:=REF(CLOSE,1); RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100; DRAWTEXT(CROSS(84,RSI) , HIGH,'←--逃'),COLORGREEN; VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0); VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0); DRAWTEXT(FILTER((VAR4AA>90),45),LOW*0.96,'←--大膽搏 '),COLORYELLOW; |
|
來自: 風信子d0w17xnr > 《指標3》