参数:{P1(1,260,5),P2(1,260,10),P3(1,260,20),P4(1,260,30),P5(1,300,60),P6(1,999,120),N(0,6,3)}
WX:=MA(CLOSE,0); M1:MA(CLOSE,P1); M2:MA(CLOSE,P2)*IF(N<2,WX,1); M3:MA(CLOSE,P3)*IF(N<3,WX,1); M4:MA(CLOSE,P4)*IF(N<4,WX,1); M5:MA(CLOSE,P5)*IF(N<5,WX,1); M6:MA(CLOSE,P6)*IF(N<6,WX,1); STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR009900; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.5,0 ),COLOR00CC00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.4,0 ),COLOR33FF00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.1,0 ),COLOR66FF00; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0 ),COLOR000099; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.5,0 ),COLOR0000CC; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.4,0 ),COLOR0000FF; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.1 ,0 ),COLOR0033FF; STICKLINE(CLOSE>OPEN,OPEN,LOW,0,0 ),COLOR9933FF; STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0 ,0 ),COLOR9933FF; STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0,0 ),COLOR66CC33; STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0 ,0 ),COLOR66CC33; A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1)); B1:=REF(CLOSE,A1+1)>CLOSE AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA"); A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1)); B2:=REF(CLOSE,A2+1)>CLOSE AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D"); A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1)); B3:=REF(CLOSE,A3+1)>CLOSE AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2"); FIL1:=FILTER(B1>0,7) OR FILTER(B2>0,7) OR FILTER(B3>0,7); DRAWTEXT(FIL1,LOW-0.02,'K线底背'),COLORRED; C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1)); D1:=REF(CLOSE,C1+1)<CLOSE AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF"); C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1)); D2:=REF(CLOSE,C2+1)<CLOSE AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K"); C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1)); D3:=REF(CLOSE,C3+1)<CLOSE AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1"); FIL2:=FILTER(D1>0,7) OR FILTER(D2>0,7) OR FILTER(D3>0,7); DRAWTEXT(FIL2,HIGH+0.1,'K线顶背'),COLORBLUE; |
