顶底四区主图(通达信公式 主图 源码 测试图)高中低一目了然

[复制链接]
查看20 | 回复0 | 2022-6-27 19:33:12 | 显示全部楼层 |阅读模式

顶底四区主图(通达信公式 主图 源码 测试图)高中低一目了然

{INPUT:N(1,250,120);}
DRAWGBK(C>0, RGB(0,10,10),RGB(88,0,0),0,'11',0);
N8:=STRCAT(CON2STR(YEAR,0),' 年 ');
Y8:=STRCAT(CON2STR(MONTH,0),' 月 ');
R8:=STRCAT(CON2STR(DAY,0),' 日 ');
K:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));
KJ:=GD-DD;{分析家公式网}
SJ8:=STRCAT(STRCAT(N8,Y8), R8);
GD4:=IF(CURRBARSCOUNT<=N/2,GD,DRAWNULL);
DRAWBAND(GD4,RGB(0,0,250),DD+KJ/2,RGB(0,0,0));{该行设置背景色}
平衡:IF(CURRBARSCOUNT<=N,DD+KJ/2,DRAWNULL),COLOR00FFFF,NODRAW;
压力:IF(CURRBARSCOUNT<=N,GD-KJ*0.191,DRAWNULL),COLORFF00FF,NODRAW;
支撑:IF(CURRBARSCOUNT<=N,DD+KJ*0.191,DRAWNULL),COLOR00FF00,NODRAW;
低吸:IF(CURRBARSCOUNT<=N/2 AND CROSS(平衡,LOW),1,DRAWNULL),COLORFF8899,NODRAW;
低涨:IF(CURRBARSCOUNT<=N,(C/LLV(LOW,K)-1)*100,DRAWNULL),COLOR0000FF,NODRAW;
天:BARSLAST(L=DD),COLOR00FFFF,NODRAW;
MA5:MA(CLOSE,5),COLORGREEN;
MA10:MA(CLOSE,10),COLOR00FFFF;
MA20:MA(C,20),COLORFF00FF;
MA60:MA(C,60),COLORRED;
高:IF(CURRBARSCOUNT<=N,GD,DRAWNULL),COLOR00FFFF,POINTDOT;
低:IF(CURRBARSCOUNT<=N,DD,DRAWNULL),COLOR00FF00,POINTDOT;
{以下设置主图显示方式}
STICKLINE(CURRBARSCOUNT=N,GD,DD,0,-1),COLORGREEN;
STICKLINE(CURRBARSCOUNT=N/2,GD,DD,0,-1),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1,GD,DD,0,-1),COLORGREEN;
STICKLINE(CURRBARSCOUNT<=N,平衡,平衡,3,-1),COLORWHITE;
STICKLINE(CURRBARSCOUNT<=N/2,压力,压力,3,-1),COLORRED;
STICKLINE(CURRBARSCOUNT<=N/2,支撑,支撑,3,-1),COLORGREEN;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
DRAWICON(低吸,LOW,13);
{以下设置提示文字部分}
DRAWTEXT_FIX(C>0,0.5,0,0,SJ8),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=1,压力,'0.809'),COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=1,平衡,'0.500'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=1,支撑,'0.191'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=N/2+9,GD-KJ/12,'★ 强势区域—急拉减仓!'),COLORRED;
DRAWTEXT(CURRBARSCOUNT=N/2+9,GD-KJ/3,'●  震荡整理—寻机低吸!'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=N/2+9,DD+KJ/3,'◆ 反弹中轨—逢高休息!'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=N/2+9,DD+KJ/10,'■  弱势区域—暂不参与!'),COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=N,GD-KJ/12,'■ 目前K线天数:请看参数!'),COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=N,压力,'■ 建议查阅K线:短线30天,中长线120天!'),COLORFF8899;
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWRECTREL(92,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(124,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.005,1,0,'主力 进出'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.097,1,0,'散户 进出'),COLORCYAN;

Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,10,0,STRCAT(Z3,GNBLOCK)),COLORYELLOW;

DRAWTEXT_FIX(1,0.00,0.00,0,'主题投资:')COLOR0000FF;
DRAWTEXT_FIX(1,0.07,0.00,0,EXTERNSTR(0,1))COLOR0000FF;
DRAWTEXT_FIX(1,0.00,0.08,0,'主营业务:')COLORFF00FF;
DRAWTEXT_FIX(1,0.07,0.08,0,EXTERNSTR(0,2))COLORFF00FF;

{基本面}
DRAWTEXT_FIX(1,0,0.07,0,'地区: '),COLOR99CC32;DRAWTEXT_FIX(1,0.04,0.07,0,DYBLOCK),COLOR99CC32;
DRAWTEXT_FIX(1,0.11,0.07,0,'行业: '),COLORGREEN;DRAWTEXT_FIX(1,0.15,0.07,0,HYBLOCK),COLORGREEN;
DRAWTEXT_FIX(1,0.22,0.07,0,'概念: '),COLORFF00FF;DRAWTEXT_FIX(1,0.26,0.07,0,GNBLOCK),COLORFF00FF;

DRAWTEXT_FIX(1,0,0,0,'主营同比:'),COLORWHITE;
DRAWNUMBER_FIX(1,0.075,0,0,CONST(FINANCE(44))),COLORFF00FF;
DRAWTEXT_FIX(1,0.14,0,0,'毛利率:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.2,0,0,CONST((FINANCE(20)-FINANCE(21))/FINANCE(20))*100),COLORFF00FF;
DRAWTEXT_FIX(1,0.265,0,0,'净益率:'),COLOR99CC32;
DRAWNUMBER_FIX(1,0.32,0,0,CONST(FINANCE(30)/FINANCE(19)*100)),COLORFF00FF;
DRAWTEXT_FIX(1,0.37,0,0,'净利同比:'),COLOR99CC32;
DRAWNUMBER_FIX(1,0.445,0,0,CONST(FINANCE(43))),COLORYELLOW;
DRAWTEXT_FIX(1,0.52,0,0,'净利润:'),COLORWHITE;
DRAWNUMBER_FIX(1,0.577,0,0,CONST(FINANCE(30)/10000)),COLORFF00FF;
 

201911202104243318.rar

5.98 KB, 下载次数: 0

售价: 4 金钱  [记录]  [购买]

201911202104243318.rar

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则