VAR1:=EMA(C,3);
VAR2:=EMA(C,5);
VAR3:=EMA(C,10);
VAR4:=EMA(C,20);
VAR5:=EMA(C,30);
VAR6:=(VAR2+VAR3+VAR4+VAR5)/4;
VAR7:=(VAR6-REF(VAR6,15))/REF(VAR6,15)*100;
VAR8:=(VAR6-REF(VAR6,15))/REF(VAR6, 15)*100;
VAR9:=EMA(VAR7,8);
STICKLINE(VAR7<1*REF(VAR7,1),H,L,0.5,0),colorblue;
STICKLINE(VAR7<1*REF(VAR7,1),O,C,5, 1),colorblue;
STICKLINE(VAR7>1*REF(VAR7,1),H,L,0.5,0),colorred;
STICKLINE(VAR7>1*REF(VAR7,1),O,C,5, 1),colorred;
STICKLINE(VAR7<1*REF(VAR7,1) AND VAR9>1*REF(VAR9,1),H,L,0.5,0),colorgreen;
STICKLINE(VAR7<1*REF(VAR7,1) AND VAR9>1*REF(VAR9,1),O,C,5, 1),colorgreen;
买进价:=((C-REF(MA(C,6),1))/6+MA(C,6))*1.004;
买进条件:=CROSS(C,买进价) AND 买进价>REF(买进价,1);
STICKLINE(买进条件,H,L,0.5,1),colorwhite,LINETHICK2;
STICKLINE(买进条件,O,C,6,0),colorwhite,LINETHICK2;
加码价:=((C-REF(MA(C,18),1))/18+MA(C,18))*1.004;
加码条件:=CROSS(C,加码价) AND 加码价>REF(加码价,1);
STICKLINE(加码条件,H,L,0.5,1),coloryellow,LINETHICK2;
STICKLINE(加码条件,O,C,6,0),coloryellow,LINETHICK2;
拉升力:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,30)-LLV(LOW,36))*1.6*CLOSE;
拉升力A:=SMA(拉升力,6.3,1);
波峰波谷:=SMA(拉升力A,3,1);
拉升力B:=3*拉升力A-2.1*波峰波谷;
空方:=3*波峰波谷-1* 拉升力A;
做空:IF(空方>拉升力B,拉升力B,空方),LINETHICK2,COLOR00FF00;
多头:IF(做空>=REF(做空,1),做空,DRAWNULL),colorred,LINETHICK3;
空头:IF(做空<REF(做空,1),做空,DRAWNULL),colorgreen,LINETHICK3;