我们散户用的通达信炒股软件,虽然免费,但是功能依然强大,只要你会用,善用。下面小编就分享一串源代码,放到主图中。不用打开自己的资金帐户,也能实时看到自己的股票盈利亏损情况。模拟炒股的朋友也可以用这个做一个试验,练练手。来看看效果吧
源代码
DRAWRECTREL(0,0,320,240,RGB(28,28,28));
DRAWRECTREL(320,0,450,240,RGB(28,28,28));
{---------------账户提示框---------------}
{账户统计}
买入价格:=8.15;{改}
买入股数:=10000;{改}
股一成本:=买入价格;{不用更改}
股一数量:=买入股数;{不用更改}
股一现价:="600522 $C";{修改}
股1:='600522 ';{修改}
DRAWTEXT_FIX(C!=0,0.005,0.10,0,'中天科技 '),COLORCYAN;{修改股票名称}
{以下内容不用修改}
DRAWTEXT_FIX(C!=0,0.015,0.05,0,'股票名称'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,0.063,0.05,0,'持仓'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,0.105,0.05,0,'成本'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,0.151,0.05,0,'涨跌'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,0.195,0.05,0,'涨幅'),COLORYELLOW;
DRAWTEXT_FIX(C!=0,0.241,0.05,0,'盈亏'),COLORYELLOW;
DRAWTEXT_FIX(C!=0, 0.285,0.065,0,'现价'),COLORYELLOW;
DRAWTEXT_FIX(C!=0, 0.328,0.075, 0,'总盈值'),COLORYELLOW;
DRAWTEXT_FIX(C!=0, 0.375,0.075, 0,'总盈比'),COLORYELLOW;
DRAWTEXT_FIX(C!=0, 0.423,0.075, 0,'现市值'),COLORYELLOW;
{以下账户统计部分不要更改}
股一盈亏:=INTPART((股一现价-股一成本)*股一数量);
股一涨幅:=(股一现价-股一成本)/股一成本*100;
股一涨跌:=CONST(股一现价-股一成本);
DRAWNUMBER_FIX(C!=0,0.047,0.10,0,股一数量),COLORCYAN;
DRAWNUMBER_FIX(C!=0, 0.285,0.15, 0, CONST(股一现价)),COLORYELLOW;
DRAWNUMBER_FIX(C!=0,0.097,0.10,0,股一成本),COLORCYAN;
DRAWNUMBER_FIX(C!=0,0.146,0.10,0,股一涨跌),COLORCYAN;
DRAWNUMBER_FIX(C!=0,0.188,0.10,0,CONST(股一涨幅)),COLORCYAN;
DRAWNUMBER_FIX(C!=0,0.237,0.10,0,CONST(股一盈亏)),COLORCYAN;
DRAWNUMBER_FIX(C!=0, 0.328,0.165, 0,CONST(股一盈亏)),COLORWHITE;
DRAWNUMBER_FIX(C!=0, 0.375,0.165, 0,CONST(股一盈亏/(股一成本*股一数量)*100)),COLORRED;
DRAWNUMBER_FIX(C!=0, 0.405,0.165, 0,CONST(股一数量*股一现价)),COLORWHITE;
我会持续不断的分享一些使用通达信的技巧方法,感兴趣的朋友关注一下吧!
联系客服