歐歐 歐歐測量 2023-09-07 08:02 發(fā)表于廣西
一、指標(biāo)說明:對于持股或?qū)①I進(jìn)的個(gè)股,預(yù)計(jì)目標(biāo)位是一個(gè)重要的技能,計(jì)算出盈虧比,持有過程中可以做到心里有數(shù),波瀾不驚本。指標(biāo)利用最近的高低點(diǎn),自動計(jì)算出黃金軸心分割位。
二、主圖公式如下: 周期強(qiáng)度:=5; 高位報(bào)表:=1;低位報(bào)表:=1;強(qiáng)勢線:MA(C,9),COLORMAGENTA,LINETHICK2;A1:=REF(HIGH,周期電壓)=HHV(HIGH,13+1);D1:=FILTER(C1,周期電壓);{高點(diǎn)}A2:=REF(低電平,周期周期)=LLV(低電平,12+1);D2:=FILTER(C2,周期電壓);{低點(diǎn)}E1:=(REF(LLV(低,2*3),1)+REF(HHV(高,10),1))/2;E2:=(HIGH+LOW)/2;{高低點(diǎn)出現(xiàn)在同一K線上時(shí)可作取舍}DRAWTEXT_FIX(C>O,0.01,0.9,0,'微信公眾號:歐歐量化'),COLORRED;H1:=(D1 AND NOT(D2 AND E1>=E2)) 或 Ilastbar 或 BARSCOUNT(CLOSE)=1;H2:=D1 AND NOT(D2 AND E1>=E2);L1:=D2 AND NOT(D1 AND E1=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));LD:=I1>REF(I1,1);{過濾后低點(diǎn)}L2:=LD 或 ISLASTBAR 或 BARSCOUNT(收盤)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));HD:=I2>REF(I2,1);{過濾后高點(diǎn)}B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD)), 1)+2));E3:=后置(D3,REF(BARSLAST(HD),1)+2);HH:=E3>REF(E3,1);{查找全部長期高點(diǎn)}A4:=L>REF(L,REF(BARSLAST(LD),1)+1);B4:=REF(L,REF(BARSLAST(LD),1)+1); D4:=A4 和 B4 和 LD;E4:=后置(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{查找全部長期低點(diǎn)}H3:=HH 或 ISLASTBAR 或 BARSCOUNT(C)=1; {后面進(jìn)行過濾,方法同前。不用考慮低點(diǎn)出現(xiàn)在同一K線}X3:=REF(BARSLAST(H3),1)+1;F3:=BACKSET(H3 AND COUNT(LL,X3)>0,LLVBARS(IF(LL,L,POW(10,20)),X3));LZ:=I3>REF(I3,1); {長期低點(diǎn),也提供引用}L4:=LZ 或 ISLASTBAR 或 BARSCOUNT(C)=1;X4:=REF(BARSLAST(L4),1)+1;F4:=BACKSET(L4 AND COUNT(HH,X4)>0,HHVBARS(IF(HH,H,-POW(10,20)),X4));HZ:=I4>REF(I4,1);{長期高點(diǎn),也供給引用}K1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HZ),BARSLAST(LZ))+1);UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+低位壓力);WW:=后置(VV,REF(BARSLAST(LD),1)+2);UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+高位扭矩);WW2:=后置(VV2,REF(BARSLAST(HD),1)+2);J1:=BACKSET(ISLASTBAR,MIN(高點(diǎn),低點(diǎn))+1);注意EXT1:畫線(LD,L,HD,H,0),LINETHICK1,點(diǎn)線,COLOR0000FF;注意EXT2:畫線(HD,H,LD,L,0),LINETHICK1,點(diǎn)線,COLOR00FF00;NOTEXT3:DRAWLINE(J2,IF(HD,H,L),ISLASTBAR,IF(高點(diǎn)>低點(diǎn),H,L),0),DOTLINE,COLORFFFFFF;VAR8:=REFDATE(HHV(H,高點(diǎn)+1),日期);VAR9:=REFDATE(LLV(L,低點(diǎn)+1),DATE);高位價(jià):REF(REF(H,高點(diǎn)),1),COLORRED,NODRAW;低位價(jià):REF(REF(L,低點(diǎn)),1),COLORGREEN,NODRAW;VVA:=IF(高點(diǎn)<低點(diǎn),H11,L22)NODRAW;買入成立:=VVA,COLOR00FFFF,NODRAW;VVB:=IF(高點(diǎn)>低點(diǎn),L22,H12)NODRAW;買入不成立:=VVB,COLORGREEN,NODRAW;高位價(jià)1:=IFC(高點(diǎn)<低點(diǎn),H11,L22);低位價(jià)1:=IFC(高點(diǎn)<低點(diǎn),H12,L22);BCJ:=高位價(jià)1-低位價(jià)1,NODRAW;B11:=高位價(jià)1-(BCJ*0.382),NODRAW;B21:=高位價(jià)1-(BCJ*0.618),NODRAW;B31:=高位價(jià)1-(BCJ*1.618),NODRAW;B41:=高位價(jià)1-(BCJ*2.618),NODRAW;B51:=高位價(jià)1-(BCJ*3.618),NODRAW;B61:=高位價(jià)1-(BCJ*4.618)NODRAW;B382:畫線(VV2,CONST(B11),CURRBARSCOUNT=1,B11,1),COLORGREEN;B618:畫線(VV2,CONST(B21),CURRBARSCOUNT=1,B21,1),COLORGREEN;B1618:畫線(VV2,CONST(B31),CURRBARSCOUNT=1,B31,1),COLORGREEN;B2618:畫線(VV2,常量(B41),CURRBARSCOUNT=1,B41,1),COLORGREEN;B3618:畫線(VV2,常量(B51),CURRBARSCOUNT=1,B51,1),COLORGREEN;B4618:畫線(VV2,常量(B61),CURRBARSCOUNT=1,B61,1),COLORGREEN;DRAWTEXT(CURRBARSCOUNT=1,B382,VARCAT('(B0.382):',VAR2STR(B382,2))),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=1,B618,VARCAT('(B0.618):',VAR2STR(B618,2))),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=1,B1618,VARCAT('(B1.618):',VAR2STR(B1618,2))),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=1,B2618,VARCAT('(B2.618):',VAR2STR(B2618,2))),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=1,B3618,VARCAT('(B3.618):',VAR2STR(B3618,2))),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=1,B4618,VARCAT('(B4.618):',VAR2STR(B4618,2))),COLORWHITE;DRAWTEXT(VV,L,VARCAT('低位【A]',VAR2STR(L,2))),COLORGREEN;DRAWTEXT(VV2,H,VARCAT('高位【B】',VAR2STR(H,2))),COLORRED;粘線(VV2,H,CONST(B61),0,-1),彩色綠色;DRAWLINE(VV2,H,CURRBARSCOUNT=1,CONST(B61),0),COLORGREEN,DOTLINE;畫線(VV,L,VV2,H,0),顏色綠色,LINETHICK2;高位價(jià)2:=REF(REF(H,高點(diǎn)),1),NODRAW;低位價(jià)2:=REF(REF(L,低點(diǎn)),1),NODRAW;VVA1:=IF(高點(diǎn)>低點(diǎn),H121,DRAWNULL)NODRAW;賣出成立:=VVA1,COLOR00FFFF,NODRAW;VVB1:=IF(高點(diǎn)<低點(diǎn),L221,DRAWNULL)NODRAW;賣出不成立:=VVB1,COLORGREEN,NODRAW;高位價(jià)3:=IFC(高點(diǎn)>低點(diǎn),H111,L221);低位價(jià)3:=IFC(高點(diǎn)>低點(diǎn),H121,L221);SCJ:=(高位價(jià)3-低位價(jià)3),NODRAW;S11:=低位價(jià)3+(SCJ*0.382),NODRAW;S21:=最低價(jià)3+(SCJ*0.618),NODRAW;S31:=低位價(jià)3+(SCJ*1.618),NODRAW;S41:=低價(jià)3+(SCJ*2.618),NODRAW;S51:=低價(jià)3+(SCJ*3.618),NODRAW;S61:=低價(jià)3+(SCJ*4.618),NODRAW;S382:畫線(VV,常量(S11),CURRBARSCOUNT=1,S11,1),彩色;S618:畫線(VV,CONST(S21),CURRBARSCOUNT=1,S21,1),彩色;S1618:畫線(VV,常量(S31),CURRBARSCOUNT = 1,S31,1),彩色;S2618:畫線(VV,常量(S41),CURRBARSCOUNT = 1,S41,1),彩色;S3618:畫線(VV,常量(S51),CURRBARSCOUNT = 1,S51,1),彩色;S4618:畫線(VV,常量(S61),CURRBARSCOUNT = 1,S61,1),彩色;DRAWTEXT(CURRBARSCOUNT=1,S382,VARCAT('(S0.382):',VAR2STR(S382,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=1,S618,VARCAT('(S0.618):',VAR2STR(S618,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=1,S1618,VARCAT('(S1.618):',VAR2STR(S1618,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=1,S2618,VARCAT('(S2.618):',VAR2STR(S2618,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=1,S3618,VARCAT('(S3.618):',VAR2STR(S3618,2))),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=1,S4618,VARCAT('(S4.618):',VAR2STR(S4618,2))),COLORYELLOW;粘線(VV,L,CONST(S61),0,-1),彩色;DRAWLINE(VV,L,CURRBARSCOUNT=1,CONST(S61),0),彩色,點(diǎn)線;繪制線(VV2,H,VV,L,0),彩色,LINETHICK2;繪圖圖標(biāo)(VV2,H,39); 風(fēng)險(xiǎn)提示:本指標(biāo)公式僅作為知識分享,模擬測試不構(gòu)成任何投資建議,不作投資參考。
|