指标介绍:代码前三行需自定义输入,后面代码全部不用修改。 股二成本:=7.14;股二数量:=3800;股二收盘价:="300079$C";{输入股二成本,股数,代码} 股三成本:=4.94;股三数量:=5000;股三收盘价:="002413$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;{爱股网 WWW.72GU.COM} 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;
|