N:=13;
BC:=(H*0.382+L*0.618+O*0.382+C*0.618)/2;
LJ:=IF(INDEXC=C,BC,(BC+AMOUNT/(V*100))/2),COLORGRAY;
HT:=REF((HHV(LJ,N*0.691)+HHV(LJ,N)+HHV(LJ,N*1.309))/3,1),LINETHICK,COLORRED;
LT:=REF((LLV(LJ,N*0.691)+LLV(LJ,N)+LLV(LJ,N*1.309))/3,1),LINETHICK,COLORGREEN;
ZT:=(HT+LT)/2,LINETHICK,COLORYELLOW;
STICKLINE(ISLASTBAR=1 AND LJ<ZT,HT,LT,N*8,0),COLORBLUE;
STICKLINE(ISLASTBAR=1 AND LJ=ZT,HT,LT,N*8,0),COLORGRAY;
STICKLINE(ISLASTBAR=1 AND LJ>ZT,HT,LT,N*8,1),COLOR6600FF;
STICKLINE(ISLASTBAR=1,ZT,ZT,N*8,0),COLORYELLOW;
STICKLINE(OPEN>=CLOSE,HIGH,LOW,0,0),COLORFFCC00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF9F68;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.8,0),COLORFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.5,0),COLORFFAA11;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2,0),COLORFFBB11;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1,0),COLORFFCC22;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.4,0),COLORFFDD22;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.2,0),COLORFFEE33;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0,0),COLORFFFF33;
STICKLINE(CLOSE>OPEN,HIGH,LOW,0,0),COLORRED;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLORBROWN;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.8,0),COLOR3300CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.5,0),COLORBROWN;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),COLOR6633CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.6,0),COLOR3333FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.4,0),COLOR6633FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.2,0),COLOR3366FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.1,0),COLOR6666FF;
箱顶:HT,LINETHICK,COLORRED;
箱底:LT,LINETHICK,COLORGREEN;
箱中:ZT,LINETHICK,COLORYELLOW;
飞狐源码
n:=13;
bc:=(H*0.382+L*0.618+O*0.382+C*0.618)/2;
lj:=if(INDEXC=c,bc,(bc+AMOUNT/(V*100))/2),COLORGRAY;
HT:=ref((HHV(lj,N*0.691)+HHV(lj,N)+HHV(lj,N*1.309))/3,1),LINETHICK,COLORRED;
LT:=ref((llV(lj,N*0.691)+llV(lj,N)+llV(lj,N*1.309))/3,1),LINETHICK,COLORGREEN;
ZT:=(HT+lt)/2,LINETHICK,COLORYELLOW;
STICKLINE(ISLASTBAR=1 AND lj<ZT,HT,lT,N*20,0),COLORBLUE;
STICKLINE(ISLASTBAR=1 AND lj=ZT,HT,lT,N*20,0),COLORGRAY;
STICKLINE(ISLASTBAR=1 AND lj>ZT,HT,lT,N*20,1),COLOR6600FF;
STICKLINE(ISLASTBAR=1,zT,zT,N*20,0),COLORYELLOW;
STICKLINE(OPEN>=CLOSE,HIGH,LOW,0.2,0),colorFFCC00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,8,0),colorFF9F68;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,7,0),colorFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,6,0),colorFFAA11;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,5,0),colorFFBB11;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,4,0),colorFFCC22;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),colorFFDD22;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2,0),colorFFEE33;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1,0),colorFFFF33;
STICKLINE(CLOSE>OPEN,HIGH,LOW,0.2,0),COLORRED;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0),COLORBROWN;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0),color3300CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0),color33CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0),color6633CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0),color3333FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),color6633FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),color3366FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0),color6666FF;
箱顶:HT,LINETHICK,COLORRED;
箱底:LT,LINETHICK,COLORGREEN;
箱中:ZT,LINETHICK,COLORYELLOW; |