N:=20;M:=32;P1:=80;P2:=100;
VAR1:=(C+H+O+L)/4;
卖出:XMA(VAR1,N)*(1+P1/1000),COLORFFFFFF,LINETHICK3;
买入:XMA(VAR1,M)*(1-P2/1000),COLOR0000FF,LINETHICK3;
DRAWBAND(卖出,RGB(200,50,55),卖出*1.03,RGB(0,100,50));
DRAWBAND(买入,RGB(0,55,0),买入*0.97,RGB(55,55,0));
幅度:=100*(卖出-买入)/买入,NODRAW;
STICKLINE(卖出>LOW AND 卖出
RSV2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K2:=REF(MA(RSV2,3),1)+(RSV2-REF(MA(RSV2,3),1))/3;
D2:=REF(MA(K2,3),1)+(K2-REF(MA(K2,3),1))/3;
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
金叉:=CROSS(BB1,BB2);
DRAWTEXT(CROSS(C,买入) AND BB1>BB2 AND C>REF(O,2),买入*0.95,'买入'),COLOR0000FF;
VL:=REF(LOW,1); VH:=REF(H,1);
VAR2:=SMA(ABS(L-VL),13,1)/SMA(MAX(L-VL,0),13,1)*100;
VAR3:=MA(VAR1,13);
VAR4:=MA(VAR2,13);
VAR5:=LLV(L,34);
VAR6:=HHV(H,34);
VAR7:=EMA(IF(H>=VAR6,VAR3,0),3);
VAR8:=EMA(IF(L<=VAR5,VAR4,0),3);
VAR9:=(SMA(SMA((((CLOSE - LLV(LOW,54)) / (HHV(HIGH,54) - LLV(LOW,54))) * 100),7,1),5,1));
VAR10:=((SMA(((CLOSE - LLV(LOW,54)) / (HHV(HIGH,54) - LLV(LOW,54)) * 100),7,1)) * 16.18) - (VAR9* 10.9);
VAR11:=FILTER(IF(VAR10<=VAR9 AND VAR8>REF(VAR8,1),VAR8*8,0),55);
VAR21:=LLV(LOW,60);
VAR31:=HHV(HIGH,60);
VAR41:=EMA((CLOSE-VAR21)/(VAR31-VAR21)*100,13);
VAR51:=EMA(0.667*REF(VAR41,1)+0.333*VAR41,21);
{K线}
XG:DRAWTEXT(VAR11,L*0.98,'小金锁');