B:=-100*(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21));
D:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4),LINETHICK2;
DRAWTEXT_FIX(C>O,0.01,0.9,0,'微信公众号:水鸭的投资日记'),COLORRED;
中长线:A+100,COLOR9900FF;
超短线:B+100,COLORGREEN,LINETHICK2;
IF(超短线>=REF(超短线,1),超短线,DRAWNULL), COLORRED,LINETHICK2;
短期线:=D+100,COLORYELLOW;
DD:=BARSLAST(CROSS(超短线,中长线))< 3 AND 中长线< 20;
见顶:=((REF(短期线,1)>85 AND REF(超短线,1)>85 AND REF(中长线,1)>65) AND CROSS(中长线,超短线)) ,COLORGREEN;
顶部区域:=(短期线< REF(短期线,1) AND REF(短期线,1)>80) AND (REF(超短线,1)>95 OR REF(超短线,2)>95 ) AND 中长线>60 AND 超短线< 83.5 AND 超短线< 短期线 AND 超短线< 中长线+4,COLORGREEN;
顶部:=FILTER(顶部区域,4);
底部区域:=(中长线< 12 AND 短期线< 8 AND (超短线< 7.2 OR REF(超短线,1)< 5) AND (短期线>REF(短期线,1) OR 超短线>REF(超短线,1))) OR (中长线< 8 AND 短期线< 7 AND 超短线< 15 AND 超短线>REF(超短线,1)) OR (中长线< 10 AND 短期线< 7 AND 超短线< 1) ,COLORGREEN;
低位金叉:=50*(中长线< 15 AND REF(中长线,1)< 15 AND 短期线< 18 AND 超短线>REF(超短线,1) AND CROSS(超短线,中长线) AND 超短线>短期线 AND (REF(超短线,1)< 5 OR REF(超短线,2)< 5 ) AND (短期线>=中长线 OR REF( 超短线,1)< 1 )),COLORRED;
底:=中长线>REF(中长线,1) AND COUNT(LLV(中长线,120),5)< 3 AND DD;
顶:=中长线< REF(中长线,1) AND REF(中长线,1)=HHV(中长线,120);
DL:=REF(超短线,1)=LLV(超短线,4);
建仓:DL AND REF(短期线,1)< 20 AND CROSS(超短线,10) AND (中长线>REF(中长线,1) OR (CROSS(超短线,短期线) AND CROSS(超短线,中长线)));
STICKLINE(建仓,0,25,1,0 ),COLORRED;