老師,幫忙改成一個(gè)指標(biāo) [文華財(cái)經(jīng)]
作者:文華財(cái)經(jīng) 來(lái)源:cxh99.com 發(fā)布時(shí)間:2019年01月15日 點(diǎn)擊數(shù):
【收藏到本網(wǎng)的會(huì)員中心】
-
咨詢(xún)內(nèi)容:
?M:=DUALVOLUME('M');N:=DUALVOLUME('N');DRAWCOLUMNCHART(N,SCALE>=0.5,M>=0);?V1:SCALE*V,NODRAW;V2:(1-SCALE)*V,NODRAW;NBA:=BARSLAST(DATE<>REF(DATE,1))+1;AY:=BACKSET(ISLASTBAR,HHVBARS(V1,NBA)+1),NODRAW;BY:=BACKSET(ISLASTBAR,HHVBARS(V2,NBA)+1),NODRAW;DRAWCOLORKLINE(CROSS(AY,0.5),COLORMAGENTA,0);DRAWCOLORKLINE(CROSS(BY,0.5),COLORCYAN,0);DRAWSL(ISLASTBAR&&NOT(EXIST(C>VALUEWHEN(CROSS(AY,0.5),H),DAYBARPOS)),VALUEWHEN(CROSS(AY,0.5),H),0,-BARSLAST(CROSS(AY,0.5)),0,COLORMAGENTA),LINETHICK5;//DRAWHORIZONTALLINE(,H,COLORMAGENTA),LINETHICK5;DRAWSL(ISLASTBAR&&NOT(EXIST(C<VALUEWHEN(CROSS(BY,0.5),L),DAYBARPOS)),VALUEWHEN(CROSS(BY,0.5),L),0,-BARSLAST(CROSS(BY,0.5)),0,COLORCYAN),LINETHICK5;//DRAWHORIZONTALLINE(,L,COLORCYAN),LINETHICK5;DRAWSL(ISLASTBAR&&EXIST(C>VALUEWHEN(CROSS(AY,0.5),H),DAYBARPOS),VALUEWHEN(CROSS(AY,0.5),H),0,-BARSLAST(CROSS(AY,0.5)),0,COLORMAGENTA),DOT;DRAWSL(ISLASTBAR&&EXIST(C<VALUEWHEN(CROSS(BY,0.5),L),DAYBARPOS),VALUEWHEN(CROSS(BY,0.5),L),0,-BARSLAST(CROSS(BY,0.5)),0,COLORCYAN),DOT;
N:=DAYBARPOS;X:=LLVBARS(L,N);K1:=IF(X>=1,LLV(L,X),100000);K2:=IF(X<(N-1),REF(LLV(L,REFX1(N-1-X,10000)),X+1),100000);低點(diǎn):=LLV(L,N);次低點(diǎn):=MIN(K1,K2);T2:=BACKSET(ISLASTBAR,BARSLAST(L=REFX1(次低點(diǎn),50))+1);CROSS(T2&&次低點(diǎn)>2000,0.5),ICON(1,'ICO1');
T:=HHVBARS(H,N);B1:=IF(T>=1,HHV(H,T),0);B2:=IF(T<N-1,REF(HHV(H,REFX1(N-1-T,10000)),T+1),0);高點(diǎn):=HHV(H,N);次高點(diǎn):=MAX(B1,B2);
G2:=BACKSET(ISLASTBAR,BARSLAST(H=REFX1(次高點(diǎn),50))+1);CROSS(G2&&次高點(diǎn)>2000,0.5),ICON(1,'ICO1');
和成一個(gè)幅圖指標(biāo),有重復(fù)定義
??
?來(lái)源:程序化99
-
文華技術(shù)人員:
?參考:
?M:=DUALVOLUME(''; N:=DUALVOLUME(''; DRAWCOLUMNCHART(N,SCALE>=0.5,M>=0); ?V1:SCALE*V,NODRAW; V2:(1-SCALE)*V,NODRAW; NBA:=BARSLAST(DATE<>REF(DATE,1))+1; AY:=BACKSET(ISLASTBAR,HHVBARS(V1,NBA)+1),NODRAW; BY:=BACKSET(ISLASTBAR,HHVBARS(V2,NBA)+1),NODRAW; DRAWCOLORKLINE(CROSS(AY,0.5),COLORMAGENTA,0); DRAWCOLORKLINE(CROSS(BY,0.5),COLORCYAN,0); DRAWSL(ISLASTBAR&&NOT(EXIST(C>VALUEWHEN(CROSS(AY,0.5),H),DAYBARPOS)),VALUEWHEN(CROSS(AY,0.5),H),0,-BARSLAST(CROSS(AY,0.5)),0,COLORMAGENTA),LINETHICK5; //DRAWHORIZONTALLINE(,H,COLORMAGENTA),LINETHICK5; DRAWSL(ISLASTBAR&&NOT(EXIST(C<VALUEWHEN(CROSS(BY,0.5),L),DAYBARPOS)),VALUEWHEN(CROSS(BY,0.5),L),0,-BARSLAST(CROSS(BY,0.5)),0,COLORCYAN),LINETHICK5; //DRAWHORIZONTALLINE(,L,COLORCYAN),LINETHICK5; DRAWSL(ISLASTBAR&&EXIST(C>VALUEWHEN(CROSS(AY,0.5),H),DAYBARPOS),VALUEWHEN(CROSS(AY,0.5),H),0,-BARSLAST(CROSS(AY,0.5)),0,COLORMAGENTA),DOT; DRAWSL(ISLASTBAR&&EXIST(C<VALUEWHEN(CROSS(BY,0.5),L),DAYBARPOS),VALUEWHEN(CROSS(BY,0.5),L),0,-BARSLAST(CROSS(BY,0.5)),0,COLORCYAN),DOT;
N1:=DAYBARPOS; X:=LLVBARS(L,N1); K1:=IF(X>=1,LLV(L,X),100000); K2:=IF(X<(N1-1),REF(LLV(L,REFX1(N1-1-X,10000)),X+1),100000); 低點(diǎn):=LLV(L,N1); 次低點(diǎn):=MIN(K1,K2); T2:=BACKSET(ISLASTBAR,BARSLAST(L=REFX1(次低點(diǎn),50))+1); CROSS(T2&&次低點(diǎn)>2000,0.5),ICON(1,'CO1';
T:=HHVBARS(H,N1); B1:=IF(T>=1,HHV(H,T),0); B2:=IF(T<N1-1,REF(HHV(H,REFX1(N1-1-T,10000)),T+1),0); 高點(diǎn):=HHV(H,N1); 次高點(diǎn):=MAX(B1,B2);
G2:=BACKSET(ISLASTBAR,BARSLAST(H=REFX1(次高點(diǎn),50))+1); CROSS(G2&&次高點(diǎn)>2000,0.5),ICON(1,'CO1';
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容