分时资金通达信公式 分时副图 源码附图无未来函数
A1:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),-VOL/CAPITAL*100,0)),0);
成交额:=V*C/100,NODRAW;
A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A4:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A5:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((ISLASTBAR),((100*A2)/A6),0);
A8:=IF((ISLASTBAR),((100*A3)/A6),0);
A9:=IF((ISLASTBAR),((100*A4)/A6),0);
A10:=IF((ISLASTBAR),((100*A5)/A6),0);
机构买:(A2),LINETHICK3,COLORRED;
机构卖:(A3),LINETHICK3,COLORGREEN;
机构进出:=机构买-机构卖,NODRAW;
散户买:(A4),COLOR5555FF;
散户卖:(A5),COLORCYAN;
散户进出:=散户买-散户卖,,COLORWHITE,NODRAW;
强势:((100*A2)/A6>50);
STICKLINE(强势,机构买*1.02,机构买*1.1,3,0),COLORYELLOW;
拉升:((100*A2)/A6-(100*A3)/A6)>18 AND (100*A2)/A6-(100*A5)/A6>18;
STICKLINE(拉升,机构买*1.1,机构买*1.2,3,0),COLORRED;
DRAWTEXT(ISLASTBAR=1,机构买*0.95,''),LINETHICK2,COLORRED;
DRAWTEXT(ISLASTBAR=1,机构卖*0.95,''),LINETHICK2,COLORFFFF55;
Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05,0.95);
Q2:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))));
DRAWICON(CROSS((C/Q2),1.03),机构买,5);
{股票指标网 整理}
XG:C/Q2;
DD1:=1;
AAA1:=STRCAT(STRCAT('机构买入',CON2STR((100*A2)/A6,0)),'%');
AAA2:=STRCAT(STRCAT('机构卖出',CON2STR((100*A3)/A6,0)),'%');
AAA0:=STRCAT(STRCAT('机构总买入',CON2STR((100*(A2-A3))/A6,0)),'%');
AAA3:=STRCAT(STRCAT('散户买入',CON2STR((100*A4)/A6,0)),'%');
AAA4:=STRCAT(STRCAT('散户卖出',CON2STR((100*A5)/A6,0)),'%');
AAA5:=STRCAT(STRCAT('散户总买入',CON2STR((100*(A4-A5))/A6,0)),'%');
DRAWTEXT_FIX(DD1=1,0.001,0.05,0,AAA1),COLORYELLOW;
DRAWTEXT_FIX(DD1=1,0.001,0.15,0,AAA2),COLORYELLOW;
DRAWTEXT_FIX(DD1=1,0.001,0.25,0,AAA3),COLORYELLOW;
DRAWTEXT_FIX(DD1=1,0.001,0.35,0,AAA4),COLORYELLOW;
DRAWTEXT_FIX(DD1=1,0.001,0.45,0,AAA0),COLORYELLOW;
DRAWTEXT_FIX(DD1=1,0.001,0.55,0,AAA5)COLORYELLOW;
主力净买额:=(机构进出+散户进出)/成交额,NODRAW;
AAA6:=STRCAT(STRCAT('主力净买额',CON2STR(主力净买额,0)),'%');
DRAWTEXT_FIX(DD1=1,0.14,0.05,0,AAA6),COLORMAGENTA,LINETHICK1;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A1赋值:SUM(IF(收盘价>1日前的收盘价,成交量/当前流通股本*100,IF(收盘价<1日前的收盘价,-成交量/当前流通股本*100,0)),0)
成交额赋值:V*C/100,NODRAW
A2赋值:SUM((IF(((成交额/8>20) AND (收盘价>(1日前的收盘价))),成交额,0)),0)
A3赋值:SUM((IF(((成交额/8>20) AND (收盘价<(1日前的收盘价))),成交额,0)),0)
A4赋值:SUM((IF(((成交额/8<20) AND (收盘价>(1日前的收盘价))),成交额,0)),0)
A5赋值:SUM((IF(((成交额/8<20) AND (收盘价<(1日前的收盘价))),成交额,0)),0)
A6赋值:((A2+A3)+A4)+A5
A7赋值:IF((ISLASTBAR),((100*A2)/A6),0)
A8赋值:IF((ISLASTBAR),((100*A3)/A6),0)
A9赋值:IF((ISLASTBAR),((100*A4)/A6),0)
A10:=IF((ISLASTBAR),((100*A5)/A6),0)
输出机构买:(A2), 线宽为3,画红色
输出机构卖:(A3), 线宽为3,画绿色
机构进出赋值:机构买-机构卖,NODRAW
输出散户买:(A4),COLOR5555FF
输出散户卖:(A5),画青色
散户进出赋值:散户买-散户卖,,画白色,NODRAW
输出强势:((100*A2)/A6>50)
当满足条件强势时,在机构买*1.02和机构买*1.1之间画柱状线
输出拉升:((100*A2)/A6-(100*A3)/A6)>18 AND (100*A2)/A6-(100*A5)/A6>18
当满足条件拉升时,在机构买*1.1和机构买*1.2之间画柱状线
当满足条件ISLASTBAR=1时,在机构买*0.95和''位置书写文字
当满足条件ISLASTBAR=1时,在机构卖*0.95和''位置书写文字
Q赋值:BETWEEN(C/(SUM(成交额,C的有效数据周期数)/SUM(成交量*100,C的有效数据周期数)),1.05,0.95)
Q2:=IF(Q=0,MA(C,C的有效数据周期数),(SUM(成交额,C的有效数据周期数)/SUM(成交量*100,C的有效数据周期数)))
DRAWICON(CROSS((C/Q2),1.03),机构买,5)
输出{股票指标网 整理}
XG:C/Q2
DD1赋值:1
554096744738384048AA1赋值:STRCAT(STRCAT('机构买入',CON2STR((100*A2)/A6,0)),'%')
554096744738384048AA2赋值:STRCAT(STRCAT('机构卖出',CON2STR((100*A3)/A6,0)),'%')
AAA0赋值:STRCAT(STRCAT('机构总买入',CON2STR((100*(A2-A3))/A6,0)),'%')
554096744738384048AA3赋值:STRCAT(STRCAT('散户买入',CON2STR((100*A4)/A6,0)),'%')
A554096744738384048A4赋值:STRCAT(STRCAT('散户卖出',CON2STR((100*A5)/A6,0)),'%')
AAA5赋值:STRCAT(STRCAT('散户总买入',CON2STR((100*(A4-A5))/A6,0)),'%')
当满足条件DD1=1时,在横轴0.001纵轴0.05位置书写文字
当满足条件DD1=1时,在横轴0.001纵轴0.15位置书写文字
当满足条件DD1=1时,在横轴0.001纵轴0.25位置书写文字
当满足条件DD1=1时,在横轴0.001纵轴0.35位置书写文字
当满足条件DD1=1时,在横轴0.001纵轴0.45位置书写文字
当满足条件DD1=1时,在横轴0.001纵轴0.55位置书写文字
主力净买额赋值:(机构进出+散户进出)/成交额,NODRAW
AAA6赋值:STRCAT(STRCAT('主力净买额',CON2STR(主力净买额,0)),'%')
当满足条件DD1=1时,在横轴0.14纵轴0.05位置书写文字