RSVK:= (CLOSE-LLV(LOW,9))/(HHV(HIGH,90- LLV(LOW,9))*100; K:=SMA(RSVK,3,1); D:=SMA(K,3,1); J:=3*K-2*D; MA3:=MA(C,3); 买入1:=CROSS(C,MA3) AND MA3>=REF(MA3,1)*0.99; 买入2:= C> MA3 AND (C- MA3)/ MA3 <0.035 AND MA3 > REF(MA3,1)*0.998; 买入3:= C> MA3 AND REF(MA3,1) <REF(MA3,2) AND REF(MA3,2) < REF(MA3,3) ; 买入4:= C> MA3 AND J<80AND CROSS(J,D); 不买入1:= J>80OR COUNT(CROSS(J,D),2) >0; 不买入2:=( C -MA3)/ >=0.035; 不买入3:=O > C*1.02; 不买入4:="CCI" >100; 不买入5:= REF (C,1) > REF (MA3,1)AND REF (C,2) > REF (MA3,2); 不买入6:=COUNT(COUNT(MA3>REF(MA3,1)*1.0015,4)>=3; 判断买入:=NOT(不买入1OR不买入2OR不买入3OR不买入4OR不买入5OR不买入6)AND(买入1OR买入2OR买入3OR买入4); 买入条件:=FILTER(判断买入,1); 买入:0.5*((COUNT(REF(判断买入,1),3)=0OR CROSS(J,D))AND(COUNT(REF(判断买入,1),1)=0AND买入条件),COLORRED; 买入天数:=BARSLAST(买入); 买入价:REF(C, 买入天数),LINETHICK0; 手续费:=0.003; 盈亏:100*((C-买入价)/买入价-手续费), LINETHICK0, COLORE66878; 百分之5止盈:买入价*(1+0.05+手续费), LINETHICK0, COLOR000999; 百分之2止损:买入价*(1-0.025+手续费), LINETHICK0, COLORGREEN; 止盈条件:H>百分之5止盈; 止盈天数:BARSLAST(止盈条件); 止损条件:C-百分之2止损: 止损天数;= BARSLAST(止损条件); 止盈:= 买入天数>止盈天数AND止盈天数<止损天数; 止盈天数2= BARSLAST(止盈条件AND止盈AND(COUNT(REF(止盈,1),1)=0); 止损:= 买入天数>止损天数AND止盈天数>止损天数; 止损天数2:= BARSLAST(止损AND(COUNT(REF(止损,1),1)=0); DRAWTEXT(止盈AND(COUNT(REF(止盈,1),1)=0AND; 买入天数>止损天数2,0.5'止盈'); DRAWICOUNT(止盈AND(COUNT(REF(止盈,1),1)=0 AND买入天数>止损天数2,0.3,1); DRAWTEXT(止损AND(COUNT(REF(止损,1),1)=0AND买入天数>止盈天数2,-0.3'止损'); DRAWICOUNT (止损AND(COUNT(REF(止损,1),1)=0AND买入天数>止盈天数2,-0.5,2); 逃命价:HHV(H, 买入天数)*0.905, , LINETHICK0; 逃命条件:=C<逃命价; 逃命天数:= BARSLAST(逃命条件); 逃命:= 买入天数>逃命天数; 逃命天数2: =BARSLAST (逃命AND(COUNT(REF(逃命,1),1)=0); DIFF:EMA(CLOSE,12)-EMA(CLOSE,26)COLORBLUE; |