[隔夜拆借利率]通达信持仓盈亏指标公式

股一成本:=10.97;股一數量:=3700;股一收盤價:="603988$C";{輸入股一成本,股數,代碼}股二成本:=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(股一盈虧<=0AND股一成本!=0,IF(TOTALBARSCOUNT>80,0.06,0.51),0.55,0,CON2STR(股一盈虧,0)),COLORFF8000;DRAWTEXT_FIX(股二盈虧<=0AND股二成本!=0,IF(TOTALBARSCOUNT>80,0.11,0.57),0.55,0,CON2STR(股二盈虧,0)),COLORFF8000;DRAWTEXT_FIX(股三盈虧<=0AND股三成本!=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(總盈>0AND股二成本!=0,IF(TOTALBARSCOUNT>80,0.09,0.55),0.65,0,CON2STR(總盈,0)),COLORYELLOW;DRAWNUMBER_FIX(總盈比>0AND股二成本!=0,IF(TOTALBARSCOUNT>80,0.09,0.55),0.61,0,CONST(總盈比)),COLORYELLOW;DRAWTEXT_FIX(總盈<=0AND股二成本!=0,IF(TOTALBARSCOUNT>80,0.09,0.55),0.65,0,CON2STR(總盈,0)),COLORFF8000;DRAWNUMBER_FIX(總盈比<=0AND股二成本!=0,IF(TOTALBARSCOUNT>80,0.09,0.55),0.61,0,CONST(總盈比)),COLORFF8000;

[隔夜拆借利率]通达信持仓盈亏指标公式

发布于 2024-10-05 16:10:45
收藏
分享
海报
11
目录