D3X3:REF(EMA(C,3),1),COLORWHITE;
DA:=5;
FY:=5;
CT:=1;
P:=0;
N:=3;
NS:=IF((HHV(ABS(((HHV(CLOSE,DA)/LLV(CLOSE,DA))-1)),DA)>(10/100)),5,DA);
N1:=IF((MINUTE=5),(NS*48),IF((MINUTE=20),(NS*16),IF((MINUTE=30),(NS*8),IF((MINUTE=60),(NS*4),NS))));
MM:=IF(((P=0) OR (VOL=0)),MA(CLOSE,N1),((SUM(AMOUNT,N1)/SUM(VOL,N1))/100));
M1:=REF(MM,1);
买入:=IF(CROSS(CLOSE,M1),M1,0);
卖出:=IF(CROSS(M1,CLOSE),M1,0);
DW:=BARSLAST((卖出>0));
EX10:=HHV((买入>0),(DW+1));
BJ:=IF((EX10>REF(EX10,1)),买入,0);
SJ:=IF((EX10<REF(EX10,1)),卖出,0);
DRAWICON(CROSS(CLOSE,M1),(LOW*0.995),1);
DRAWICON(CROSS(M1,CLOSE),(HIGH*1.005),2);
买卖价格:M1,LINETHICK0;
明日买卖价格:MM,COLORFFFFFF,LINETHICK0;
DRAWNUMBER(CROSS(CLOSE,M1) ,L*0.99,买卖价格),COLORYELLOW;
DRAWNUMBER(CROSS(M1,CLOSE) ,H*1.03,买卖价格),COLORWHITE;