LOWV:=LLV(LOW,9); HIGHV:=HHV(HIGH,9); RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3); K:EMA(RSV,3)COLOR00FFFF; D:MA(K,3)COLORFF00FF; STICKLINE(K>D,K,D,2.5,0),COLORRED,LINETHICK1,NODRAW; STICKLINE(D>K,K,D,2.5,0),COLORGREEN,LINETHICK1,NODRAW; NOTEXT1:IF(K>REF(K,1),K,DRAWNULL) CIRCLEDOT,COLORRED; NOTEXT2:IF(K<REF(K,1),K,DRAWNULL) CIRCLEDOT,COLORGREEN; 清倉:90 COLORWHITE; 賣出:80 COLORGREEN; 關(guān)注:15 COLORD9D919; 底部:10 COLORWHITE; 分界線:=50,POINTDOT,LINETHICK2,COLORGREEN; {DRAWICON(CROSS(K,90),K,4); DRAWICON(CROSS(K,80),K,12); DRAWICON(CROSS(15,K),K,11); DRAWICON(CROSS(10,K),K,5);} {盤整天:BARSLASTCOUNT(K<30)COLORYELLOW NODRAW; 跌幅:IF(盤整天,(C-REF(C,盤整天))/REF(C,盤整天),0)*100 COLORGREEN NODRAW; 現(xiàn)金流:FINANCE(25)/FINANCE(1),COLORYELLOW NODRAW;} {N1:=7; LC:=REF(CLOSE,1); X:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLORYELLOW,LINETHICK1; 魔鬼:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),X,1),COLOR00FF00; 魔王:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,X),COLOR00FF00; TJ0:=X=魔王; TJ1:=X=魔鬼; TJ2:=X<REF(X,1); TJ3:=X>REF(1,X); JRS1:=DRAWICON(TJ1 AND TJ2,X,1); JRS2:=DRAWICON(TJ0 AND TJ3,X,2); DRAWICON(FILTER(JRS1>0,1),K*0.97,5); DRAWICON(FILTER(JRS2>0,1),K*1.02,15);} {以下為買入賣出的源碼} {收大于買:=(REF(H-L,1)/2+REF(L,1))*0.997,COLORYELLOW; 低移:=SMA(XMA((C+L+H)/3,15),2,1),NODRAW; 低:=REF(低移,1)*REF(低移,1)/REF(低移,2),COLORWHITE,NODRAW;}; {賣出} {賣價:=低*1.04,COLORWHITE; 價A:=賣價,COLORWHITE,NODRAW; 價B:=MAX(REF(C,1)*0.99,H*0.97),COLORWHITE,NODRAW; 沖高賣:=MAX(價A,價B),COLORWHITE,NODRAW; 賣點:=H>沖高賣 ; DRAWICON(BARSLASTCOUNT(賣點)=1 ,K*1.01,17);}; {買入}
{低1:=低*0.97,COLORWHITE; 低2:=低*0.94,COLORWHITE; 低3:=低*0.89,COLORCYAN; 低4:=低*0.84,COLORBLUE; W1:=低移>REF(低移,1); W2:=低移<REF(低移,1); 低買線:=IF(W1 AND REF(L>低1,1)AND L<低1,低1,IF(W2 AND REF(L>低2,1)AND L<低2,低2,IF(W1 AND REF(L>低2,1)AND L<低2,低2, IF(W2 AND REF(L>低3,1)AND L<低3,低3,IF(W1 AND L<低3,低3,IF( L<低4,低4,DRAWNULL))))));} {STICKLINE(L<低買線 ,L,MIN(H,低買線),1.1,0),COLORWHITE;} {買點:=L<低買線; DRAWICON(FILTER(買點>0,1),K*0.97,5);} {VAR2:=LLV(LOW,10); VAR3:=HHV(HIGH,25); 動力線:= EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4); 趨勢:=MA(動力線,3); 出擊:IF((趨勢>REF(趨勢,1)) AND (REF(趨勢,1)<REF(趨勢,2)) AND (趨勢<0.6),20,0)COLOR00FF00;} {P:=((2)*(CLOSE) + HIGH + LOW + OPEN)/(5); CCI:=((P - MA(P,14))*(100))/((1.5)*(AVEDEV(P,14))); RSI1:=((SMA(MAX(CLOSE - REF(CLOSE,1),0),6,1))/(SMA(ABS(CLOSE - REF(CLOSE,1)),6,1)))*(100); STICKLINE((RSI1 > 80),100,95,3,0),COLOR3333DD; STICKLINE((CCI < (-100)),(18),14,3,0),COLORYELLOW;} MA5:=MA(CLOSE,5); MA10:=MA(CLOSE,10); MA20:=MA(CLOSE,20); MA30:=MA(CLOSE,30); MA60:=MA(CLOSE,60); MA120:=MA(CLOSE,120); MA250:=MA(CLOSE,250); 角度5:ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416 COLORFFFF00 NODRAW; 角度10:ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416 COLORGREEN NODRAW; 角度20:ATAN((MA20/REF(MA20,1)-1)*100)*180/3.1416 COLORYELLOW NODRAW; 角度30:ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416 COLORWHITE NODRAW; 角度60:ATAN((MA60/REF(MA60,1)-1)*100)*180/3.1416 COLORGREEN NODRAW; 角度120:ATAN((MA120/REF(MA120,1)-1)*100)*180/3.1416 COLORWHITE NODRAW; 角度250:ATAN((MA250/REF(MA250,1)-1)*100)*180/3.1416 COLORD9D919 NODRAW; {A1:=BARSLAST(REF(CROSS(K,D),1)); 底背離:REF(CLOSE,A1+1)>CLOSE AND K>REF(K,A1+1) AND CROSS(K,D) COLORRED; DRAWLINE(A1=0,D,底背離,D,0),COLORRED,LINETHICK1; A2:=BARSLAST(REF(CROSS(D,K),1)); 頂背離:REF(CLOSE,A2+1)<CLOSE AND REF(D,A2+1)>D AND CROSS(D,K)COLORGREEN; DRAWLINE(A2=0,D,頂背離,D,0),COLORGREEN,LINETHICK1; DRAWTEXT(底背離>0,D-5,'底背離'),COLORRED; DRAWTEXT(頂背離>0,D-5,'頂背離'),COLORGREEN;};
|