X:=10;
买入价:=X;
DRAWTEXT(CURRBARSCOUNT=100,买入价*0.99,'买入价'),COLORWHITE;
STICKLINE(买入价,买入价,买入价,10,1),COLORBB97BB,DOTLINE;
DRAWNUMBER(ISLASTBAR,买入价,买入价),COLORWHITE;
止赢5%:=买入价*1.05;
DRAWTEXT(CURRBARSCOUNT=100, 止赢5%*0.99,'止赢5%'),COLORFF00FF;
STICKLINE(止赢5%, 止赢5%, 止赢5%,10,1),COLOR000090,DOTLINE;
DRAWNUMBER(ISLASTBAR,止赢5%,止赢5%),COLORFF00FF;
止赢10%:=买入价*1.1;
DRAWTEXT(CURRBARSCOUNT=100, 止赢10%*0.99,'止赢10%'),COLORFF00FF;
STICKLINE(止赢10%, 止赢10%, 止赢10%,10,1),COLORB00060,DOTLINE;
DRAWNUMBER(ISLASTBAR,止赢10%,止赢10%),COLORFF00FF;
止赢15%:=买入价*1.15;
DRAWTEXT(CURRBARSCOUNT=100, 止赢15%*0.99,'止赢15%'),COLORFF00FF;
STICKLINE(止赢15%, 止赢15%, 止赢15%,10,1),COLOR008000,DOTLINE;
DRAWNUMBER(ISLASTBAR,止赢15%,止赢15%),COLORFF00FF;
止赢20%:=买入价*1.2;
DRAWTEXT(CURRBARSCOUNT=100, 止赢20%*0.99,'止赢20%'),COLORFF00FF;
STICKLINE(止赢20%, 止赢20%, 止赢20%,10,1),COLOR0000FF,DOTLINE;
DRAWNUMBER(ISLASTBAR,止赢20%,止赢20%),COLORFF00FF;
{www.laoqianzhuang.com_通达信股票指标公式}
止赢30%:=买入价*1.3;
DRAWTEXT(CURRBARSCOUNT=100, 止赢30%*0.99,'止赢30%'),COLORFF00FF;
STICKLINE(止赢30%, 止赢30%, 止赢30%,10,1),COLOR0000FF,DOTLINE;
DRAWNUMBER(ISLASTBAR,止赢30%,止赢30%),COLORFF00FF;
止损5%:=买入价-买入价*0.05;
DRAWTEXT(CURRBARSCOUNT=100, 止损5%*0.99,'止损-5%'),COLORGREEN;
STICKLINE(止损5%, 止损5%, 止损5%,10,1),COLOR000090,DOTLINE;
DRAWNUMBER(ISLASTBAR,止损5%,止损5%),COLORGREEN;
止损10%:=买入价-买入价*0.1;
DRAWTEXT(CURRBARSCOUNT=100, 止损10%*0.99,'止损-10%'),COLORGREEN;
STICKLINE(止损10%, 止损10%, 止损10%,10,1),COLORB00060,DOTLINE;
DRAWNUMBER(ISLASTBAR,止损10%,止损10%),COLORGREEN;
止损15%:=买入价-买入价*0.15;
DRAWTEXT(CURRBARSCOUNT=100, 止损15%*0.99,'止损-15%'),COLORGREEN;
STICKLINE(止损15%, 止损15%, 止损15%,10,1),COLOR008000,DOTLINE;
DRAWNUMBER(ISLASTBAR,止损15%,止损15%),COLORGREEN;
止损20%:=买入价-买入价*0.2;
DRAWTEXT(CURRBARSCOUNT=100, 止损20%*0.99,'止损-20%'),COLORGREEN;
STICKLINE(止损20%, 止损20%, 止损20%,10,1),COLOR0000FF,DOTLINE;
DRAWNUMBER(ISLASTBAR,止损20%,止损20%),COLORGREEN; |