VAR1:=1000;
VAR2:=10;
VAR3:=3;
VAR4:=TOTALBARSCOUNT<VAR1;
VAR5:=IF(VAR4,TOTALBARSCOUNT,VAR1);
VAR6:=CURRBARSCOUNT>VAR5;
VAR7:=IF(VAR6,0,VAR5);
VAR8:=IF(C>REF(C,1),vol,-VOL);
VAR9:=SUM(VAR8,0)/CAPITAL;
VAR10:=IF(VAR7,VAR9,DRAWNULL),NODRAW;
VAR11:=MA(VAR10,VAR3)>=REF(MA(VAR10,VAR3),1);
STICKLINE(C>REF(C,1),REF(VAR10,1),VAR10,3,1),COLORRED;
STICKLINE(C<REF(C,1),REF(VAR10,1),VAR10,3,1),COLORCYAN;
空占优:IF(VAR7,MA(VAR10,VAR3),DRAWNULL),COLORGREEN,LINETHICK3;
多占优:IF(VAR7 AND VAR11,MA(VAR10,VAR3),DRAWNULL),COLORRED,LINETHICK3;
趋势:IF(VAR7,MA(VAR10,VAR2),DRAWNULL),COLORGREEN;
VAR17:=crOSS(MA(VAR10,VAR3),MA(VAR10,VAR2));
VAR18:=VAR17 AND NOT(C<REF(C,1)) AND NOT(REF((VAR7 AND VAR11),1));
DRAWICON(VAR18,多占优,9);