大智慧按图操作,你就不会亏源码
bu:=cross(high,SAR(4,1,12));
sel:=cross(SAR(4,1,12),low);
var1:=last(high<SAR(4,1,12));
var2:=last(low>sar(4,1,12));
{drawflagtext(bu,high,'买入');
drawflagtext(sel,low,'卖出');}
drawtext(bu,LOW,'买'),valign0,align1,coloryellow,linethick3;
drawtext(sel,HIGH,'卖'),valign2,align1,colorgreen,linethick3;
STICKLINE(low>SAR(4,1,12) and isdown,high,open,0.5,1),colormagenta;
STICKLINE(low>SAR(4,1,12) and isdown,close,open,7.5,1),colormagenta;
STICKLINE(low>SAR(4,1,12) and isdown,close,low,0.5,1),colormagenta;
STICKLINE(high<SAR(4,1,12) and isup,high,close,0.5,1),colorgreen;
STICKLINE(high<SAR(4,1,12) and isup,close,open,7.5,1),colorgreen;
STICKLINE(high<SAR(4,1,12) and isup,open,low,0.5,1),colorgreen;