以下是通达信主散分析主图公式 源码

通达信主散分析主图公式 源码

{主散分析}

成交额【万】:AMOUNT/10000,POINTDOT,COLORYELLOW,NODRAW;

超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;
统计额:(超B)+(大B)+(超S)+(大S)+(中B)+(小B)+(中S)+(小S),NODRAW;
其它额:=(成交额【万】-统计额),NODRAW;
DAZHIV:=CONST(MAX(ABS(统计额),MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出)))))),NODRAW;
DRAWRECTREL(580,300,920,550,RGB(128,128,128));
DRAWRECTREL(420-CONST(统计额*340/DAZHIV),300,420,550,RGB(128,128,128));
DRAWRECTREL(250-CONST(大宗出*340/DAZHIV),300,250,550,RGB(0,250,0));
DRAWRECTREL(250,300,250+CONST(大宗进*340/DAZHIV),550,RGB(250,0,0));
DRAWRECTREL(750-CONST(非大宗出*340/DAZHIV),300,750,550,RGB(0,250,0));
DRAWRECTREL(750,300,750+CONST(非大宗进*340/DAZHIV),550,RGB(250,0,0));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.212,0.75,0,’主力进出’),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.712,0.75,0,’散户进出’),COLORYELLOW;
DRAWRECTREL(749.8,300,750.2,550,RGB(0,0,60));
DRAWRECTREL(249.8,300,250.2,550,RGB(0,0,60));
DRAWRECTREL(500,100,500,900,RGB(250,250,0)),NODRAW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.44,0.35,0,CEILING(大宗进)),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.015,0.35,0,CEILING(大宗出))COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.94,0.35,0,CEILING(非大宗进))COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.52,0.35,0,CEILING(非大宗出))COLORYELLOW;
大宗进比:=大宗进/统计额*100,NODRAW;
大宗出比:=大宗出/统计额*100,NODRAW;
非大宗进比:=非大宗进/统计额*100,NODRAW;
非大宗出比:=非大宗出/统计额*100,NODRAW;
DRAWTEXT_FIX(1,0.32,0.08,0,STRCAT(STRCAT(‘进’,CON2STR(大宗进比,2)),’%’)),COLORYELLOW;
DRAWTEXT_FIX(1,0.12,0.08,0,STRCAT(STRCAT(‘出 ‘,CON2STR(大宗出比,2)),’% ‘)),COLORYELLOW;
DRAWTEXT_FIX(1,0.80,0.08,0,STRCAT(STRCAT(‘进 ‘,CON2STR(非大宗进比,2)),’% ‘)),COLORYELLOW;
DRAWTEXT_FIX(1,0.65,0.08,0,STRCAT(STRCAT(‘出 ‘,CON2STR(非大宗出比,2)),’% ‘)),COLORYELLOW;

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。