N:=20;M:=32;P1:=80;P2:=100; MAIRU:=XMA((C+H+O+L)/4,32)*(1-100/1000),COLORMAGENTA,POINTDOT; MAICHU:=XMA((C+H+O+L)/4,20)*(1+80/1000),COLORGREEN,POINTDOT; 買入:IF(CURRBARSCOUNT<=34,MAIRU,DRAWNULL),COLORMAGENTA,POINTDOT; 賣出:IF(CURRBARSCOUNT<=34,MAICHU,DRAWNULL),COLORGREEN,POINTDOT; PRICE:=IF(CAPITAL>0,AMOUNT/(V*100),CLOSE); 多空線:(20*PRICE+19*REF(PRICE,1)+18*REF(PRICE,2)+17*REF(PRICE,3)+16*REF(PRICE,4) +15*REF(PRICE,5)+14*REF(PRICE,6)+13*REF(PRICE,7)+12*REF(PRICE,8)+11*REF(PRICE,9) +10*REF(PRICE,10)+9*REF(PRICE,11)+8*REF(PRICE,12)+7*REF(PRICE,13)+6*REF(PRICE,14) +5*REF(PRICE,15)+4*REF(PRICE,16)+3*REF(PRICE,17)+2*REF(PRICE,18) +REF(PRICE,20))/210,COLORYELLOW,LINETHICK2; DRAWICON(CROSS(CLOSE,多空線) AND COUNT(CROSS(CLOSE,多空線),5)=1,LLV(LOW,5),5); 生命線:EMA(C,55),COLORGREEN,LINETHICK2; 買賣點1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; 買賣點2:=2*ABS(買賣點1); 買賣點3:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1); 情報:= 100-買賣點3; 紅軍:= IF(買賣點1>0,買賣點1,0); 綠軍:= IF(買賣點1<0,買賣點2,0); 工作:IF((CLOSE>多空線 AND 多空線>REF(多空線,1)*0.98) OR ((情報>=REF(情報,1)) AND ((紅軍>=REF(紅軍,1)) OR 綠軍<REF(綠軍,1))),多空線,DRAWNULL),COLORRED,LINETHICK2; MA5:MA(PRICE,5),COLORBLUE,LINETHICK2; 奔跑:IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLORMAGENTA,LINETHICK2; 狗熊:IF(生命線<REF(生命線,1), 生命線,DRAWNULL),COLORGRAY,LINETHICK2; 買:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1) -3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1); DRAWTEXT(CROSS(買,8),L*0.98,'買'),COLOR0099FF; {起漲點} EMA14:=EMA(PRICE,14); 起漲點:=CROSS(EMA14-REF(EMA14,1),0); STICKLINE(起漲點,CLOSE,OPEN,3,0 ),COLOR0000CC; STICKLINE(起漲點,CLOSE,OPEN,2,0 ),COLOR0033FF; STICKLINE(起漲點,LOW,HIGH,0,0 ),COLOR0033FF; SHORT:=7;LONG:=19; T:=PERIOD; D:=IF(T=0,30,{1F} IF(T=1,25,{5F} IF(T=8,25,{多分鐘} IF(T=2,20,{15F} IF(T=3,20,{30F} IF(T=4,20,{60F} IF(T=5,10,{日} IF(T=6,10,{周} IF(T=7,10,{月} IF(T=9,10,{多日} IF(T=10,10{季},10{年}))))))))))); RMA:=EMA(CLOSE,SHORT),COLORLIGRAY; NMA:=EMA(CLOSE,LONG),COLORMAGENTA; RISK:=IF(NMA>RMA,NMA,DRAWNULL),COLORGREEN; UP:DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1) AND L=LLV(L,D) AND RMA<=NMA,L,H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1) AND H=HHV(H,D) AND RMA>=NMA,H,0),COLOR0000BB,LINETHICK2; DOWN:DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1) AND H=HHV(H,D) AND RMA>=NMA,H,L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1) AND L=LLV(L,D) AND RMA<=NMA,L,0),COLOR00BB00,LINETHICK2; 箱頂:REFDATE(REF(HHV(H,96),5),DATE),LINETHICK1,COLORLIBLUE; 箱低:REFDATE(REF(LLV(L,96),5),DATE),LINETHICK2,COLOR00FF00; 箱腰:((箱頂)+(箱低))/2,LINETHICK1,COLORLIGREEN; |
|