DIF:EMA(C,12)-EMA(C,26);DEA:EMA(DIF,9); MACD:(DIF-DEA)*2,COLORSTICK; 壓力:HHV(DIF,55),COLORGREEN; 支撐:LLV(DIF,55),COLORGREEN; A:=BARSLAST(REF(CROSS(DIF,DEA),1)); 底背離:=REF(CLOSE,A+1)>C AND DIF>REF(DIF,A+1)AND CROSS(DIF,DEA)AND DEA<0; 底背天:IF(底背離,A,0),NODRAW; 線底背:DRAWLINE(A=0,DEA,底背離,DEA,0),COLORRED,LINETHICK2; W1:STICKLINE(MACD>0,MACD,0,1,1),COLORRED; W2:STICKLINE(MACD<0,MACD,0,1,0),COLORLIBLUE; VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1); VA2:=CROSS(BACKSET(CROSS(0,MACD)OR(ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5); 前高:DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORWHITE; 前高*1.1,COLORBLACK; VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1); VA4:=CROSS(BACKSET(CROSS(MACD,0) OR (ISLASTBAR AND MACD<0),REF(VA3,1)+2),0.5); 前低:DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1),COLORYELLOW; W3:STICKLINE(MACD>DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1) ,DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),MACD,0.5,0),COLORYELLOW; W4:STICKLINE(MACD<DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1) ,DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1),MACD,0.5,0),COLORBLUE; MID:=(3*CLOSE+LOW+OPEN+HIGH)/6; VARA1:=(DVOL/C)/2,NODRAW; VARA2:=SUM(IF(VARA1>100 AND CLOSE>REF(CLOSE,1),VARA1,0),0); VARA3:=SUM(IF(VARA1>100 AND CLOSE<REF(CLOSE,1),VARA1,0),0); VARA4:=SUM(IF(VARA1<100 AND CLOSE>REF(CLOSE,1),VARA1,0),0); VARA5:=SUM(IF(VARA1<100 AND CLOSE<REF(CLOSE,1),VARA1,0),0); VARA6:=VARA2+VARA3+VARA4+VARA5; 機(jī)買:=(VARA2/VARA6)*100,LINETHICK2,COLORRED; 機(jī)賣:=(VARA3/VARA6)*100,LINETHICK2,COLORGREEN; 主力差:=機(jī)買-機(jī)賣,LINETHICK2,NODRAW; 強(qiáng)度:主力差-REF(主力差,1),NODRAW,COLOR6600FF; STICKLINE(強(qiáng)度>1.5,-0.05,0,2,0),COLORMAGENTA; 近期:BARSLAST(強(qiáng)度>1.5),NODRAW,COLORGRAY; |
|