说明在主图中加入了系统自带的SAR附图指标提示,加了压力支撑线提示,另外,涨跌停用粉色和蓝色进行标注,一目了然。
主图指标:源码如下:
持仓:IF(CLOSE>=SAR(4,2,20),SAR(4,2,20),
DRAWNULL),CIRCLEDOT,COLORRED;
空仓:IF(CLOSE<=SAR(4,2,20),SAR(4,2,20),
DRAWNULL),CIRCLEDOT,COLORGREEN ;
获利%:WINNER(CLOSE)*100,NODRAW,COLORWHITE;
V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
V2:=(1-7/100)*(DMA(CLOSE,V1));
V3:=(1+7/100)*(DMA(CLOSE,V1));
V5:=MA((LOW+HIGH+CLOSE)/3,5);
支撑:REFDATE(V2,DATE),POINTDOT,LINETHICK4,COLORCC66FF;
阻力:REFDATE(V3,DATE),POINTDOT,LINETHICK4,COLORFF0033;
DRAWKLINE(H,O,L,C);
涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;
STICKLINE(涨停,H,L,0,0),COLORMAGENTA;
跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORBLUE;
STICKLINE(跌停,H,L,0,1),COLORBLUE;