M4:MA(C,60); M5:MA(C,120); DRAWBAND(M4,RGB(120,30,30),M5,RGB(30,120,30)); DRAWKLINE(H,O,L,C); LC:=REF(C,1); RSI5:=((SMA(MAX((C-LC),0),5,1)/SMA(ABS((C-LC)),5,1))*100); TR1:=SUM(MAX(MAX((H-L),ABS((H-REF(C,1)))),ABS((L-REF(C,1)))),10); HD:=(H-REF(H,1)); LD:=(REF(L,1)-L); DMP:=SUM(IF(((HD>0)&&(HD>LD)),HD,0),10); DMM:=SUM(IF(((LD>0)&&(LD>HD)),LD,0),10); PDI:=((DMP*100)/TR1); MDI:=((DMM*100)/TR1); ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5); AV:=(RSI5+ADX); DXR:=(((ADX+REF(ADX,5))/2)+RSI5); WR10:=((100*(HHV(H,10)-C))/(HHV(H,10)-LLV(L,10))); NEWVOL:=(RSI5-WR10); 買:=(AV+NEWVOL); DRAWTEXT(CROSS(買,0),L*0.965,'買'),COLORFF00FF; DRAWICON(CROSS(買,0),L*0.98,1); HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0; AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1); QY:=BACKSET(AA,HIGHN+1); CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1); DRAWICON(CC,H*1.02,2); AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1); QY1:=BACKSET(AA1,LOWN+1); CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1); M1:MA(C,5); M2:MA(C,10); M3:MA(C,20); M6:MA(C,250); 說明:盈利超過20%且在階段頂部止盈;虧損5%止損;持股不超過9天 |
|