源码
周期:=sumbars(vol,capital*3);
总额:=sum(amount,周期);
总换手:=sum(vol,周期);
cb:=(总额/总换手)/100;
长期成本:cb;
周期1:=sumbars(vol,capital*1);
总额1:=sum(amount,周期1);
总换手1:=sum(vol,周期1);
cb1:=(总额1/总换手1)/100;
成本1:cb1,coloryellow;
周期2:=sumbars(vol,capital*0.4);
总额2:=sum(amount,周期2);
总换手2:=sum(vol,周期2);
cb2:=(总额2/总换手2)/100;
短期成本2:=cb2,colorred;
VarA:=IF(cb>150,91.3,0.913);
箱体下沿:=INTPART(cb1/VarA )*VarA,coloryellow,linethick2;
STICKLINE(c,箱体下沿 ,箱体下沿 ,2000 ,1),linethick1,coloryellow ;
箱体上沿:=箱体下沿+VarA,linethick2,coloryellow ;
STICKLINE(c,箱体上沿 ,箱体上沿 ,2000 ,1),linethick1,coloryellow ;
箱体中线:=(箱体下沿+箱体上沿)/2,colorwhite,linethick2;
STICKLINE(c,箱体中线 ,箱体中线 ,2000 ,1),colorwhite,linethick1 ;
Varb:=IF(cb>150,18.26,1.826);
STICKLINE(c,INTPART(cb1/Varb )*Varb ,INTPART(cb1/Varb )*Varb ,2000 ,1),colorred,linethick2 ;
STICKLINE(c,INTPART(cb1/Varb )*Varb+varb ,INTPART(cb1/Varb )*Varb+varb ,2000 ,1),linethick2,colorred ;
STICKLINE(cb1,hhv(cb1,21)*0.998 ,llv(cb1,21)*1.002 ,1,1),coloryellow;
hhv(cb1,21) ,linethick3,colorred;
STICKLINE(cb2,hhv(cb2,13)*0.998 ,llv(cb2,13)*1.002 ,1,1),colorred;
hhv(cb2,13),linethick3,colorff0000;
llv(cb2,13),linethick3,colorff0000;}
STICKLINE(open>=close ,close ,open,9,0 ),COLORaaaaaa;
STICKLINE(open>=close ,close ,open,6,0 ),COLORbbbbbb;
STICKLINE(open>=close ,close ,open,2.4,0 ),COLORcccccc;
STICKLINE(open>=close ,close ,open,1.1,0 ),COLORdddddd;
STICKLINE(close>open,close,open,9,0 ),COLOr6666cc;
STICKLINE(close>open,close,open,6 ,0 ),COLOR7777dd;
STICKLINE(close>open,close,open,2.4 ,0 ),COLOR8888ee;
STICKLINE(close>open,close,open,1.1 ,0 ),COLOR9999ff;
STICKLINE(close>open,open,low,0.5,0 ),COLOR1199ff;
STICKLINE(close>open,close,HIGH,0.5 ,0 ),COLOR1199ff;
STICKLINE(open>=close,close,low,0.5 ,0 ),COLORcccccc;
STICKLINE(open>=close,open,HIGH,0.5 ,0 ),COLORcccccc;