GV {虛擬量} 量:VOL/10000,COLOR33FF33,NODRAW; WOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL)/10000,NODRAW; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,WOL,0,2.5,-1); {視窗}; MFI:=(H-L)*100000/V,NODRAW,COLOR33FF33; 視窗:=IF(C>0,16,DRAWNULL),CIRCLEDOT,COLORWHITE,LINETHICK2; 綠窗:IF(MFI>=REF(MFI,1)*1.1 AND V>=REF(V,1)*1.1,10,0),STICK,COLORGREEN,NODRAW; 衰退:IF(MFI<=REF(MFI,1)*0.9 AND V<=REF(V,1)*0.9,10,0),STICK,COLORCCCCCC,NODRAW; 偽裝:IF(MFI>=REF(MFI,1)*1.1 AND V<=REF(V,1)*0.9,10,0),STICK,COLOREE5500,NODRAW; 蟄伏:IF(MFI<=REF(MFI,1)*0.9 AND V>=REF(V,1)*1.1,10,0),STICK,COLORYELLOW,NODRAW; DRAWTEXT(ISLASTBAR AND 綠窗>0,HHV(量,20),'★'),LINETHICK3,COLOR00FF00; DRAWTEXT(ISLASTBAR AND 蟄伏>0,HHV(量,20),'★'),LINETHICK3,COLOR00FFFF; {主動(dòng)買量} VOL_AMO:=1;{1~2,1}; EPSL:=0.0001; TJ1:=H=L AND C>REF(C,1); TJ2:=H=L AND C<REF(C,1); {**1}; 量_價(jià):=IF(VOL_AMO=1,VOL,AMOUNT),STICK,COLOREEFFEE; EP:=IF(TJ1,EPSL,IF(TJ2,-EPSL,0)); ZL:=3*((H-L)+IF(H=L,EPSL,0)); {**3}; DDX_YFQJ_JLJ:=((2*C-(H+L))+EP)/ZL; 買賣差:=DDX_YFQJ_JLJ*量_價(jià),COLOR13AADD,NODRAW; DDX%:=DDX_YFQJ_JLJ*100,NODRAW; 主動(dòng)買:=(量_價(jià)+買賣差)/2,COLOR1133AA,NODRAW; 主動(dòng)賣:=(量_價(jià)-買賣差)/2,COLORDFDF13,NODRAW; 買盤:=主動(dòng)買/10000,COLORRED,NODRAW; 賣盤:=主動(dòng)賣/10000,COLORFFFFFF,NODRAW; 買比:=主動(dòng)買/VOL*100,COLORRED,NODRAW; 日額:=(買盤-賣盤),NODRAW,COLORRED; 周額:=SUM(日額,5),NODRAW,COLORFFFFFF; 月額:=SUM(日額,22),NODRAW,COLOR00FF00; 走牛:=BARSLASTCOUNT(周額>0),COLOR0000FF,NODRAW; 強(qiáng)勢(shì):=SUM(日額>0,5),COLORFFFFFF,NODRAW; {地量和天量} 地量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL)<LLV(IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL),14)*1.001; 量能:=(AMOUNT/CLOSE)/HHV((AMOUNT/CLOSE),26)*100,COLORFFFFFF,NODRAW; PS:=C<REF(C,1) AND V>REF(V,1) AND C>MA(C,30) AND COUNT(MA(C,10)>REF(MA(C,10),1),5)>=4 AND V>MA(V,10); {柱狀圖} STICKLINE(買盤>=量/2, 0,量,2.5,0),COLOR0000BB; STICKLINE(買盤>=量/2, 0,量,2,0),COLOR0000DD; STICKLINE(買盤>=量/2, 0,量,1,0),COLOR0000EE; STICKLINE(買盤>=量/2, 0,量,0,0),COLOR0000FF; STICKLINE(買盤<量/2, 0,量,2.5,0),COLOR00AA00; STICKLINE(買盤<量/2, 0,量,2,0),COLOR00BB00; STICKLINE(買盤<量/2, 0,量,1,0),COLOR00DD00; STICKLINE(買盤<量/2, 0,量,0,0),COLOR00EE00; STICKLINE(PS,量*0.81,量*0.88,2,0),COLORFF3300; STICKLINE(量能>=100, 量*0.80,量*0.81,2.8,0),COLOR00FFFF; STICKLINE(地量>0,0,量*0.91,0,0),COLORWHITE; STICKLINE(C>0,0,-1,3,0),COLOR000000; DRAWTEXT(LLV(V,55)<REF(LLV(V,55),1),量*0.2,'*'),COLORFFFFFF; P:=DRAWTEXT(HHV(V,60)>REF(HHV(V,60),1),量*0.81,'*'),COLORFFFFFF; {量能線} 地線:HHV(量,60)/6,COLORAAAAAA,LINETHICK1; 均五:MA(量,5),COLORWHITE; 均十:=MA(量,10),COLOR33EEEE,LINETHICK1; 周凈額:周額,NODRAW; 五換:SUM(100*V/CAPITAL,5),NODRAW; 十換:=SUM(100*V/CAPITAL,10),NODRAW; 日比:V/REF(V,1),COLORGREEN,NODRAW; {完}; GR {相對(duì)強(qiáng)弱值}; LC :=REF(C,1); RSI1:=SMA(MAX(C-LC,0),9,1)/SMA(ABS(C-LC),9,1)*100; Q:=DRAWBAND(RSI1,RGB(0,250,0),50,RGB(233,34,8)); {信號(hào)線}; STICKLINE(C>0,70,30,5,0),COLORFF5353; STICKLINE(C>0,70,30,5,0),COLORFF5050; STICKLINE(C>0,60,40,5,0),COLORFF2121; STICKLINE(C>0,50,40,5,0),COLORFF0000; STICKLINE(RSI1>=80,79.7,80.3,8,0),COLORYELLOW; STICKLINE(RSI1<=20,19.7,20.3,8,0),COLORYELLOW; {壓力和支撐}; HIGHN:=3; LOWN:=HIGHN; AA:=REF(RSI1,HIGHN)=HHV(RSI1,2*HIGHN+1); QY:=BACKSET(AA,HIGHN+1); CC:=FILTER(QY,HIGHN) AND RSI1=HHV(RSI1,HIGHN+1); 賣出:=DRAWICON(CC,RSI1*1.02,2); DDD:=BARSLAST(CC); GDTS:=IF(CC,CURRBARSCOUNT,0); DINGBU:=IF(DDD,REF(RSI1,DDD),RSI1);{頂部} DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS); DINGBU1:=REF(DINGBU,DDD+1); GDCS1:=CONST(DINGBUTS); DINGBUTS1:=REF(DINGBUTS,DDD+1); GDCS2:=CONST(DINGBUTS1); DINGBU2:=REF(DINGBU1,DDD+1); MM:=IF(CURRBARSCOUNT>GDCS2,0,1); 上軌:=DRAWLINE(CURRBARSCOUNT=GDCS2,RSI1,CURRBARSCOUNT=GDCS1,RSI1,1) COLOR00FF00,LINETHICK1; 峰1:DRAWLINE(CURRBARSCOUNT=GDCS2,RSI1,ISLASTBAR,REF(RSI1,GDCS2-1),1), COLOR00FF00,POINTDOT,LINETHICK3; 峰2:DRAWLINE(CURRBARSCOUNT=GDCS1,RSI1,ISLASTBAR,REF(RSI1,GDCS1-1),1), COLORFFFF55,LINETHICK1; AA1:=REF(RSI1,LOWN)=LLV(RSI1,2*LOWN+1); QY1:=BACKSET(AA1,LOWN+1); CC1:=FILTER(QY1,LOWN) AND RSI1=LLV(RSI1,LOWN+1); 介入:=DRAWICON(CC1,RSI1*0.98,1); DD1:=BARSLAST(CC1); DDTS:=IF(CC1,CURRBARSCOUNT,0); YDB:=IF(DD1,REF(RSI1,DD1),RSI1); {底部} DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS); DDCS1:=CONST(DDTS1); ZDB:=REF(YDB,DD1+1); DDTS2:=REF(DDTS1,DD1+1); DDCS2:=CONST(DDTS2); 下軌:=DRAWLINE(CURRBARSCOUNT=DDCS2,RSI1,CURRBARSCOUNT=DDCS1,RSI1,1) COLORRED,LINETHICK1; 谷1:DRAWLINE(CURRBARSCOUNT=DDCS2,RSI1,ISLASTBAR,REF(RSI1,DDCS2-1),1), COLOR00AAFF,POINTDOT,LINETHICK3; 谷2:DRAWLINE(CURRBARSCOUNT=DDCS1,RSI1,ISLASTBAR,REF(RSI1,DDCS1-1),1), COLOR00FFFF,LINETHICK1; {背離信號(hào)}; A3:=CC; B3:=BARSLAST(REF(CC,1)); 頂背離:=REF(CLOSE, B3+1)<CLOSE AND REF(RSI, B3+1)>RSI AND A3; AB5:=CC1;BA5:=BARSLAST(REF(CC1,1)); 底背離:=REF(CLOSE, BA5+1)>CLOSE AND REF(RSI, BA5+1)<RSI AND AB5; Q1:=DRAWICON(頂背離>0 AND RSI>65,70,2); Q2:=DRAWICON(底背離>0 AND RSI<35,30,1); Q3:=DRAWTEXT(底背離 AND RSI<40,30,'抄'),COLORMAGENTA; Q4:=DRAWTEXT(頂背離 AND RSI>60,70,'逃'),COLORCYAN; {起爆點(diǎn)}; MV3:=EMA(V,3); MA3:=EMA(C,3); MV3角度:=ATAN((MV3/REF(MV3,1)-1)*100)*180/3.1416; MA3角度:=ATAN((MA3/REF(MA3,1)-1)*100)*180/3.1416; MV5:=EMA(V,5); MA5:=EMA(C,5); MV5角度:=ATAN((MV5/REF(MV5,1)-1)*100)*180/3.1416; MA5角度:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416; MV10:=EMA(V,10); MA10:=EMA(C,10); MV10角度:=ATAN((MV10/REF(MV10,1)-1)*100)*180/3.1416; MA10角度:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416; 強(qiáng)弱度:=(MV3角度+MA3角度+MV5角度+MA5角度+MV10角度+MA10角度)/6,COLORFFFFFF; QBD:=CROSS(強(qiáng)弱度,50) AND COUNT(強(qiáng)弱度>50,7)<=3; 天量:=IF(強(qiáng)弱度>=80,16,DRAWNULL),COLOR00FF00,NODRAW; 啟爆:=IF(QBD AND COUNT(QBD,4)=1,20,DRAWNULL),COLORFF00FF,NODRAW; 倍量:=IF(V/REF(V,1)>=1.95,10,DRAWNULL),COLOR00FFFF,NODRAW; {視窗}; MFI:=(H-L)*100000/V,NODRAW,COLOR33FF33; 視窗:=IF(C>0,16,DRAWNULL),CIRCLEDOT,COLORWHITE,LINETHICK2; 綠窗:=IF(MFI>=REF(MFI,1)*1.1 AND V>=REF(V,1)*1.1,10,0),STICK,COLORGREEN,NODRAW; 衰退:=IF(MFI<=REF(MFI,1)*0.9 AND V<=REF(V,1)*0.9,10,0),STICK,COLORWHITE,NODRAW; 偽裝:=IF(MFI>=REF(MFI,1)*1.1 AND V<=REF(V,1)*0.9,10,0),STICK,COLOREE5500,NODRAW; 蟄伏:=IF(MFI<=REF(MFI,1)*0.9 AND V>=REF(V,1)*1.1,10,0),STICK,COLORYELLOW,NODRAW; DRAWTEXT(ISLASTBAR AND 偽裝,20,'★'),COLORCYAN; DRAWTEXT(ISLASTBAR AND 衰退,20,'★'),COLORWHITE; DRAWTEXT(ISLASTBAR AND 綠窗,20,'★'),COLORGREEN; DRAWTEXT(ISLASTBAR AND 蟄伏,20,'★'),COLORYELLOW; DRAWTEXT(ISLASTBAR AND 天量,80,'★'),COLORGREEN; DRAWTEXT(ISLASTBAR AND 啟爆,50,'★'),COLORMAGENTA; {副圖顯示}; RSI:RSI1,COLORDDDDDD; {完}; GM {周MACD}; WMACD:'MACD.MACD#WEEK',COLORFF5300,POINTDOT,LINETHICK3,NODRAW; WDIF:='MACD.DIF#WEEK',COLORGREEN,NODRAW; Z1:=STICKLINE('MACD.MACD#WEEK'>=0,0,'MACD.MACD#WEEK',5,0),COLOR000055; Z2:=STICKLINE('MACD.MACD#WEEK'<0,0,'MACD.MACD#WEEK',5,0),COLOR515100; Z3:STICKLINE(ISLASTBAR,WMACD,WMACD*0.99,10,1),COLOR515100; {日MACD}; DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26),COLORFFFFFF,LINETHICK1; DEAA:=EMA(DIFF,9),COLOR00FFFF; MACDD:=(DIFF-DEAA)*2,COLORSTICK; STICKLINE(MACDD>=REF(MACDD,1),0,MACDD,1.5,1),COLORRED; STICKLINE(MACDD<REF(MACDD,1),0,MACDD,1.5,1),COLORCYAN; UPP:BARSLASTCOUNT(MACD>REF(MACD,1)),COLOR0000FF,NODRAW; DOWN:BARSLASTCOUNT(MACD<REF(MACD,1)),COLOR00FF00,NODRAW; {背離檢測(cè)棒}; RS:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K1:=MA(RS,3); D1:=MA(K1,3); VA1:=HHV(DEAA,53); VA2:=LLV(DEAA,55); VA3:=DEAA-(DIFF-DEAA); UP:=IF(DIFF>VA1 AND DEAA=VA1,MAX(LLV(VA1,10),VA3),VA1); DN:=IF(DIFF<VA2 AND DEAA=VA2,MIN(HHV(VA2,10),VA3),VA2); BASE:=IF(DIFF<DN AND D1<50,0.01,DRAWNULL),CIRCLEDOT,COLORRED; G5:=STICKLINE(DIFF<DN AND D1<50,-0.6,-0.5,3,1),COLORRED; TOP:=IF(DIFF>UP AND D1>50,-0.01,DRAWNULL),CIRCLEDOT,COLORFF8855; G6:=STICKLINE(DIFF>UP AND D1>50,0.6,0.5,3,1),COLORFF8855; {指標(biāo)線}; MACD:MACDD,NODRAW; DIF:DIFF,COLORFFFFFF,LINETHICK1; Q:=IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORMAGENTA; DEA:DEAA,COLORYELLOW,LINETHICK1; {背離} AA:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(AA=2,21)=1; DRAWTEXT(二次金叉,0,' 二次金叉'),COLORYELLOW; A1:=BARSLAST(REF(CROSS(DIF,DEA),1)); 底背離:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA); 底背:=DRAWLINE(A1=0,DEA,底背離,DEA,0),COLORYELLOW,LINETHICK2; DRAWICON(底背離,0,1); A2:=BARSLAST(REF(CROSS(DEA,DIF),1)); 頂背離:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF); 頂背:=DRAWLINE(A2=0,DEA,頂背離,DEA,0),COLORGREEN,LINETHICK2; DRAWICON(頂背離,0,2); {完}; GA {背景色}; STICKLINE(C>0,20,30,4,0),COLOR332222; STICKLINE(C>0,60,50,4,0),COLOR222222; STICKLINE(C>0,3,-7,4,0),COLOR112222; {參數(shù)}; N:=14;M:=6; {指標(biāo)線}; TRR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N); HDD :=HIGH-REF(HIGH,1); LDD :=REF(LOW,1)-LOW; DMPP:=EXPMEMA(IF(HDD>0&&HDD>LDD,HDD,0),N); DMMM:=EXPMEMA(IF(LDD>0&&LDD>HDD,LDD,0),N); PDII:=DMPP*100/TRR/8,COLORFFFFFF; MDII:=DMMM*100/TRR/8,COLOR00FF00; ADXXX:=EXPMEMA(ABS(MDII-PDII)/(MDII+PDII)*100,M); PM:=PDII/MDII,COLOR00DDCC,NODRAW; TJ1:=PDII>MDII; TJ2:=PDII<=MDII; DRAWTEXT(ISLASTBAR AND TJ1,55,'▲'),COLOR0000FF; DRAWTEXT(ISLASTBAR AND TJ2,55,'▲'),COLORFF6633; STICKLINE(C>0,5,0,8,0),COLOR539853; DRAWBAND(PDII,RGB(233,34,13),MDII,RGB(13,233,233)); STICKLINE(ADXXX>50,53,50,3,1),COLORGREEN; {買入條件} LC:=REF(CLOSE,1); RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100); TTR:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10); HD:=(HIGH - REF(HIGH,1)); LD:=(REF(LOW,1) - LOW); DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10); DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10); PDI:=((DMP * 100) / TTR); MDI:=((DMM * 100) / TTR); ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5); AV:=(RSI5 + ADX); DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5); WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10))); NEWVOL:=(RSI5 - WR10); 階段底部:=(AV + NEWVOL); 趨勢(shì)線:=LLV(階段底部,1),COLOR00FF00,NODRAW; D1:=STICKLINE(趨勢(shì)線<20,23,22,13,1),COLOR0000FF,LINETHICK3; D2:=STICKLINE(趨勢(shì)線>230,78,77,12,1),COLORCYAN,LINETHICK3; F:=EMA(CLOSE,3); MA15:=EMA(CLOSE,21); TTJ:=CROSS(F,MA15); 上:=EMA(C,3),COLORBLUE,LINETHICK1; 中:=EMA(C,5),COLORWHITE,LINETHICK1; 下:=EMA(中,5),COLOR00FF00,LINETHICK1; QQ:= C<中; MM:=上>REF(上,1) AND REF(上,1)<REF(上,2) ; V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20); V2:=(1-7/100)*(DMA(CLOSE,V1)); V3:=(1+7/100)*(DMA(CLOSE,V1)); V5:=MA((LOW+HIGH+CLOSE)/3,5); M1:=MEMA(CLOSE,5); M2:=ATAN((M1/REF(M1,1)-1)*100)*180/3.1416; M3:=IF(M2>0,M2,M2); M5:=MA(CLOSE,5),COLOR888899; M13:=MA(CLOSE,13),COLORFF00F0,LINETHICK2; VAR01:=CLOSE=HHV(C,4) AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND C>=REF(C,1) AND C>=REF(C,2); {收盤價(jià)=4日內(nèi)收盤價(jià)的最高值 AND 昨收>=2日前的收盤價(jià)} VAR02:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4); {收盤價(jià)=4日內(nèi)收盤價(jià)的最高值 AND 昨收=4日內(nèi)收盤價(jià)的最低值} VAR03:=CLOSE=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND C<REF(C,1) AND C<REF(C,2); {收盤價(jià)=4日內(nèi)收盤價(jià)的最低值 AND (昨收<2日前的收盤價(jià)} VAR04:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1); {昨收=4日內(nèi)收盤價(jià)的最低值 AND 收盤價(jià)>=2日前的收盤價(jià)} VAR05:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) AND REF(C,2)>=REF(C,4) AND C<REF(C,1); {昨收=4日內(nèi)收盤價(jià)的最高值 AND 收盤價(jià)<2日前的收盤價(jià)} VAR06:=V5>REF(V5,1) AND REF(V5,1)<REF(V5,2); {今日V5向上形成拐點(diǎn)} VAR07:=LOW<HHV(V5,13) AND HIGH>HHV(V5,13) AND CLOSE>REF(C,1) AND CLOSE>OPEN; VAR08:=VAR07 AND COUNT(VAR06,2); VAR09:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6); VAR10:=EMA(MA(C,13),13); VAR11:=FILTER((LLV(VAR09,2)=LLV(VAR09,7) AND COUNT(VAR09<0,2) AND CROSS(VAR09,MA(VAR09,2)))=1,5); VAR12:=FILTER((HHV(VAR09,2)=HHV(VAR09,7) AND COUNT(VAR09>50,2) AND CROSS(MA(VAR09,2),VAR09))=1,1); VAR13:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10; VAR14:=FILTER(((CROSS(VAR13,0) OR CROSS(C,VAR10)) AND VAR11)=1,3); VAR15:=MA(C,18)>=REF(MA(C,18),3) AND CROSS(C,MA(C,18)); VAR16:=VAR08 AND NOT(REF(VAR08,1)); RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; 金叉:=CROSS(J,D); 死叉:=CROSS(D,J); 買1:=(VAR14 OR VAR15) AND VAR11; 買2:=(VAR14 OR VAR15) AND VAR04; 買3:=(VAR14 OR VAR15) AND VAR02; 買4:=(VAR02 AND VAR11) OR (VAR04 AND VAR11); 買5:=(金叉 AND VAR04) OR (金叉 AND VAR02) OR (金叉 AND VAR11); TTJ0:=VAR16; TTJ1:=買1 OR 買2 OR 買3 OR 買4 OR 買5 AND MM; XG0:=TTJ AND TTJ0; XG1:=TTJ AND TTJ1; XG11:=XG0 OR XG1; {以下波浪理論浪底重疊'買底'選股原碼} PL5:=ZIG(3,5); EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3); EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3); PL10:=ZIG(3,10); EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3); EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3); PL20:=ZIG(3,20); EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3); EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3); PL40:=ZIG(3,40); 走強(qiáng)1:=BARSLAST(PL5<REF(PL5,1)); 走弱1:=BARSLAST(PL5>REF(PL5,1)); 走強(qiáng)2:=BARSLAST(PL10<REF(PL10,1)); 走弱2:=BARSLAST(PL10>REF(PL10,1)); 走強(qiáng)3:=BARSLAST(PL20<REF(PL20,1)); 走弱3:=BARSLAST(PL20>REF(PL20,1)); ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走強(qiáng)2),0); ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走強(qiáng)2),0); DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0); DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0); ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走強(qiáng)3),0); ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走強(qiáng)3),0); DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0); DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0); TJ11:=EN2 AND ZTJZ5=1; TJ22:=EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2; TJ33:=EN2 AND DTJZ10=1; TJ44:=EN3 AND ZTJZ10=1; TJ55:=EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2; XG22:=TJ11 OR TJ22 OR TJ33 OR TJ44 OR TJ55; {以下二者結(jié)合共同選股} XG:=XG11 OR XG22; W18:=EXIST(XG,1); 買入:DRAWICON(W18 AND 趨勢(shì)線<90,0,23); {指標(biāo)線}; PDII,COLORWHITE; MDII,COLORYELLOW; 相對(duì)強(qiáng)度:PM,COLORGRAY,NODRAW; 趨勢(shì):EXPMEMA(ADXXX,6),COLORYELLOW; 力度:ADXXX,COLORCC00CC; Q:=STICKLINE(ISLASTBAR,趨勢(shì),趨勢(shì),8,0),COLORYELLOW; {完}; GK N:=9;M1:=3;M2:=3; RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; K1:=SMA(RSV,M1,1),LINETHICK1; D1:=SMA(K1,M2,1),LINETHICK1; J1:=3*K1-2*D1,COLORFF00FF,LINETHICK1; STICKLINE(J1<0,0,3,3,1),COLORYELLOW; STICKLINE(K1>90,100,103,3,1),COLORGREEN; STICKLINE(D1>85,100,103,2,1),COLORFFFF11; DRAWICON(CROSS(J1,1),J1,1); DRAWICON(K1>80 AND D1>80 AND CROSS(D1,K1),D1,2); K:K1; D:D1; J:J1; {完}; {背景}; D1:=STICKLINE(C>0,90,10,6,0),COLOR000000; D2:=STICKLINE(C>0,80,20,6,0),COLORFF2222; D3:STICKLINE(C>0,0,20,6,0),COLORFF3535; {起爆點(diǎn)}; MV3:=EMA(V,3); MA3:=EMA(C,3); MV3角度:=ATAN((MV3/REF(MV3,1)-1)*100)*180/3.1416; MA3角度:=ATAN((MA3/REF(MA3,1)-1)*100)*180/3.1416; MV5:=EMA(V,5); MA5:=EMA(C,5); MV5角度:=ATAN((MV5/REF(MV5,1)-1)*100)*180/3.1416; MA5角度:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416; MV10:=EMA(V,10); MA10:=EMA(C,10); MV10角度:=ATAN((MV10/REF(MV10,1)-1)*100)*180/3.1416; MA10角度:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416; 強(qiáng)弱度:=(MV3角度+MA3角度+MV5角度+MA5角度+MV10角度+MA10角度)/6,COLORFFFFFF; QBD:=CROSS(強(qiáng)弱度,50) AND COUNT(強(qiáng)弱度>50,7)<=3; 天量:IF(強(qiáng)弱度>=80,50,0),COLOR00FF00,LINETHICK1,NODRAW; 啟爆:IF(QBD AND COUNT(QBD,4)=1,20,0),COLORFF00FF,LINETHICK3,NODRAW; STICKLINE(啟爆=20,0,20,0,0),COLORMAGENTA; STICKLINE(天量=50,0,30,0,0),COLOR00FF00; {視窗}; MFI:=(H-L)*1000000/V; 綠窗:MFI>=REF(MFI,1)*1.1 AND V>=REF(V,1)*1.1,COLORGREEN,NODRAW; 衰退:MFI<=REF(MFI,1)*0.9 AND V<=REF(V,1)*0.9,COLORWHITE,NODRAW; 偽裝:MFI>=REF(MFI,1)*1.1 AND V<=REF(V,1)*0.9,COLORCYAN,NODRAW; 蟄伏:MFI<=REF(MFI,1)*0.9 AND V>=REF(V,1)*1.1,COLORYELLOW,NODRAW; STICKLINE(衰退,10,8,2,1),COLORFFFFFF; STICKLINE(綠窗,10,8,2,1),COLOR00FF00; STICKLINE(偽裝,10,8,2,1),COLORCYAN; STICKLINE(蟄伏,10,8,2,1),COLOR00FFFF; {動(dòng)力}; N:=14;MM:=6; TYP := (HIGH + LOW + CLOSE)/3; V1:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP<REF(TYP,1),TYP*VOL,0),N); 動(dòng)力:100-(100/(1+V1)),COLOREE33EE,LINETHICK2; 均量:=MA(動(dòng)力,MM),COLOR00FF00,LINETHICK1; {完}; |
|