yngs:=ma(c,14);
a1:yngs*1.1,Linethick1,colorff;
a2:yngs*0.9,Linethick1,COLORGREEN;
a3:a1-(a1-a2)*0.191,Color0098FF;
b0:=a1-(a1-a2)*0.618;
b1:llv(b0,3),COLORMAGENTA;
b2:=if(b0>b1,(b0-(b1-b0)/2),b1);
PARTLINE(b1=b2,b1),COLORCYAN,LINETHICK2;
FILLRGN(b1<b2,b1,b2),COLORYELLOW;
{k线}
aa1:=wma(c,2);//短加权均线
bb1:=ema(aa1,2);//平滑
a:=ma(bb1,3);//平均
aa2:=wma((h+c+o)/3,18);//长加权均线
dd3:=a>=aa2 and c>aa2;//短>长,且收>长
dd4:=a<aa2 ;//短<长
dd5:=a>aa2 ;//短>长
STICKLINE((dd4 or dd5) and o<=c ,h,l,0.5,0),Color00cc99;//跌势阳线
STICKLINE((dd4 or dd5) and o<=c ,c,o,7,0),Color00cc99;//跌势阳线
STICKLINE((dd4 or dd5) and o>=c ,h,l,0.5,0),Color3F8C3A;//跌势阴线
STICKLINE((dd4 or dd5) and o>=c ,c,o,7,0),Color3F8C3A;//跌势阴线
STICKLINE((dd3 or c>aa2) and o<=c,c,o,7,0),Colorred;//涨势阳线
STICKLINE((dd3 or c>aa2) and o<=c,h,l,0.5,0),Colorred;//涨势阳线
STICKLINE((dd3 or c>aa2) and o>=c,c,o,7,0),Colorff33ff;//涨势阴线
STICKLINE((dd3 or c>aa2) and o>=c,h,l,0.5,0),Colorff33ff;//涨势阴线
STICKLINE(MA(C,13)>O and C>MA(C,13) and O<c,O,C,8,0),coloryellow;//13日均线为生命线
STICKLINE(MA(C,13)>O and C>MA(C,13),H,L,0.8,1),coloryellow;//13日均线为生命线