趋势线:=EMA(((KS / 10) + EMA(CLOSE,10)),3); AA牛:=-100*(趋势线-CLOSE)/趋势线; AC:=(EMA(AA牛,5) ); SSL:=EMA(CLOSE,3); MMV:=EMA(((SLOPE(CLOSE,22) * 20) + CLOSE),55); MM:=MA(MMV,1); SA:=(MM*0.985); SS:=(MA(CLOSE,5)); DD:=(MA(CLOSE,13)); GG:=(MA(CLOSE,21)); 牛熊分界线:IF(((SSL>MM)),MM,SA),LINETHICK2,COLORFF00FF; IF(SSL<MM,牛熊分界线,DRAWNULL),LINETHICK2,colorgreen; ///短线之王0712/// ///以上这两句是新加的,区别两种加仓情况/// A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1); FY:=EMA(A51,5); A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100; QS:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2)),colorred; VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*50; AA:=(EMA(VAR1,3))*2; BB:=MA(AA,3); 条件一:=qs>=MA(qs,3) OR qs>=REF(qs,1); 条件二:=AA>=MA(AA,3); 条件三:=BB>=MA(BB,3); DRAWTEXT(CROSS(80,AA),H*1.03,'卖'); 买:=CROSS(AA,8) AND 条件一; 加仓:=CROSS(AA,20) AND 条件一; 始:=CROSS(AA,BB) AND 条件一; DRAWTEXT(CROSS(AA,8) AND 条件一,L*0.87,'买'); DRAWTEXT(CROSS(AA,20) AND 条件一,L*0.84,'加仓'); DRAWTEXT(CROSS(AA,BB) AND 条件一,L*0.81,'始'); DRAWTEXT(CROSS(BB,AA),H*1.01,'终'); 上善若水一:=(突破 OR 买入条件) AND 条件一; 上善若水二:=上善若水一 AND 牛熊分界线>REF(牛熊分界线,1); 上善若水三:=上善若水一 AND (买 OR 加仓 OR 始); DRAWICON(上善若水三,H*1.2,19); STICKLINE(上善若水一,H,L*0.8,0.1,0),coloryellow; STICKLINE(上善若水二,H*1.2,L,0.1,0),colorred; |