編程思路破譯 N賦值:5 VARE賦值:(VARC<1) VARF賦值:VARD VAR10賦值:如果((VAR8=0)AND(VARA<1)AND(VAR4<0)的5日過濾=1),返回1,否則返回0 VAR11賦值:如果((VAR8=100)AND(VARA=100)的5日過濾=1),返回1,否則返回0 VAR12賦值:如果((VAR9=0)AND(VARB<1)AND(VAR7<0)的5日過濾=1),返回1,否則返回0 VAR13賦值:如果((VAR9=100)AND(VARB=100)的5日過濾=1),返回1,否則返回0 VAR14賦值:如果((VAR4<1)AND(VAR7<1)的30日過濾=1),返回1,否則返回0 VAR15賦值:VAR10 AND VAR12 VAR16賦值:VAR11 AND VAR13 VAR17賦值:(VAR8=0) AND VARE AND VAR14 VAR18賦值:VAR15 AND VARE AND VAR14 VAR19賦值:(VAR8=100) AND VARF VAR1A賦值:VAR16 AND VARF 輸出大盤方向:((100)*(收盤價(jià)-100日內(nèi)最低價(jià)的最低值))/(100日內(nèi)最高價(jià)的最高值-100日內(nèi)最低價(jià)的最低值)的7日指數(shù)移動(dòng)平均,COLORFF00FF 輸出獲利:VAR4,COLOR00FF00 輸出操盤手:((收盤價(jià)-393日內(nèi)收盤價(jià)的最低值)/(393日內(nèi)收盤價(jià)的最高值-393日內(nèi)收盤價(jià)的最低值))*(100),COLORFFFFFF VAR1B賦值:收盤價(jià)的2日指數(shù)移動(dòng)平均-收盤價(jià)的89日指數(shù)移動(dòng)平均 VAR1C賦值:VAR1B的30日指數(shù)移動(dòng)平均 VAR1D賦值:((2)*(VAR1B-VAR1C))*(10) VAR1E賦值:(VAR1D的3乘冪)*(0.1)+VAR1D的2乘冪 VAR1F賦值:(((最低價(jià))*(最高價(jià)))*(開盤價(jià)))*(收盤價(jià))的開方的開方 VAR20賦值:(VAR1F)*(0.97)的3日指數(shù)移動(dòng)平均 VAR21賦值:(最高價(jià)+最低價(jià)+收盤價(jià))/(3) VAR22賦值:(VAR21-VAR21的14日簡(jiǎn)單移動(dòng)平均)/((0.015)*(VAR21的14日平均絕對(duì)偏差)) VAR23賦值:(如果(VAR1D>0.015),返回VAR1E,否則返回0)/(50) 輸出莊線:VAR23,COLORFFFF00 VAR24賦值:最高價(jià)-最低價(jià)和1日前的收盤價(jià)-最高價(jià)的絕對(duì)值的較大值和1日前的收盤價(jià)-最低價(jià)的絕對(duì)值的較大值 VAR25賦值:VAR24的48日簡(jiǎn)單移動(dòng)平均 VAR26賦值:VAR24上穿VAR25 VAR27賦值:如果(VAR26的126日過濾=1),返回70,否則返回0 VAR28賦值:1日前的收盤價(jià) VAR29賦值:((收盤價(jià)-VAR28和0的較大值的6日[1日權(quán)重]移動(dòng)平均)/(收盤價(jià)-VAR28的絕對(duì)值的6日[1日權(quán)重]移動(dòng)平均))*(100) VAR2A賦值:((收盤價(jià)-VAR28和0的較大值的12日[1日權(quán)重]移動(dòng)平均)/(收盤價(jià)-VAR28的絕對(duì)值的12日[1日權(quán)重]移動(dòng)平均))*(100) VAR2B賦值:((收盤價(jià)-VAR28和0的較大值的24日[1日權(quán)重]移動(dòng)平均)/(收盤價(jià)-VAR28的絕對(duì)值的24日[1日權(quán)重]移動(dòng)平均))*(100) VAR2C賦值:如果(VAR29上穿VAR2AANDCROSS(VAR2A,VAR2B)ANDCROSS(VAR29,VAR2B)的5日過濾=1),返回50,否則返回0 VAR2D賦值:((收盤價(jià)-34日內(nèi)最低價(jià)的最低值)/(34日內(nèi)最高價(jià)的最高值-34日內(nèi)最低價(jià)的最低值))*(100) VAR2E賦值:VAR2D的3日[1日權(quán)重]移動(dòng)平均 VAR2F賦值:VAR2E的3日[1日權(quán)重]移動(dòng)平均 VAR30賦值:(3)*(VAR2E)-(2)*(VAR2F) VAR31賦值:VAR30上穿VAR2E AND VAR30上穿VAR2F AND VAR2E上穿VAR2F VAR32賦值:如果(VAR31AND(VAR30<25)AND(VAR2F<20)的5日過濾=1),返回80,否則返回0 VAR33賦值:如果((VAR17ORVAR18)的1日過濾=1),返回100,否則返回0 VAR34賦值:(大盤方向<5) AND (獲利<0) AND (操盤手=0) 輸出絕對(duì)買點(diǎn):如果((VAR34ORVAR33)的N日過濾=1),返回100,否則返回0,COLOR0000FF 輸出絕對(duì)賣點(diǎn):如果(VAR19ANDVAR16ANDVARF的2日過濾=1),返回100,否則返回0,COLOR00FF00 輸出MD1:如果((大盤方向<20)ANDVAR2CAND(VAR29<60)AND(VAR2B<40)的15日過濾=1),返回80,否則返回0,STICK,線寬為3,COLOR00FFFF 輸出MD2:如果((大盤方向<20)ANDMD1ANDVAR32的5日過濾=1),返回80,否則返回0,COLOR000080 輸出DM3:如果((大盤方向<50)ANDMD1ANDVAR32ANDVAR27的5日過濾=1),返回80,否則返回0,COLOR800080 當(dāng)滿足條件絕對(duì)買點(diǎn)時(shí),在20位置書寫文字,COLOR00FFFF 當(dāng)滿足條件MD1時(shí),在50位置書寫文字,COLORFF00FF 當(dāng)滿足條件絕對(duì)賣點(diǎn)時(shí),在90位置書寫文字,COLOR00FF00 當(dāng)滿足條件絕對(duì)買點(diǎn)時(shí),在絕對(duì)買點(diǎn)位置畫1號(hào)圖標(biāo),COLORFFFFFF 當(dāng)滿足條件絕對(duì)賣點(diǎn)時(shí),在絕對(duì)賣點(diǎn)位置畫9號(hào)圖標(biāo),COLORFFFF00 程序源碼 N:=5; vAR3:=LLV(HIGH,240); VAR4:=((100)*(CLOSE-VAR3))/(VAR3); VAR5:=REF(LLV(CLOSE,480),1); VAR6:=REF(HHV(CLOSE,480),1); VAR7:=((100)*(CLOSE-VAR5))/(VAR6-VAR5); VAR8:=((CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981)))*(100); VAR9:=((CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393)))*(100); VARA:=((CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981)))*(100); VARB:=((CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393)))*(100); VARC:=(EMA(((100)*(CLOSE-LLV(LOW,100)))/(HHV(HIGH,100)-LLV(LOW,100)),5))/(4); VARD:=IF((DATE<99991232),IF((VARC>23.16),VARC,0),0); VARE:=(VARC<1); VARF:=VARD; VAR10:=IF((FILTER((VAR8=0) AND (VARA<1) AND (VAR4<0),5)=1),1,0); VAR11:=IF((FILTER((VAR8=100) AND (VARA=100),5)=1),1,0); VAR12:=IF((FILTER((VAR9=0) AND (VARB<1) AND (VAR7<0),5)=1),1,0); VAR13:=IF((FILTER((VAR9=100) AND (VARB=100),5)=1),1,0); VAR14:=IF((FILTER((VAR4<1) AND (VAR7<1),30)=1),1,0); VAR15:=VAR10 AND VAR12; VAR16:=VAR11 AND VAR13; VAR17:=(VAR8=0) AND VARE AND VAR14; VAR18:=VAR15 AND VARE AND VAR14; VAR19:=(VAR8=100) AND VARF; VAR1A:=VAR16 AND VARF; 大盤方向:EMA(((100)*(CLOSE-LLV(LOW,100)))/(HHV(HIGH,100)-LLV(LOW,100)),7),CoLorFF00FF; 獲利:VAR4,CoLor00FF00; 操盤手:((CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393)))*(100),CoLorFFFFFF; VAR1B:=EMA(CLOSE,2)-EMA(CLOSE,89); VAR1C:=EMA(VAR1B,30); VAR1D:=((2)*(VAR1B-VAR1C))*(10); VAR1E:=(POW(VAR1D,3))*(0.1)+POW(VAR1D,2); VAR1F:=SQRT(SQRT((((LOW)*(HIGH))*(OPEN))*(CLOSE))); VAR20:=EMA((VAR1F)*(0.97),3); VAR21:=(HIGH+LOW+CLOSE)/(3); VAR22:=(VAR21-MA(VAR21,14))/((0.015)*(AVEDEV(VAR21,14))); VAR23:=(IF((VAR1D>0.015),VAR1E,0))/(50); 莊線:VAR23,CoLorFFFF00; VAR24:=MAX(MAX(HIGH-LOW,ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW)); VAR25:=MA(VAR24,48); VAR26:=CROSS(VAR24,VAR25); VAR27:=IF((FILTER(VAR26,126)=1),70,0); VAR28:=REF(CLOSE,1); VAR29:=((SMA(MAX(CLOSE-VAR28,0),6,1))/(SMA(ABS(CLOSE-VAR28),6,1)))*(100); VAR2A:=((SMA(MAX(CLOSE-VAR28,0),12,1))/(SMA(ABS(CLOSE-VAR28),12,1)))*(100); VAR2B:=((SMA(MAX(CLOSE-VAR28,0),24,1))/(SMA(ABS(CLOSE-VAR28),24,1)))*(100); VAR2C:=IF((FILTER(CROSS(VAR29,VAR2A) AND CROSS(VAR2A,VAR2B) AND CROSS(VAR29,VAR2B),5)=1),50,0); VAR2D:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100); VAR2E:=SMA(VAR2D,3,1); VAR2F:=SMA(VAR2E,3,1); VAR30:=(3)*(VAR2E)-(2)*(VAR2F); VAR31:=CROSS(VAR30,VAR2E) AND CROSS(VAR30,VAR2F) AND CROSS(VAR2E,VAR2F); VAR32:=IF((FILTER(VAR31 AND (VAR30<25) AND (VAR2F<20),5)=1),80,0); VAR33:=IF((FILTER((VAR17 OR VAR18),1)=1),100,0); VAR34:=(大盤方向<5) AND (獲利<0) AND (操盤手=0); 絕對(duì)買點(diǎn):IF((FILTER((VAR34 OR VAR33),N)=1),100,0),CoLor0000FF; 絕對(duì)賣點(diǎn):IF((FILTER(VAR19 AND VAR16 AND VARF,2)=1),100,0),CoLor00FF00; MD1:IF((FILTER((大盤方向<20) AND VAR2C AND (VAR29<60) AND (VAR2B<40),15)=1),80,0),STICK,Linethick3,CoLor00FFFF; MD2:IF((FILTER((大盤方向<20) AND MD1 AND VAR32,5)=1),80,0),CoLor000080; DM3:IF((FILTER((大盤方向<50) AND MD1 AND VAR32 AND VAR27,5)=1),80,0),CoLor800080; DRAWTEXT(絕對(duì)買點(diǎn),20,'"原碼買點(diǎn)"'),CoLor00FFFF; DRAWTEXT(MD1,50,'"周線選股買點(diǎn)"'),CoLorFF00FF; DRAWTEXT(絕對(duì)賣點(diǎn),90,'"堅(jiān)決賣出,空倉"'),CoLor00FF00; DRAWICON(絕對(duì)買點(diǎn),絕對(duì)買點(diǎn),1),CoLorFFFFFF; DRAWICON(絕對(duì)賣點(diǎn),絕對(duì)賣點(diǎn),9),CoLorFFFF00; 注: 館內(nèi)各種公式為學(xué)習(xí)編程而保存,,實(shí)戰(zhàn)使用前一定要看其中是否有未來函數(shù)并自己親自測(cè)試成功率,,決不能依據(jù)公式名稱的描述和形容去投資,據(jù)此入市造成投資損失由投資者自己承擔(dān),。 發(fā)文不易,,如獲益,歡迎贊賞,,贊賞必復(fù),! |
|