在线检测未来函数

通达信全息帐户主图指标公式

来源:Internet,编辑:股旁网,2017-03-14

股一成本:=10.62;股一数量:=300;股一收盘价:="600098$C";{输入股一成本,股数,代码}
股二成本:=10.79;股二数量:=500;股二收盘价:="601212$C";{输入股二成本,股数,代码}
股三成本:=45.52;股三数量:=800;股三收盘价:="603881$C";{输入股三成本,股数,代码}
DRAWRECTREL(IF(TOTALBARSCOUNT>80,0,455),290,IF(TOTALBARSCOUNT>80,IF(股一成本=0,0,IF(股二成本=0,100,IF(股三成本=0,150,200))),IF(股一成本=0,455,IF(股二成本=0,560,IF(股三成本=0,620,680)))),IF(股二成本!=0,700,610),RGB(1,0,0));
DRAWTEXT_FIX(股一成本!=0,IF(TOTALBARSCOUNT>80,0.05,0.51),0.3,0,'广州发展');{输入股一名称}
DRAWTEXT_FIX(股二成本!=0,IF(TOTALBARSCOUNT>80,0.1,0.57),0.3,0,'白银有色');{输入股二名称}
DRAWTEXT_FIX(股三成本!=0,IF(TOTALBARSCOUNT>80,0.15,0.63),0.3,0,'数据港');{输入股三名称}
{----------------------只有上面部分需要自定义,以下全部不用修改--------------------------}
DRAWTEXT_FIX(股一成本!=0,IF(TOTALBARSCOUNT>80,0.008,0.46),0.3,0,'★帐户'),COLORRED;
DRAWTEXT_FIX(股一成本=0,IF(TOTALBARSCOUNT>80,0.008,0.46),0.3,0,'★目前空仓★'),COLORYELLOW;
DRAWTEXT_FIX(股一成本!=0,IF(TOTALBARSCOUNT>80,0.008,0.46),0.35,0,'投入金'),COLORRED;
DRAWTEXT_FIX(股一成本!=0,IF(TOTALBARSCOUNT>80,0.008,0.46),0.4,0,'持股数'),COLORRED;
DRAWTEXT_FIX(股一成本!=0,IF(TOTALBARSCOUNT>80,0.008,0.46),0.45,0,'成本价'),COLORRED;
DRAWTEXT_FIX(股一成本!=0,IF(TOTALBARSCOUNT>80,0.008,0.46),0.55,0,'盈亏额'),COLORRED;
DRAWTEXT_FIX(股一成本!=0,IF(TOTALBARSCOUNT>80,0.008,0.46),0.5,0,'盈亏﹪'),COLORRED;
股一金额:=股一成本*股一数量;
股二金额:=股二成本*股二数量;
股三金额:=股三成本*股三数量;
股一盈亏:=CONST((股一收盘价-股一成本)*股一数量);
股二盈亏:=CONST((股二收盘价-股二成本)*股二数量);
股三盈亏:=CONST((股三收盘价-股三成本)*股三数量);
股一盈亏比例:=(股一收盘价-股一成本)/股一成本*100;
股二盈亏比例:=(股二收盘价-股二成本)/股二成本*100;
股三盈亏比例:=(股三收盘价-股三成本)/股三成本*100;
DRAWTEXT_FIX(股一金额!=0,IF(TOTALBARSCOUNT>80,0.06,0.51),0.35,0,CON2STR(股一金额,0)),COLORRED;
DRAWTEXT_FIX(股二金额!=0,IF(TOTALBARSCOUNT>80,0.11,0.57),0.35,0,CON2STR(股二金额,0)),COLORRED;
DRAWTEXT_FIX(股三金额!=0,IF(TOTALBARSCOUNT>80,0.16,0.63),0.35,0,CON2STR(股三金额,0)),COLORRED;
DRAWTEXT_FIX(股一数量!=0,IF(TOTALBARSCOUNT>80,0.06,0.51),0.4,0,CON2STR(股一数量,0)),COLORRED;
DRAWTEXT_FIX(股二数量!=0,IF(TOTALBARSCOUNT>80,0.11,0.57),0.4,0,CON2STR(股二数量,0)),COLORRED;
DRAWTEXT_FIX(股三数量!=0,IF(TOTALBARSCOUNT>80,0.16,0.63),0.4,0,CON2STR(股三数量,0)),COLORRED;
DRAWNUMBER_FIX(股一成本!=0,IF(TOTALBARSCOUNT>80,0.06,0.51),0.45,0,股一成本),COLORRED;
DRAWNUMBER_FIX(股二成本!=0,IF(TOTALBARSCOUNT>80,0.11,0.57),0.45,0,股二成本),COLORRED;
DRAWNUMBER_FIX(股三成本!=0,IF(TOTALBARSCOUNT>80,0.16,0.63),0.45,0,股三成本),COLORRED;
DRAWTEXT_FIX(股一盈亏>0,IF(TOTALBARSCOUNT>80,0.06,0.51),0.55,0,CON2STR(股一盈亏,0)),COLORYELLOW;
DRAWTEXT_FIX(股二盈亏>0,IF(TOTALBARSCOUNT>80,0.11,0.57),0.55,0,CON2STR(股二盈亏,0)),COLORYELLOW;
DRAWTEXT_FIX(股三盈亏>0,IF(TOTALBARSCOUNT>80,0.16,0.63),0.55,0,CON2STR(股三盈亏,0)),COLORYELLOW;
DRAWTEXT_FIX(股一盈亏<=0 AND 股一成本!=0,IF(TOTALBARSCOUNT>80,0.06,0.51),0.55,0,CON2STR(股一盈亏,0)),COLORFF8000;
DRAWTEXT_FIX(股二盈亏<=0 AND 股二成本!=0,IF(TOTALBARSCOUNT>80,0.11,0.57),0.55,0,CON2STR(股二盈亏,0)),COLORFF8000;
DRAWTEXT_FIX(股三盈亏<=0 AND 股三成本!=0,IF(TOTALBARSCOUNT>80,0.16,0.63),0.55,0,CON2STR(股三盈亏,0)),COLORFF8000;
DRAWNUMBER_FIX(股一盈亏>0,IF(TOTALBARSCOUNT>80,0.06,0.51),0.5,0,CONST(股一盈亏比例)),COLORYELLOW;
DRAWNUMBER_FIX(股二盈亏>0,IF(TOTALBARSCOUNT>80,0.11,0.57),0.5,0,CONST(股二盈亏比例)),COLORYELLOW;
DRAWNUMBER_FIX(股三盈亏>0,IF(TOTALBARSCOUNT>80,0.16,0.63),0.5,0,CONST(股三盈亏比例)),COLORYELLOW;
DRAWNUMBER_FIX(股一盈亏<=0,IF(TOTALBARSCOUNT>80,0.06,0.51),0.5,0,CONST(股一盈亏比例)),COLORFF8000;
DRAWNUMBER_FIX(股二盈亏<=0,IF(TOTALBARSCOUNT>80,0.11,0.57),0.5,0,CONST(股二盈亏比例)),COLORFF8000;
DRAWNUMBER_FIX(股三盈亏<=0,IF(TOTALBARSCOUNT>80,0.16,0.63),0.5,0,CONST(股三盈亏比例)),COLORFF8000;
DRAWTEXT_FIX(股二成本!=0,IF(TOTALBARSCOUNT>80,0.007,0.46),0.65,0,'持仓盈亏额:'),COLORYELLOW;
DRAWTEXT_FIX(股二成本!=0,IF(TOTALBARSCOUNT>80,0.007,0.46),0.61,0,'持仓盈亏﹪:'),COLORYELLOW;
总成本:=CONST((股一成本*股一数量)+(股二成本*股二数量)+(股三成本*股三数量));
总盈:=CONST(股一盈亏)+CONST(股二盈亏)+CONST(股三盈亏);
总盈比:=总盈/总成本*100;
DRAWTEXT_FIX(总盈>0 AND 股二成本!=0,IF(TOTALBARSCOUNT>80,0.09,0.55),0.65,0,CON2STR(总盈,0)),COLORYELLOW;
DRAWNUMBER_FIX(总盈比>0 AND 股二成本!=0,IF(TOTALBARSCOUNT>80,0.09,0.55),0.61,0,CONST(总盈比)),COLORYELLOW;
DRAWTEXT_FIX(总盈<=0 AND 股二成本!=0,IF(TOTALBARSCOUNT>80,0.09,0.55),0.65,0,CON2STR(总盈,0)),COLORFF8000;
DRAWNUMBER_FIX(总盈比<=0 AND 股二成本!=0,IF(TOTALBARSCOUNT>80,0.09,0.55),0.61,0,CONST(总盈比)),COLORFF8000;

通达信全息帐户主图指标公式

 

相关文章