我给你个思路,具体周期自己调,通达信k线变色在此略去了!n1:=12;n2:=26;m:=13;x1:=ema(c,n1);x2:=ema(c,n2);if(x1>x2,llv(l,m),draw**),colorred, linethick2;if(x1<x2,hhv(h,m),draw**),colorblue,linethick2;stickline(cross(x1,x2),hhv(h,120),llv(l,120),0,-1),colorgray;{博易**k线变色的}ma14:=ma(close,14);red:=cross(c,ma14);green:=cross(ma14,c);flag:=if(barstatus=1,0,if(red,1,if(green,-1,ref(flag,1))));stickline(flag>0,high,max(c,o),0,1),colorred;stickline(flag>0,low,min(c,o),0,1),colorred;stickline(flag>0,c,o,4,1),colorred;stickline(flag<0,high,max(c,o),0,0),colorgreen;stickline(flag<0,low,min(c,o),0,0),colorgreen;stickline(flag<0,c,o,4,0),colorgreen;stickline(flag=0,high,max(c,o),0,0),coloryellow;stickline(flag=0,low,min(c,o),0,0),coloryellow; 20210311