大智慧指标公式源码概况:

指标类别:大智慧公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、大智慧缠论公式

  

JJ:AMOUNT/VOL/100;  

MA144:MA(JJ,144);  

G:=MA(C,5);  

D:=MA(C,10);  

HH:=REF(H,5)=HHV(H,11);  

LL:=REF(L,5)=LLV(L,11);  

FG01:=BACKSET(HH,6)>BACKSET(HH,5);  

FD01:=BACKSET(LL,6)>BACKSET(LL,5);  

FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01)ANDG>D,FG01,  

IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0));  

FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01)ANDD>G,FD01,  

IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0));  

FG0:=FG02ANDH=HHV(H,BARSLAST(FD02));  

FD0:=FD02ANDL=LLV(L,BARSLAST(FG02));  

GP:IF(FG0,H,DRAWNULL),CIRCLEDOT,COLORCYAN;  

DP:IF(FD0,L,DRAWNULL),CIRCLEDOT,COLORCYAN;  

GQ:=L>REF(H,1)ANDDAY!=REF(DAY,1);  

DQ:=H<REF(L,1)ANDDAY!=REF(DAY,1);  

GQL:=REF(L,BARSLAST(GQ));  

DQH:=REF(H,BARSLAST(DQ));  

FGH:=REF(H,BARSLAST(FG0));  

FGL:=REF(L,BARSLAST(FG0));  

FGH1:=REF(H,BARSLAST(FG0)+1);  

FGL1:=REF(L,BARSLAST(FG0)+1);  

FGH2:=REF(H,BARSLAST(FG0)+2);  

FGL2:=REF(L,BARSLAST(FG0)+2);  

FDH:=REF(H,BARSLAST(FD0));  

FDL:=REF(L,BARSLAST(FD0));  

FDH1:=REF(H,BARSLAST(FD0)+1);  

FDL1:=REF(L,BARSLAST(FD0)+1);  

FDH2:=REF(H,BARSLAST(FD0)+2);  

FDL2:=REF(L,BARSLAST(FD0)+2);  

FGZH:=IF(FGL<=FGL1,FGH2,FGH1);  

FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1));  

FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1));  

FDZL:=IF(FDH>=FDH1,FDL2,FDL1);  

FG1:=FGH>FDZHANDFG0;  

FD1:=FDL<FGZLANDFD0;  

FG:=FG1ANDFGH>FDHANDFGL>FDLANDFGL1>FDL;  

FD:=FD1ANDFDL<FGLANDFDH<FGHANDFDH1<FGH;  

BH0:=(H<=REF(H,1)ANDL>=REF(L,1))OR(H>=REF(H,1)ANDL<=REF(L,1));  

BHG:=COUNT(BH0,BARSLAST(FD0));  

BHD:=COUNT(BH0,BARSLAST(FG0));  

BGQ:=COUNT(GQ,BARSLAST(FD0));  

BDQ:=COUNT(DQ,BARSLAST(FG0));  

BK0:=IF(BHG>0,BHG+2+1,IF(BHD,BHD+2+1,3));  

BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0));  

G1X:=(FGANDBARSLAST(FD)>BK);  

D1X:=(FDANDBARSLAST(FG)>BK);  

G1:=(FG0ANDREF(H,BARSLAST(FG0))>=REF(H,BARSLAST(G1X))ANDBARSLAST(D1X)>BARSLAST(G1X))  

OR(FG1ANDCOUNT(GQ,BARSLAST(FD1))>0ANDREF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X)));  

D1:=(FD0ANDREF(L,BARSLAST(FD0))<=REF(L,BARSLAST(D1X))ANDBARSLAST(G1X)>BARSLAST(D1X))  

OR(FD1ANDCOUNT(DQ,BARSLAST(FG1))>0ANDREF(L,BARSLAST(FD1))<REF(H,BARSLAST(D1X)));  

G1H:=IF(BARSLAST(D1)>BARSLAST(G1),REF(H,BARSLAST(G1)),REF(H,BARSLAST(D1))),;  

D1L:=IF(BARSLAST(G1)>BARSLAST(D1),REF(L,BARSLAST(D1)),REF(L,BARSLAST(G1)));  

G2:=G1ANDH=HHV(G1H,BARSLAST(D1)+1)ANDH>REF(H,1)ANDBARSLAST(D1)>BARSLAST(G1);  

D2:=D1ANDL=LLV(D1L,BARSLAST(G1)+1)ANDL<REF(L,1)ANDBARSLAST(G1)>BARSLAST(D1);  

G3:=G2OR(FG0ANDREF(H,BARSLAST(FG0))>REF(H,BARSLAST(G2))ANDBARSLAST(D2)>BARSLAST(G2));  

D3:=D2OR(FD0ANDREF(L,BARSLAST(FD0))<REF(L,BARSLAST(D2))ANDBARSLAST(G2)>BARSLAST(D2));  

GPB:IF(G1X,H,DRAWNULL),CIRCLEDOT,COLORYELLOW;  

DPB:IF(D1X,L,DRAWNULL),CIRCLEDOT,COLORYELLOW;  

{画线}  

NN:=G3;UU:=D3;  

L1:DRAWLINE(UU,L,NN,H,0),COLORLIGREEN;L2:DRAWLINE(NN,H,UU,L,0),COLORLIGREEN;  

N1:=10;N2:=10;DISP:=2;  

K:=IF(PERIOD=5,1,{日}  

IF(PERIOD=6,1,{周}  

IF(PERIOD=7,1,{月}  

IF(PERIOD=8,1,{多分钟}  

IF(PERIOD=9,1,{多日}  

IF(PERIOD=10,1,{季}  

IF(PERIOD=11,2,{年}  

IF(PERIOD=4,1,{60F}  

IF(PERIOD=3,1,{30F}  

IF(PERIOD=2,1,{15F}  

IF(PERIOD=1,1{5F},1{1F})))))))))))/10;  

P1:=PEAK(1,K*N1,1);  

P2:=PEAK(1,K*N1,2);  

WP1:=PEAKBARS(1,K*N1,1);  

WP2:=PEAKBARS(1,K*N1,2);  

T1:=TROUGH(2,K*N2,1);  

T2:=TROUGH(2,K*N2,2);  

WT1:=TROUGHBARS(2,K*N2,1);  

WT2:=TROUGHBARS(2,K*N2,2);  

TJ1:=P1>T1ANDP2>T2;  

ZD:=MAX(T1,T2);  

ZG:=MIN(P1,P2);  

LL:=MIN(T1,T2);  

HH:=MAX(P1,P2);  

TJ2:=FILTER(ZG>ZD,2);  

TJ3:=ZG=REF(ZG,BARSLAST(TJ2))ORZD=REF(ZD,BARSLAST(TJ2));  

TJ4:=TJ1&&TJ2&&NOT(TJ3);  

TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));  

TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));  

TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4),1));  

TJ8:=TJ4&&NOT(TJ5ORTJ6ORTJ7);  

ZSD:=IF(TJ8,ZD,DRAWNULL);  

ZSG:=IF(TJ8,ZG,DRAWNULL);  

ZSH:=IF(TJ8,HH,DRAWNULL);  

ZSL:=IF(TJ8,LL,DRAWNULL);  

STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;  

STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;  

DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;  

中枢高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED;  

中枢低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGREEN;  

{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;  

中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;}  

趋势高:PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;  

趋势低:PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;  

局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);  

局部低点预选B:=BACKSET(局部低点预选A=0ANDREF(局部低点预选A,1)=1,2);  

局部低点预选C:=IF(局部低点预选B=1ANDREF(局部低点预选B,1)=0,-1,0);  

局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);  

局部高点预选B:=BACKSET(局部高点预选A=0ANDREF(局部高点预选A,1)=1,2);  

局部高点预选C:=IF(局部高点预选B=1ANDREF(局部高点预选B,1)=0,1,0);  

缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));  

距前高天:=BARSLAST(局部高点预选C=1);  

距前低天:=BARSLAST(局部低点预选C=-1);  

小值周期:=LOWRANGE(L);  

大值周期:=TOPRANGE(H);  

低保留AA:=IF(局部低点预选C=-1ANDREF(距前高天,1)>REF(距前低天,1)ANDLLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);  

低保留AB:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND(距前高天>=4ORLLV(缺口判断,距前高天)=-1ORLLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);  

低保留S:=IF((低保留AA=-1OR低保留AB=-1)ANDL<REF(H,距前高天+1),-1,0);  

预判:=IF((距前低天<4ANDHHV(缺口判断,距前低天)!=1)ORREF(低保留S,距前低天)=0,1,0);  

判断:=IF(局部高点预选C=1ANDREF(距前低天,1)<=REF(距前高天,1)AND预判=1AND大值周期>REF(小值周期,距前低天+1)AND大值周期>REF(小值周期,距前低天)AND大值周期>REF(大值周期,距前高天),1,0);  

高保留A:=IF(局部高点预选C=1ANDREF(距前低天,1)>REF(距前高天,1)ANDHHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);  

高保留B:=IF(局部高点预选C=1ANDREF(距前低天,1)<=REF(距前高天,1)ANDREF(低保留S,距前低天)=-1AND(距前低天>=4ORHHV(缺口判断,距前低天)=1),1,0);  

高保留:=IF((高保留A=1OR高保留B=1OR判断=1)ANDH>REF(L,距前低天+1),1,0);  

预判A:=IF((距前高天<4ANDHHV(缺口判断,距前高天)!=1)ORREF(高保留,距前高天)=0,1,0);  

判断A:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND预判A=1AND小值周期>REF(大值周期,距前高天+1)AND小值周期>REF(大值周期,距前高天)AND小值周期>REF(小值周期,距前低天),-1,0);  

低保留A:=IF(局部低点预选C=-1ANDREF(距前高天,1)>REF(距前低天,1)ANDLLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);  

低保留B:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND(距前高天>=4ORLLV(缺口判断,距前高天)=-1OR判断A=-1),-1,0);  

低保留:=IF((低保留A=-1OR低保留B=-1)ANDL<REF(H,距前高天+1),-1,0);  

距前高天A:=BARSLAST(高保留=1);  

距前低天A:=BARSLAST(低保留=-1);  

预判X:=IF((距前低天A<4ANDHHV(缺口判断,距前低天A)!=1)ORREF(低保留,距前低天A)=0,1,0);  

判断X:=IF(局部高点预选C=1ANDREF(距前低天A,1)<=REF(距前高天A,1)AND预判X=1AND大值周期>REF(小值周期,距前低天A+1)AND大值周期>REF(小值周期,距前低天A)AND大值周期>REF(大值周期,距前高天A),1,0);  

高保留XA:=IF(局部高点预选C=1ANDREF(距前低天A,1)>REF(距前高天A,1)ANDHHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);  

高保留XB:=IF(局部高点预选C=1ANDREF(距前低天A,1)<=REF(距前高天A,1)ANDREF(低保留,距前低天A)=-1AND(距前低天A>=4ORHHV(缺口判断,距前低天A)=1),1,0);  

高保留X:=IF((高保留XA=1OR高保留XB=1OR判断X=1)ANDH>REF(L,距前低天A+1),1,0);  

预判XA:=IF((距前高天A<4ANDHHV(缺口判断,距前高天A)!=1)ORREF(高保留XA,距前高天A)=0,1,0);  

判断XA:=IF(局部低点预选C=-1ANDREF(距前高天A,1)<=REF(距前低天A,1)AND预判XA=1AND小值周期>REF(大值周期,距前高天A+1)AND小值周期>REF(大值周期,距前高天A)AND小值周期>REF(小值周期,距前低天A),-1,0);  

低保留XA:=IF(局部低点预选C=-1ANDREF(距前高天A,1)>REF(距前低天A,1)ANDLLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);  

低保留XB:=IF(局部低点预选C=-1ANDREF(距前高天A,1)<=REF(距前低天A,1)AND(距前高天A>=4ORLLV(缺口判断,距前高天A)=-1OR判断XA=-1),-1,0);  

低保留X:=IF((低保留XA=-1OR低保留XB=-1)ANDL<REF(H,距前高天A+1),-1,0);  

距前高天YA:=BARSLAST(高保留X=1);  

距前低天YA:=BARSLAST(低保留X=-1);  

预判YX:=IF((距前低天YA<4ANDHHV(缺口判断,距前低天YA)!=1)ORREF(低保留X,距前低天YA)=0,1,0);  

判断YX:=IF(局部高点预选C=1ANDREF(距前低天YA,1)<=REF(距前高天YA,1)AND预判YX=1AND大值周期>REF(小值周期,距前低天YA+1)AND大值周期>REF(小值周期,距前低天YA)AND大值周期>REF(大值周期,距前高天YA),1,0);  

高保留YXA:=IF(局部高点预选C=1ANDREF(距前低天YA,1)>REF(距前高天YA,1)ANDHHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);  

高保留YXB:=IF(局部高点预选C=1ANDREF(距前低天YA,1)<=REF(距前高天YA,1)ANDREF(低保留X,距前低天YA)=-1AND(距前低天YA>=4ORHHV(缺口判断,距前低天YA)=1),1,0);  

高保留YX:=IF((高保留YXA=1OR高保留YXB=1OR判断YX=1)ANDH>REF(L,距前低天YA+1),1,0);  

预判YXA:=IF((距前高天YA<4ANDHHV(缺口判断,距前高天YA)!=1)ORREF(高保留YXA,距前高天YA)=0,1,0);  

判断YXA:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)<=REF(距前低天YA,1)AND预判YXA=1AND小值周期>REF(大值周期,距前高天YA+1)AND小值周期>REF(大值周期,距前高天YA)AND小值周期>REF(小值周期,距前低天YA),-1,0);  

低保留YXA:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)>REF(距前低天YA,1)ANDLLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);  

低保留YXB:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)<=REF(距前低天YA,1)AND(距前高天YA>=4ORLLV(缺口判断,距前高天YA)=-1OR判断YXA=-1),-1,0);  

低保留YX:=IF((低保留YXA=-1OR低保留YXB=-1)ANDL<REF(H,距前高天YA+1),-1,0);  

AAAD:=IF(高保留YX=1AND低保留YX=-1ANDH>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1AND低保留YX=-1ANDL<REF(L,REF(距前低天YA,1)+2),-1,0));  

极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);  

局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL))CIRCLEDOTCOLORYELLOW;  

DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;  

DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW;  

DD1:=BARSLAST(ABS(极点保留)!=1);  

DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;  

STICKLINE(极点保留=1,局部极点,局部极点,30,1),COLORCYAN;  

DRAWNUMBER(极点保留=1,局部极点,局部极点)COLORCYAN;  

DRAWTEXT(极点保留=-1,局部极点,'买'),COLORRED;  

STICKLINE(极点保留=-1,局部极点,局部极点,30,1),COLORRED;  

DRAWNUMBER(极点保留=-1,局部极点,局部极点)COLORRED;  

MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;判:IF(MA5<REF(MA5,1),MA5,DRAWNULL),COLORWHITE,LINETHICK2;

image.png

二、缠论三买公式源码

  

{N1:1,100,10;N2:1,100,10;DISP:=1,3,2};  

N1:=10;  

N2:=10;  

DISP:=2;  

K:=IF(PERIOD=5,1,{日}  

IF(PERIOD=6,1,{周}  

IF(PERIOD=7,1,{月}  

IF(PERIOD=8,1,{多分钟}  

IF(PERIOD=9,1,{多日}  

IF(PERIOD=10,1,{季}  

IF(PERIOD=11,2,{年}  

IF(PERIOD=4,1,{60F}  

IF(PERIOD=3,1,{30F}  

IF(PERIOD=2,1,{15F}  

IF(PERIOD=1,1{5F},1{1F})))))))))))/10;  

P1:=PEAK(1,K*N1,1);  

P2:=PEAK(1,K*N1,2);  

WP1:=PEAKBARS(1,K*N1,1);  

WP2:=PEAKBARS(1,K*N1,2);  

T1:=TROUGH(2,K*N2,1);  

T2:=TROUGH(2,K*N2,2);  

WT1:=TROUGHBARS(2,K*N2,1);  

WT2:=TROUGHBARS(2,K*N2,2);  

TJ1:=P1>T1ANDP2>T2;  

ZD:=MAX(T1,T2);  

ZG:=MIN(P1,P2);  

LL:=MIN(T1,T2);  

HH:=MAX(P1,P2);  

TJ2:=FILTER(ZG>ZD,2);  

TJ3:=ZG=REF(ZG,BARSLAST(TJ2))ORZD=REF(ZD,BARSLAST(TJ2));  

TJ4:=TJ1&&TJ2&&NOT(TJ3);  

TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));  

TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));  

TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4),1));  

TJ8:=TJ4&&NOT(TJ5ORTJ6ORTJ7);  

ZSD:=IF(TJ8,ZD,DRAWNULL);  

ZSG:=IF(TJ8,ZG,DRAWNULL);  

ZSH:=IF(TJ8,HH,DRAWNULL);  

ZSL:=IF(TJ8,LL,DRAWNULL);  

STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;  

STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;  

DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;  

中枢高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED;  

中枢低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGREEN;  

{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;  

中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;}  

趋势高:PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;  

趋势低:PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;  

局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);  

局部低点预选B:=BACKSET(局部低点预选A=0ANDREF(局部低点预选A,1)=1,2);  

局部低点预选C:=IF(局部低点预选B=1ANDREF(局部低点预选B,1)=0,-1,0);  

局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);  

局部高点预选B:=BACKSET(局部高点预选A=0ANDREF(局部高点预选A,1)=1,2);  

局部高点预选C:=IF(局部高点预选B=1ANDREF(局部高点预选B,1)=0,1,0);  

缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));  

距前高天:=BARSLAST(局部高点预选C=1);  

距前低天:=BARSLAST(局部低点预选C=-1);  

小值周期:=LOWRANGE(L);  

大值周期:=TOPRANGE(H);  

低保留AA:=IF(局部低点预选C=-1ANDREF(距前高天,1)>REF(距前低天,1)ANDLLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);  

低保留AB:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND(距前高天>=4ORLLV(缺口判断,距前高天)=-1ORLLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);  

低保留S:=IF((低保留AA=-1OR低保留AB=-1)ANDL<REF(H,距前高天+1),-1,0);  

预判:=IF((距前低天<4ANDHHV(缺口判断,距前低天)!=1)ORREF(低保留S,距前低天)=0,1,0);  

判断:=IF(局部高点预选C=1ANDREF(距前低天,1)<=REF(距前高天,1)AND预判=1AND大值周期>REF(小值周期,距前低天+1)AND大值周期>REF(小值周期,距前低天)AND大值周期>REF(大值周期,距前高天),1,0);  

高保留A:=IF(局部高点预选C=1ANDREF(距前低天,1)>REF(距前高天,1)ANDHHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);  

高保留B:=IF(局部高点预选C=1ANDREF(距前低天,1)<=REF(距前高天,1)ANDREF(低保留S,距前低天)=-1AND(距前低天>=4ORHHV(缺口判断,距前低天)=1),1,0);  

高保留:=IF((高保留A=1OR高保留B=1OR判断=1)ANDH>REF(L,距前低天+1),1,0);  

预判A:=IF((距前高天<4ANDHHV(缺口判断,距前高天)!=1)ORREF(高保留,距前高天)=0,1,0);  

判断A:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND预判A=1AND小值周期>REF(大值周期,距前高天+1)AND小值周期>REF(大值周期,距前高天)AND小值周期>REF(小值周期,距前低天),-1,0);  

低保留A:=IF(局部低点预选C=-1ANDREF(距前高天,1)>REF(距前低天,1)ANDLLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);  

低保留B:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND(距前高天>=4ORLLV(缺口判断,距前高天)=-1OR判断A=-1),-1,0);  

低保留:=IF((低保留A=-1OR低保留B=-1)ANDL<REF(H,距前高天+1),-1,0);  

距前高天A:=BARSLAST(高保留=1);  

距前低天A:=BARSLAST(低保留=-1);  

预判X:=IF((距前低天A<4ANDHHV(缺口判断,距前低天A)!=1)ORREF(低保留,距前低天A)=0,1,0);  

判断X:=IF(局部高点预选C=1ANDREF(距前低天A,1)<=REF(距前高天A,1)AND预判X=1AND大值周期>REF(小值周期,距前低天A+1)AND大值周期>REF(小值周期,距前低天A)AND大值周期>REF(大值周期,距前高天A),1,0);  

高保留XA:=IF(局部高点预选C=1ANDREF(距前低天A,1)>REF(距前高天A,1)ANDHHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);  

高保留XB:=IF(局部高点预选C=1ANDREF(距前低天A,1)<=REF(距前高天A,1)ANDREF(低保留,距前低天A)=-1AND(距前低天A>=4ORHHV(缺口判断,距前低天A)=1),1,0);  

高保留X:=IF((高保留XA=1OR高保留XB=1OR判断X=1)ANDH>REF(L,距前低天A+1),1,0);  

预判XA:=IF((距前高天A<4ANDHHV(缺口判断,距前高天A)!=1)ORREF(高保留XA,距前高天A)=0,1,0);  

判断XA:=IF(局部低点预选C=-1ANDREF(距前高天A,1)<=REF(距前低天A,1)AND预判XA=1AND小值周期>REF(大值周期,距前高天A+1)AND小值周期>REF(大值周期,距前高天A)AND小值周期>REF(小值周期,距前低天A),-1,0);  

低保留XA:=IF(局部低点预选C=-1ANDREF(距前高天A,1)>REF(距前低天A,1)ANDLLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);  

低保留XB:=IF(局部低点预选C=-1ANDREF(距前高天A,1)<=REF(距前低天A,1)AND(距前高天A>=4ORLLV(缺口判断,距前高天A)=-1OR判断XA=-1),-1,0);  

低保留X:=IF((低保留XA=-1OR低保留XB=-1)ANDL<REF(H,距前高天A+1),-1,0);  

距前高天YA:=BARSLAST(高保留X=1);  

距前低天YA:=BARSLAST(低保留X=-1);  

预判YX:=IF((距前低天YA<4ANDHHV(缺口判断,距前低天YA)!=1)ORREF(低保留X,距前低天YA)=0,1,0);  

判断YX:=IF(局部高点预选C=1ANDREF(距前低天YA,1)<=REF(距前高天YA,1)AND预判YX=1AND大值周期>REF(小值周期,距前低天YA+1)AND大值周期>REF(小值周期,距前低天YA)AND大值周期>REF(大值周期,距前高天YA),1,0);  

高保留YXA:=IF(局部高点预选C=1ANDREF(距前低天YA,1)>REF(距前高天YA,1)ANDHHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);  

高保留YXB:=IF(局部高点预选C=1ANDREF(距前低天YA,1)<=REF(距前高天YA,1)ANDREF(低保留X,距前低天YA)=-1AND(距前低天YA>=4ORHHV(缺口判断,距前低天YA)=1),1,0);  

高保留YX:=IF((高保留YXA=1OR高保留YXB=1OR判断YX=1)ANDH>REF(L,距前低天YA+1),1,0);  

预判YXA:=IF((距前高天YA<4ANDHHV(缺口判断,距前高天YA)!=1)ORREF(高保留YXA,距前高天YA)=0,1,0);  

判断YXA:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)<=REF(距前低天YA,1)AND预判YXA=1AND小值周期>REF(大值周期,距前高天YA+1)AND小值周期>REF(大值周期,距前高天YA)AND小值周期>REF(小值周期,距前低天YA),-1,0);  

低保留YXA:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)>REF(距前低天YA,1)ANDLLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);  

低保留YXB:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)<=REF(距前低天YA,1)AND(距前高天YA>=4ORLLV(缺口判断,距前高天YA)=-1OR判断YXA=-1),-1,0);  

低保留YX:=IF((低保留YXA=-1OR低保留YXB=-1)ANDL<REF(H,距前高天YA+1),-1,0);  

AAAD:=IF(高保留YX=1AND低保留YX=-1ANDH>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1AND低保留YX=-1ANDL<REF(L,REF(距前低天YA,1)+2),-1,0));  

极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);  

局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL))CIRCLEDOTCOLORYELLOW;  

DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;  

DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW;  

DD1:=BARSLAST(ABS(极点保留)!=1);{  

DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;  

DRAWTEXT(极点保留=-1,局部极点,'买'),COLORRED;}  

MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;判:IF(MA5<REF(MA5,1),MA5,DRAWNULL),COLORWHITE,LINETHICK2;  

N1:=10;N2:=10;DISP:=2;  

K:=IF(PERIOD=5,1,{日}  

IF(PERIOD=6,1,{周}  

IF(PERIOD=7,1,{月}  

IF(PERIOD=8,1,{多分钟}  

IF(PERIOD=9,1,{多日}  

IF(PERIOD=10,1,{季}  

IF(PERIOD=11,2,{年}  

IF(PERIOD=4,1,{60F}  

IF(PERIOD=3,1,{30F}  

IF(PERIOD=2,1,{15F}  

IF(PERIOD=1,1{5F},1{1F})))))))))))/10;  

P1:=PEAK(1,K*N1,1);  

P2:=PEAK(1,K*N1,2);  

WP1:=PEAKBARS(1,K*N1,1);  

WP2:=PEAKBARS(1,K*N1,2);  

T1:=TROUGH(2,K*N2,1);  

T2:=TROUGH(2,K*N2,2);  

WT1:=TROUGHBARS(2,K*N2,1);  

WT2:=TROUGHBARS(2,K*N2,2);  

TJ1:=P1>T1ANDP2>T2;  

ZD:=MAX(T1,T2);  

ZG:=MIN(P1,P2);  

LL:=MIN(T1,T2);  

HH:=MAX(P1,P2);  

TJ2:=FILTER(ZG>ZD,2);  

TJ3:=ZG=REF(ZG,BARSLAST(TJ2))ORZD=REF(ZD,BARSLAST(TJ2));  

TJ4:=TJ1&&TJ2&&NOT(TJ3);  

TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));  

TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));  

TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4),1));  

TJ8:=TJ4&&NOT(TJ5ORTJ6ORTJ7);  

ZSD:=IF(TJ8,ZD,DRAWNULL);  

ZSG:=IF(TJ8,ZG,DRAWNULL);  

ZSH:=IF(TJ8,HH,DRAWNULL);  

ZSL:=IF(TJ8,LL,DRAWNULL);  

STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;  

STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;  

DRAWTEXT(DISP=2,ZSH,'中枢'),COLORRED;  

中枢高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CROSSDOT,COLORLIRED;  

中枢低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CROSSDOT,COLORLIGREEN;  

中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;  

中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;  

趋势高:PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;  

趋势低:PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;  

局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);  

局部低点预选B:=BACKSET(局部低点预选A=0ANDREF(局部低点预选A,1)=1,2);  

局部低点预选C:=IF(局部低点预选B=1ANDREF(局部低点预选B,1)=0,-1,0);  

局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);  

局部高点预选B:=BACKSET(局部高点预选A=0ANDREF(局部高点预选A,1)=1,2);  

局部高点预选C:=IF(局部高点预选B=1ANDREF(局部高点预选B,1)=0,1,0);  

缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));  

距前高天:=BARSLAST(局部高点预选C=1);  

距前低天:=BARSLAST(局部低点预选C=-1);  

小值周期:=LOWRANGE(L);  

大值周期:=TOPRANGE(H);  

低保留AA:=IF(局部低点预选C=-1ANDREF(距前高天,1)>REF(距前低天,1)ANDLLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);  

低保留AB:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND(距前高天>=4ORLLV(缺口判断,距前高天)=-1ORLLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);  

低保留S:=IF((低保留AA=-1OR低保留AB=-1)ANDL<REF(H,距前高天+1),-1,0);  

预判:=IF((距前低天<4ANDHHV(缺口判断,距前低天)!=1)ORREF(低保留S,距前低天)=0,1,0);  

判断:=IF(局部高点预选C=1ANDREF(距前低天,1)<=REF(距前高天,1)AND预判=1AND大值周期>REF(小值周期,距前低天+1)AND大值周期>REF(小值周期,距前低天)AND大值周期>REF(大值周期,距前高天),1,0);  

高保留A:=IF(局部高点预选C=1ANDREF(距前低天,1)>REF(距前高天,1)ANDHHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);  

高保留B:=IF(局部高点预选C=1ANDREF(距前低天,1)<=REF(距前高天,1)ANDREF(低保留S,距前低天)=-1AND(距前低天>=4ORHHV(缺口判断,距前低天)=1),1,0);  

高保留:=IF((高保留A=1OR高保留B=1OR判断=1)ANDH>REF(L,距前低天+1),1,0);  

预判A:=IF((距前高天<4ANDHHV(缺口判断,距前高天)!=1)ORREF(高保留,距前高天)=0,1,0);  

判断A:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND预判A=1AND小值周期>REF(大值周期,距前高天+1)AND小值周期>REF(大值周期,距前高天)AND小值周期>REF(小值周期,距前低天),-1,0);  

低保留A:=IF(局部低点预选C=-1ANDREF(距前高天,1)>REF(距前低天,1)ANDLLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);  

低保留B:=IF(局部低点预选C=-1ANDREF(距前高天,1)<=REF(距前低天,1)AND(距前高天>=4ORLLV(缺口判断,距前高天)=-1OR判断A=-1),-1,0);  

低保留:=IF((低保留A=-1OR低保留B=-1)ANDL<REF(H,距前高天+1),-1,0);  

距前高天A:=BARSLAST(高保留=1);  

距前低天A:=BARSLAST(低保留=-1);  

预判X:=IF((距前低天A<4ANDHHV(缺口判断,距前低天A)!=1)ORREF(低保留,距前低天A)=0,1,0);  

判断X:=IF(局部高点预选C=1ANDREF(距前低天A,1)<=REF(距前高天A,1)AND预判X=1AND大值周期>REF(小值周期,距前低天A+1)AND大值周期>REF(小值周期,距前低天A)AND大值周期>REF(大值周期,距前高天A),1,0);  

高保留XA:=IF(局部高点预选C=1ANDREF(距前低天A,1)>REF(距前高天A,1)ANDHHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);  

高保留XB:=IF(局部高点预选C=1ANDREF(距前低天A,1)<=REF(距前高天A,1)ANDREF(低保留,距前低天A)=-1AND(距前低天A>=4ORHHV(缺口判断,距前低天A)=1),1,0);  

高保留X:=IF((高保留XA=1OR高保留XB=1OR判断X=1)ANDH>REF(L,距前低天A+1),1,0);  

预判XA:=IF((距前高天A<4ANDHHV(缺口判断,距前高天A)!=1)ORREF(高保留XA,距前高天A)=0,1,0);  

判断XA:=IF(局部低点预选C=-1ANDREF(距前高天A,1)<=REF(距前低天A,1)AND预判XA=1AND小值周期>REF(大值周期,距前高天A+1)AND小值周期>REF(大值周期,距前高天A)AND小值周期>REF(小值周期,距前低天A),-1,0);  

低保留XA:=IF(局部低点预选C=-1ANDREF(距前高天A,1)>REF(距前低天A,1)ANDLLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);  

低保留XB:=IF(局部低点预选C=-1ANDREF(距前高天A,1)<=REF(距前低天A,1)AND(距前高天A>=4ORLLV(缺口判断,距前高天A)=-1OR判断XA=-1),-1,0);  

低保留X:=IF((低保留XA=-1OR低保留XB=-1)ANDL<REF(H,距前高天A+1),-1,0);  

距前高天YA:=BARSLAST(高保留X=1);  

距前低天YA:=BARSLAST(低保留X=-1);  

预判YX:=IF((距前低天YA<4ANDHHV(缺口判断,距前低天YA)!=1)ORREF(低保留X,距前低天YA)=0,1,0);  

判断YX:=IF(局部高点预选C=1ANDREF(距前低天YA,1)<=REF(距前高天YA,1)AND预判YX=1AND大值周期>REF(小值周期,距前低天YA+1)AND大值周期>REF(小值周期,距前低天YA)AND大值周期>REF(大值周期,距前高天YA),1,0);  

高保留YXA:=IF(局部高点预选C=1ANDREF(距前低天YA,1)>REF(距前高天YA,1)ANDHHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);  

高保留YXB:=IF(局部高点预选C=1ANDREF(距前低天YA,1)<=REF(距前高天YA,1)ANDREF(低保留X,距前低天YA)=-1AND(距前低天YA>=4ORHHV(缺口判断,距前低天YA)=1),1,0);  

高保留YX:=IF((高保留YXA=1OR高保留YXB=1OR判断YX=1)ANDH>REF(L,距前低天YA+1),1,0);  

预判YXA:=IF((距前高天YA<4ANDHHV(缺口判断,距前高天YA)!=1)ORREF(高保留YXA,距前高天YA)=0,1,0);  

判断YXA:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)<=REF(距前低天YA,1)AND预判YXA=1AND小值周期>REF(大值周期,距前高天YA+1)AND小值周期>REF(大值周期,距前高天YA)AND小值周期>REF(小值周期,距前低天YA),-1,0);  

低保留YXA:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)>REF(距前低天YA,1)ANDLLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);  

低保留YXB:=IF(局部低点预选C=-1ANDREF(距前高天YA,1)<=REF(距前低天YA,1)AND(距前高天YA>=4ORLLV(缺口判断,距前高天YA)=-1OR判断YXA=-1),-1,0);  

低保留YX:=IF((低保留YXA=-1OR低保留YXB=-1)ANDL<REF(H,距前高天YA+1),-1,0);  

AAAD:=IF(高保留YX=1AND低保留YX=-1ANDH>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1AND低保留YX=-1ANDL<REF(L,REF(距前低天YA,1)+2),-1,0));  

极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);  

局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL))CIRCLEDOTCOLORYELLOW;  

DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;  

DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW;  

DD1:=BARSLAST(ABS(极点保留)!=1);  

DRAWTEXT(极点保留=1,局部极点,'*'),COLORGREEN;  

DRAWTEXT(极点保留=-1,局部极点,'*'),COLORRED;  

MA5:MA(CLOSE,5),COLORFFFFFF,LINETHICK1;{判:IF(MA5<REF(MA5,1),MA5,DRAWNULL),COLORWHITE,LINETHICK2;};  

MA10:MA(CLOSE,10),COLORFF00FF,LINETHICK1;{判:IF(MA5<REF(MA5,1),MA5,DRAWNULL),COLORWHITE,LINETHICK2;};  

DRAWGBKlast(c>0,strip(RGB(0,0,160),RGB(0,0,0),0));  

{内通道}  

重心:WMA((2*C+H+L)/4,2),COLOR00FFFF,LINETHICK0;  

UPPERS:重心*(1+2.382/100),COLOR990099,LAYER0;  

DRAWTEXT(BARSTATUS=2,UPPERS,''+NUMTOSTRN(UPPERS,2)+''),ALIGN0,COLOR0077FF,LINETHICK2,LAYER0;  

LOWERS:重心*(1-2.382/100),COLORFF0000,LAYER0;  

DRAWTEXT(BARSTATUS=2,LOWERS,''+NUMTOSTRN(LOWERS,2)+''),ALIGN0,COLOR00FFff,LINETHICK2,LAYER0;  

{中通道}  

VAR2:=重心*VOL;  

Var3:=(EMA(Var2,3)/EMA(VOL,3)+EMA(Var2,8)/EMA(VOL,8)+EMA(Var2,13)/EMA(VOL,13)+EMA(Var2,21)/EMA(VOL,21))/4;  

UP:=Var3*1.0809;  

DN:=Var3*0.9191;;  

{外通道}  

VAR4:=EMA(重心,19);  

LUP:=EMA(VAR4*1.119,3);  

LDN:=EMA(VAR4*0.881,3);  

UPK:=UP-UPPERS;  

FILLRGN(UPPERS,UPPERS+UPK*0.2,UP>UPPERS,RGB(120,0,50)),LAYER2;  

FILLRGN(UPPERS,UPPERS+UPK*0.4,UP>UPPERS,RGB(150,0,180)),LAYER3;  

FILLRGN(UPPERS,UPPERS+UPK*0.5,UP>UPPERS,RGB(180,0,100)),LAYER4;  

FILLRGN(UPPERS,UPPERS+UPK*0.6,UP>UPPERS,RGB(200,0,150)),LAYER5;  

FILLRGN(UPPERS,UPPERS+UPK*0.8,UP>UPPERS,RGB(220,0,180)),LAYER6;  

FILLRGN(UPPERS,UPPERS+UPK,UP>UPPERS,RGB(230,0,50)),LAYER7;  

UPL:=LUP-UP;  

FILLRGN(UP,UP+UPL*0.2,UP<LUP,RGB(200,0,255)),LAYER2;  

FILLRGN(UP,UP+UPL*0.4,UP<LUP,RGB(180,0,220)),LAYER3;  

FILLRGN(UP,UP+UPL*0.5,UP<LUP,RGB(150,0,180)),LAYER4;  

FILLRGN(UP,UP+UPL*0.6,UP<LUP,RGB(120,0,150)),LAYER5;  

FILLRGN(UP,UP+UPL*0.8,UP<LUP,RGB(100,0,120)),LAYER6;  

FILLRGN(UP,UP+UPL,UP<LUP,RGB(80,0,80)),LAYER7;  

FILLRGN(UPPERS,LOWERS,LOWERS<UPPERS,RGB(40,30,20)),LAYER1;  

UPD:=LOWERS-DN;  

FILLRGN(LOWERS,LOWERS-UPD*0.2,LOWERS>DN,RGB(0,80,80)),LAYER3;  

FILLRGN(LOWERS,LOWERS-UPD*0.4,LOWERS>DN,RGB(0,100,100)),LAYER4;  

FILLRGN(LOWERS,LOWERS-UPD*0.6,LOWERS>DN,RGB(0,150,100)),LAYER5;  

FILLRGN(LOWERS,LOWERS-UPD*0.8,LOWERS>DN,RGB(0,200,55)),LAYER6;  

FILLRGN(LOWERS,LOWERS-UPD,LOWERS>DN,RGB(0,230,30)),LAYER7;  

UPL:=DN-LDN;  

FILLRGN(DN,DN-UPL*0.2,DN>LDN,RGB(0,180,180)),LAYER3;  

FILLRGN(DN,DN-UPL*0.4,DN>LDN,RGB(0,150,150)),LAYER4;  

FILLRGN(DN,DN-UPL*0.6,DN>LDN,RGB(0,120,100)),LAYER5;  

FILLRGN(DN,DN-UPL*0.8,DN>LDN,RGB(0,100,80)),LAYER6;  

FILLRGN(DN,DN-UPL,DN>LDN,RGB(0,80,50)),LAYER7;  

{红股.绿币的趋势线}  

MA5:WMA(重心,5),COLOR00FF00,DOTLINE,LAYER0;  

PARTLINE(MA5,(MA5>REF(MA5,1)),rgb(255,100,0)),linethick2,LAYER0;  

{K线}  

STICKLINE(CLOSE>OPENorCLOSE=OPENandCLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred,LAYER0;  

STICKLINE(CLOSE>OPENorCLOSE=OPENandCLOSE>REF(CLOSE,1),OPEN,CLOSE,0,0),colorred,LAYER0;  

STICKLINE(CLOSE<OPENorCLOSE=OPENandCLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),colorcyan,LAYER0;  

STICKLINE(CLOSE<OPENorCLOSE=OPENandCLOSE<=REF(CLOSE,1),OPEN,CLOSE,0,0),colorcyan,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,8,0),COLOR008800,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,7,0),COLOR009900,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,6,0),COLOR00AA00,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,5,0),COLOR00BB00,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,4,0),COLOR00CC00,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLOR00DD00,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2,0),COLOR00EE00,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1,0),COLOR00FF00,LAYER0;  

STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0,0),COLOR00FF00,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0),COLOR000066,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0),COLOR000088,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0),COLOR0000AA,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0),COLOR0000BB,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0),COLOR0000CC,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR0000DD,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),COLOR0000EE,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0),COLOR0000FF,LAYER0;  

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0),COLOR0000FF,LAYER0;

image.png

[源码注释]大智慧公式动态翻译结果

  

输出MA1:收盘价的5日简单移动平均  

输出均线:收盘价的10日简单移动平均  

输出MA3:收盘价的26日简单移动平均  

输出MA4:收盘价的55日简单移动平均  

VAR201赋值:(收盘价-13日内最低价的最低值)/(7日内最高价的最高值-13日内最低价的最低值)*100  

VAR301赋值:VAR201的3日[1日权重]移动平均的3日[1日权重]移动平均/28.57  

VAR401赋值:VAR301的4日指数移动平均  

快赋值:3*VAR301-2*VAR401  

快11赋值:快上穿VAR301ANDVAR301<21AND收阳线  

当满足条件快11时,在开盘价位置书写文字

每日公式解答:

  

股票公式编写要求:  

当日股价从最低点涨幅大于5%的选股公式  

股票公式编写结果:  

(c-L)/c*100>=5andc>o

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。