NN:=-3;
MID:=(3*C+O+L+H)/6;
JCCSN:=5;
FSCS:=IFF((PERIOD+NN)==3,JCCSN*13,IFF((PERIOD+NN)==2,JCCSN*26,IFF((PERIOD+NN)==1,JCCSN*52,IFF((PERIOD+NN)==0,JCCSN*156,DRAWNULL))));
商品趋势线:WMA(MID,FSCS),COLORRED,LINETHICK2;
多头趋势:IFF(商品趋势线>REF(商品趋势线,1),商品趋势线,DRAWNULL),COLORRED,LINETHICK2;
空头趋势:IFF(商品趋势线<REF(商品趋势线,1),商品趋势线,DRAWNULL),COLORFFFF00,LINETHICK2;
小周期锁定:=IFF((PERIOD+NN)==0 OR (PERIOD+NN)==1 OR (PERIOD+NN)==2 OR (PERIOD+NN)==3,1,0);
仅限5至60分钟使用:IFF(小周期锁定==0,1,DRAWNULL),NODRAW,COLORWHITE;