增减仓:OPI-REF(OPI,1),COLORMAGENTA,NODRAW;
AAT:=IF(C=REF(C,1)&&OPI>REF(OPI,1),1,0),NODRAW;
BBT:=IF(C=REF(C,1)&&OPI<REF(OPI,1),1,0),NODRAW;
多头增仓:IF(C>REF(C,1)&&OPI>REF(OPI,1) || AAT,1,NULL),NODRAW,COLORRED;
空头减仓:IF(C>REF(C,1)&&OPI<REF(OPI,1) || BBT,1,NULL),NODRAW,COLORGREEN;
空头增仓:IF(C<REF(C,1)&&OPI>REF(OPI,1),1,NULL),NODRAW,RGB(255,0,255);
多头减仓:IF(C<REF(C,1)&&OPI<REF(OPI,1),1,NULL),NODRAW,COLORGREEN;
增减:GETPRICE('TODAYDELTAOPI'),COLORYELLOW,NODRAW;//取盘口日增仓
STICKLINE(空头增仓,0,OPI-REF(OPI,1),RGB(255,162,255),0);
STICKLINE(多头增仓,0,OPI-REF(OPI,1),COLORYELLOW,0);
STICKLINE(空头减仓,0,OPI-REF(OPI,1),COLORGREEN,0);
STICKLINE(多头减仓,0,OPI-REF(OPI,1),COLORCYAN,0);
N:=10;
LLT:=LLV(OPI,N),DOT;
DRAWICON(CROSS((OPI-LLT)/LLT*100>=5,0.5),增减仓,1);
HHT:=HHV(OPI,N),DOT;
DRAWICON(CROSS((HHT-OPI)/HHT*100>=5,0.5),增减仓,2);
资金净流入:SCALE*V*UNIT*AVPRICE,NODRAW;
资金净流出:(1-SCALE)*V*UNIT*AVPRICE,NODRAW;
资金净流入百分比:(SCALE*V*UNIT*AVPRICE)/(资金净流入+资金净流出)*100,COLORRED,NODRAW;
资金净流出百分比:((1-SCALE)*V*UNIT*AVPRICE)/(资金净流入+资金净流出)*100,COLORGREEN,NODRAW;