首页 通达信专栏 正文

通达信相关源码(中长期形态、市销率、负债比、净现比)

通达信专栏 759

{基本财务情况}

主利润率:=(FINANCE(23)/FINANCE(20)*100);

每股净资:=CONST(FINANCE(34));

每股收益:=CONST(FINANCE(38));

净利润增长率:=FINANCE(43);

市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));

现金负债比:=(FINANCE(25)/FINANCE(15));

每股未分配:=CONST(FINANCE(32));

每股公积金:=CONST(FINANCE(18));


TT1:=STRCAT('利润率:',CON2STR(主利润率,2));

TT2:=STRCAT('-股净资:',CON2STR(每股净资,2));


TT3:=STRCAT('-股收益:',CON2STR(每股收益,2));

TT4:=STRCAT('市销率:',CON2STR(市销率,2));

TT5:=STRCAT('-负债比:',CON2STR(现金负债比,2));

TT6:=STRCAT('未分配:',CON2STR(每股未分配,2));

TT7:=STRCAT('-公积金:',CON2STR(每股公积金,2));


TT12:=STRCAT(TT1,TT2);

TT45:=STRCAT(TT4,TT5);

TT67:=STRCAT(TT6,TT7);

TT123:=STRCAT(TT12,TT3);


DRAWTEXT_FIX(ISLASTBAR,0.11,0.50,0,TT123),COLORLIRED;

DRAWTEXT_FIX(ISLASTBAR,0.95,0.20,1,TT45),COLORLIRED;

DRAWTEXT_FIX(ISLASTBAR,0.11,0.70,0,TT67),COLORLIRED;


{股本};

GG1:=STRCAT('总股:',CON2STR(TOTALCAPITAL*100/100000000,2));

GG2:=STRCAT('-流通:',CON2STR(CAPITAL*100/100000000,2));

GG3:=STRCAT('-流通比%:',CON2STR(CAPITAL/TOTALCAPITAL*100,2));

GG4:=STRCAT(GG1,GG2);

GG5:=STRCAT(GG4,GG3);

DRAWTEXT_FIX(ISLASTBAR,0.95,0.40,1,GG5),COLORLIRED;

SS1:=STRCAT('市值:',CON2STR(FINANCE(41)/100000000,2));

DRAWTEXT_FIX(ISLASTBAR,0.11,0.90,0,SS1),COLORLIRED;


{基本财务情况}

主利润率:=(FINANCE(23)/FINANCE(20)*100);

每股净资:=CONST(FINANCE(34));

每股收益:=CONST(FINANCE(38));

净利润增长率:=FINANCE(43);

市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));

现金负债比:=(FINANCE(25)/FINANCE(15));

每股未分配:=CONST(FINANCE(32));

每股公积金:=CONST(FINANCE(18));

净现比:=FINANCE(30)/FINANCE(25);


TT1:=STRCAT('利润率:',CON2STR(主利润率,2));

TT2:=STRCAT('-股净资:',CON2STR(每股净资,2));


TT3:=STRCAT('-股收益:',CON2STR(每股收益,2));

TT4:=STRCAT('市销率:',CON2STR(市销率,2));

TT5:=STRCAT('-负债比:',CON2STR(现金负债比,2));

TT6:=STRCAT('未分配:',CON2STR(每股未分配,2));

TT7:=STRCAT('-公积金:',CON2STR(每股公积金,2));

TT8:=STRCAT('-净现比:',CON2STR(净现比,2));


TT12:=STRCAT(TT1,TT2);

TT45:=STRCAT(TT4,TT5);

TT67:=STRCAT(TT6,TT7);

TT123:=STRCAT(TT12,TT3);

TT48:=STRCAT(TT45,TT8);

DRAWTEXT_FIX(ISLASTBAR,0.11,0.20,0,TT123),COLORLIRED;

DRAWTEXT_FIX(ISLASTBAR,0.95,0.32,1,TT48),COLORLIRED;

DRAWTEXT_FIX(ISLASTBAR,0.11,0.40,0,TT67),COLORLIRED;


{股本};

GG1:=STRCAT('总股:',CON2STR(TOTALCAPITAL*100/100000000,2));

GG2:=STRCAT('-流通:',CON2STR(CAPITAL*100/100000000,2));

GG3:=STRCAT('-流通比%:',CON2STR(CAPITAL/TOTALCAPITAL*100,2));

GG4:=STRCAT(GG1,GG2);

GG5:=STRCAT(GG4,GG3);

DRAWTEXT_FIX(ISLASTBAR,0.95,0.52,1,GG5),COLORLIRED;

SS1:=STRCAT('市值:',CON2STR(FINANCE(41)/100000000,2));

DRAWTEXT_FIX(ISLASTBAR,0.11,0.60,0,SS1),COLORLIRED;


{中长期形态显示}

交易周期:=CURRBARSCOUNT;

交易周期条件:=(交易周期<=55);

{短期:近60天,中期:近120天,长期:240-500天}

显示周期:=(PERIOD=0 OR PERIOD=1 OR PERIOD=2 OR PERIOD=3 OR  PERIOD=4 OR PERIOD=6 OR PERIOD=7 OR PERIOD=8 OR PERIOD=9 OR PERIOD=10);

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期),0.11,0.02,0,'短:60-中:120-长:240-500'),COLORRED;

{短期形态提示}

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=1,0.11,0.22,0,'短期形态:∧型反转'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=2,0.11,0.22,0,'短期形态:∨型反转'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=3,0.11,0.22,0,'短期形态:W底'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=4,0.11,0.22,0,'短期形态:M顶'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=5,0.11,0.22,0,'短期形态:盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=6,0.11,0.22,0,'短期形态:盘整上行'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=7,0.11,0.22,0,'短期形态:盘整下跌'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=8,0.11,0.22,0,'短期形态:上升通道'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=9,0.11,0.22,0,'短期形态:下降通道'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=10,0.11,0.22,0,'短期形态:拐头下跌'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=11,0.11,0.22,0,'短期形态:拐头上升'),COLORLIRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=12,0.11,0.22,0,'短期形态:上行盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=13,0.11,0.22,0,'短期形态:下跌盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_SHORT=14,0.11,0.22,0,'短期形态:NA/其它'),COLORLIBLUE;

{中期形态提示}

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=1,0.11,0.42,0,'中期形态:∧型反转'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=2,0.11,0.42,0,'中期形态:∨型反转'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=3,0.11,0.42,0,'中期形态:W底'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=4,0.11,0.42,0,'中期形态:M顶'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=5,0.11,0.42,0,'中期形态:盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=6,0.11,0.42,0,'中期形态:盘整上行'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=7,0.11,0.42,0,'中期形态:盘整下跌'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=8,0.11,0.42,0,'中期形态:上升通道'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=9,0.11,0.42,0,'中期形态:下降通道'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=10,0.11,0.42,0,'中期形态:拐头下跌'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=11,0.11,0.42,0,'中期形态:拐头上升'),COLORLIRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=12,0.11,0.42,0,'中期形态:上行盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=13,0.11,0.42,0,'中期形态:下跌盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_MID=14,0.11,0.42,0,'中期形态:NA/其它'),COLORLIBLUE;

{长期形态提示}

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=1,0.11,0.62,0,'长期形态:∧型反转'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=2,0.11,0.62,0,'长期形态:∨型反转'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=3,0.11,0.62,0,'长期形态:W底'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=4,0.11,0.62,0,'长期形态:M顶'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=5,0.11,0.62,0,'长期形态:盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=6,0.11,0.62,0,'长期形态:盘整上行'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=7,0.11,0.62,0,'长期形态:盘整下跌'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=8,0.11,0.62,0,'长期形态:上升通道'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=9,0.11,0.62,0,'长期形态:下降通道'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=10,0.11,0.62,0,'长期形态:拐头下跌'),COLORLIGREEN;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=11,0.11,0.62,0,'长期形态:拐头上升'),COLORLIRED;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=12,0.11,0.62,0,'长期形态:上行盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=13,0.11,0.62,0,'长期形态:下跌盘整'),COLORLIBLUE;

DRAWTEXT_FIX(ISLASTBAR=1 AND NOT(显示周期) AND  SHAPE_LONG=14,0.11,0.62,0,'长期形态:NA/其它'),COLORLIBLUE;


多参数水质分析仪的技术优势
« 上一篇 2023-07-08
以扎龙湿地风电场为例分析风力发电场从选址、建设、投运至退役全过程中应注意的问题
下一篇 » 2023-07-04

发表评论

还没有评论