以下是大智慧三点定乾坤主图画线公式
大智慧三点定乾坤主图画线公式
input:n(5,1,100),m(4,0,4),la(50,1,1000),lb(70,1,1000),lc(120,1,1000);{参数}
vv:=ZIG(4,n);
tjs:=TROUGH(m,n,1)>TROUGH(m,n,2) and TROUGH(m,n,3)>TROUGH(m,n,2);
aaz:=BACKSET(tjs,TROUGHBARS(m,n,2));
az:=aaz<REFX(aaz,1);
bbz:=BACKSET(tjs,TROUGHBARS(m,n,1));
bz:=bbz<REFX(bbz,1);
v1:=if(bz,1,0);
abz:LINEVALUE(az,LOW,bz,LOW,0,0),linethick0;
kka:=refx(abz,1)-abz;
DRAWSL(vv=abz and az,l,kka,la,0),colorred,linethick2;
ccz:=sum(abz>vv and ref(abz,1)<ref(vv,1),BARSLAST(bz))=1 and
TROUGHBARS(m,n,1)=0 and TROUGH(m,n,2)>=ref(abz,TROUGHBARS(m,n,2));
cz:=ccz>ref(ccz,1);
bcz:=LINEVALUE(bz,LOW,cz,LOW,0,0),linethick0;
kkb:=refx(bcz,1)-bcz;
DRAWSL(vv=abz and v1,l,kkb,lb,0),COLORMAGENTA,linethick2;
DRAWSL(cz,l,0,lc,0),COLORWHITE,linethick2;
DRAWTEXT(vv=abz and az,L*0.98,\’A\’),COLORWHITE;
DRAWTEXT(vv=abz and v1,L*0.98,\’B\’),COLORWHITE;
DRAWTEXT(cz,L*0.98,\’C\’),COLORWHITE;
tjd:=peak(m,n,1)<peak(m,n,2) and peak(m,n,3)<peak(m,n,2);
aad:=BACKSET(tjd,peakBARS(m,n,2));
ad:=aad<REFX(aad,1);
bbd:=BACKSET(tjd,peakBARS(m,n,1));
bd:=bbd<REFX(bbd,1);
v2:=if(bd,1,0);
abd:LINEVALUE(ad,h,bd,h,0,0),linethick0;
kkad:=refx(abd,1)-abd;
DRAWSL(vv=abd and ad,h,kkad,la,0),colorgreen,linethick2;
ccd:=sum(abd>vv and ref(abd,1)<ref(vv,1),BARSLAST(bd))=1 and
peakBARS(m,n,1)=0 and peak(m,n,2)>=ref(abd,peakBARS(m,n,2));
cd:=ccd>ref(ccd,1);
bcd:=LINEVALUE(bd,h,cd,h,0,0),linethick0;
kkbd:=refx(bcd,1)-bcd;
DRAWSL(vv=abd and v2,h,kkbd,lb,0),COLORblue,linethick2;
DRAWSL(cd,h,0,lc,0),COLORWHITE,linethick2;
DRAWTEXT(vv=abd and ad,h*1.05,\’A\’),COLORWHITE;
DRAWTEXT(vv=abd and v2,h*1.05,\’B\’),COLORWHITE;
DRAWTEXT(cd,h*1.05,\’C\’),COLORWHITE;