操作个股一:="SH600519$CLOSE";
股一买入价:=700;
股一买入数:=100;
个股一涨幅:=(操作个股一/ref(操作个股一,1)-1)*100;
DRAWTEXTABS(5,100,'贵州茅台'+NUMTOSTRN(操作个股一,2)+'('+NUMTOSTRN(个股一涨幅,2)+'%'+')'),COLOrWHITE;
盈亏一:=操作个股一/股一买入价*100-100;
盈亏一数:=(操作个股一-股一买入价)*股一买入数;
DRAWTEXTABS(95,100,'
盈亏 '+NUMTOSTRN(盈亏一,2)+'%'+' '+NUMTOSTRN(盈亏一数,2)),COLOrWHITE;
{个股一止盈}DRAWTEXTABS(5,85,' 止盈价 '+NUMTOSTRN(股一买入价*1.05,2)),COLOrred;
DRAWTEXTABS(95,85,IFS(盈亏一>=3,'
止盈','')),COLOrred,LINETHICK1;
{个股一止损}DRAWTEXTABS(5,115,' 止损价 '+NUMTOSTRN(股一买入价*0.97,2)),COLOrgreen;
DRAWTEXTABS(95,115,IFS(盈亏一<=-3,'
止损','')),COLOrgreen,LINETHICK1;