资金主图指标 公式 源码[大智慧公式]
指标公式源码分析及使用说明:
源码:
DRAWGBKLAST(v>1,STRIP(RGB(0,150,130),RGB(0,0,0),1));
帐户总数:extradata('小股民线'),linethick0,PRECIS0;
户均持股:=(FINANCE2(37)/帐户总数)*10000;
ZH3:=ref(帐户总数,3);
HJ3:=ref(户均持股,3);
DRAWTEXTREL(5,13,'帐户总数(户):'+NUMTOSTRN(帐户总数,0)),Color0000FF;
DRAWTEXTREL(170,13,'户均持股(股):'+NUMTOSTRN(户均持股,0)),Color0000FF;
{我赢}
我:=MA(C,1);
赢:=SMA(SMA(SMA(我,2,1),2,1),2,1);
龙:=MA(赢,3);
FILLRGN(赢,龙,赢>=龙),Color0000FF;
FILLRGN(赢,龙,赢<龙),Color008000;
我赢龙头:=(L+H+C*4)/6;
{立桩}
BDGD:=C=HHV(C,13);
GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),2))+1;
高点:REF(C,GDSJ),COLOR00FF00,POINTDOT,LINETHICK1;
突破:CROSS(C,REF(高点,1)),COLOR00FFFF,POINTDOT,LINETHICK0;
STICKLINE(GDSJ<=6,高点,高点,8,0),COLORFF00FF;
BDDD:=C=LLV(C,13);
DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),2))+1;
低点:REF(C,DDSJ),COLOR00FFFF,POINTDOT,LINETHICK1;
STICKLINE(DDSJ<=6,低点,低点,8,0),COLOR00FF00;
{填充}
N:=20;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00aa00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00cc00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00ee00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0),COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR0000aa;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR0000cc;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0),COLOR0000ee;
aa:=(ref(close,1)+ref(close,2)+open)/3;
{资金}
TODAY:=DYNAINFO(7)=CLOSE and (ORDER(1)=0 and ORDER(2)=0);{判断是否有数据}
{TODAY:="ddx.ddx"=0;}{判断是否有正版数据}
Ddmr:=IF(TODAY,("DDEDATA@BIGORDER"(1,2)-"DDEDATA@BIGORDER"(2,2)),(bigorder(1,2)-bigorder(2,2)))*vol/capital*100;
Ddmrs:=sum(Ddmr,0);
Chb:=IF(TODAY,"DDEDATA@BIGORDER"(1,3),bigorder(1,3))*AMOUNT;
Dhb:=IF(TODAY,("DDEDATA@BIGORDER"(1,2)-"DDEDATA@BIGORDER"(1,3)),(bigorder(1,2)-bigorder(1,3)))*AMOUNT;
Zhb:=IF(TODAY,("DDEDATA@BIGORDER"(1,1)-"DDEDATA@BIGORDER"(1,2)),(bigorder(1,1)-bigorder(1,2)))*AMOUNT;
Xhb:=IF(TODAY,(1-"DDEDATA@BIGORDER"(1,1)),(1-bigorder(1,1)))*AMOUNT;
Chs:=IF(TODAY,"DDEDATA@BIGORDER"(2,3),bigorder(2,3))*AMOUNT;
Dhs:=IF(TODAY,("DDEDATA@BIGORDER"(2,2)-"DDEDATA@BIGORDER"(2,3)),(bigorder(2,2)-bigorder(2,3)))*AMOUNT;
Zhs:=IF(TODAY,("DDEDATA@BIGORDER"(2,1)-"DDEDATA@BIGORDER"(2,2)),(bigorder(2,1)-bigorder(2,2)))*AMOUNT;
Xhs:=IF(TODAY,(1-"DDEDATA@BIGORDER"(2,1)),(1-bigorder(2,1)))*AMOUNT;
散资:=(xhb-xhs)/10000;
中资:=(zhb-zhs)/10000;
大资:=(dhb-dhs)/10000;
超资:=(chb-chs)/10000;
超资增仓:=超资;
大资增仓:=大资;
中资增仓:=中资;
散资增仓:=散资;
BBD净额:=(超资+大资);
DRAWTEXTREL(5,85,'BBD (万):'+NUMTOSTRN(BBD净额,0)),LINETHICK1,Color0080FF;
DRAWTEXTREL(5,155,'超资(万):'+NUMTOSTRN(超资增仓,0)),LINETHICK1,COLORYELLOW;
DRAWTEXTREL(5,225,'大资(万):'+NUMTOSTRN(大资增仓,0)),LINETHICK1,Color62FFFF;
DRAWTEXTREL(5,295,'中资(万):'+NUMTOSTRN(中资增仓,0)),LINETHICK1,ColorACFFFF;
DRAWTEXTREL(5,365,'散资(万):'+NUMTOSTRN(散资增仓,0)),LINETHICK1,ColorFFFFFF;
DRAWRECTABS(0,118,270,0,1),COLOR00FF00;
zln:=REF(IF(TODAY,IF(TODAY,"DDEDATA@BIGORDER"(1,2),SELFDATA('特大买入')+SELFDATA('大单买入')),bigorder(1,2)),0);
zlm:=REF(IF(TODAY,IF(TODAY,"DDEDATA@BIGORDER"(2,2),SELFDATA('特大卖出')+SELFDATA('大单卖出')),bigorder(2,2)),0);
tdn:=REF(IF(TODAY,IF(TODAY,"DDEDATA@BIGORDER"(1,3),SELFDATA('特大买入')),bigorder(1,3)),0);
tdm:=REF(IF(TODAY,IF(TODAY,"DDEDATA@BIGORDER"(2,3),SELFDATA('特大卖出')),bigorder(2,3)),0);
ddn:=REF(IF(TODAY,IF(TODAY,("DDEDATA@BIGORDER"(1,2)-"DDEDATA@BIGORDER"(1,3)),SELFDATA('大单买入')),(bigorder(1,2)-bigorder(1,3))),0);
ddm:=REF(IF(TODAY,IF(TODAY,("DDEDATA@BIGORDER"(2,2)-"DDEDATA@BIGORDER"(2,3)),SELFDATA('大单卖出')),(bigorder(2,2)-bigorder(2,3))),0);
zdn:=REF(IF(TODAY,IF(TODAY,("DDEDATA@BIGORDER"(1,1)-"DDEDATA@BIGORDER"(1,2)),SELFDATA('中单买入')),(bigorder(1,1)-bigorder(1,2))),0);
zdm:=REF(IF(TODAY,IF(TODAY,("DDEDATA@BIGORDER"(2,1)-"DDEDATA@BIGORDER"(2,2)),SELFDATA('中单卖出')),(bigorder(2,1)-bigorder(2,2))),0);
sdn:=REF(IF(TODAY,IF(TODAY,1-("DDEDATA@BIGORDER"(1,1)),1-(SELFDATA('特大买入')+SELFDATA('大单买入')+SELFDATA('中单买入'))),1-(bigorder(1,1))),0);
sdm:=REF(IF(TODAY,IF(TODAY,1-("DDEDATA@BIGORDER"(2,1)),1-(SELFDATA('特大卖出')+SELFDATA('大单卖出')+SELFDATA('中单卖出'))),1-(bigorder(2,1))),0);
tdj:=tdn-tdm;
ddj:=ddn-ddm;
zdj:=zdn-zdm;
sdj:=sdn-sdm;
zlj:=zln-zlm;
DRAWTEXTREL(140,85,'占'+numtostrn(((zlj))*100,1)+'%'),Color0080FF;
DRAWTEXTREL(140,155,'占'+numtostrn((tdj)*100,1)+'%'),COLORYELLOW;
DRAWTEXTREL(140,225,'占'+numtostrn((ddj)*100,1)+'%'),Color62FFFF;
DRAWTEXTREL(140,295,'占'+numtostrn((zdj)*100,1)+'%'),ColorACFFFF;
DRAWTEXTREL(140,365,'占'+numtostrn((sdj)*100,1)+'%'),ColorFFFFFF;
DRAWTEXTREL(200,85,numtostrn(((zlj))*V,0)+'手'),Color0080FF;
DRAWTEXTREL(200,155,numtostrn((tdj)*V,0)+'手'),COLORYELLOW;
DRAWTEXTREL(200,225,numtostrn((ddj)*V,0)+'手'),Color62FFFF;
DRAWTEXTREL(200,295,numtostrn((zdj)*V,0)+'手'),ColorACFFFF;
DRAWTEXTREL(200,365,numtostrn((sdj)*V,0)+'手'),ColorFFFFFF;
DRAWTEXTREL(280,85,'仓 '+NUMTOSTRN(50+Sum((VOL/CAPITAL)*100*((zlj)),0),1)+'%'),Color0080FF;
DRAWTEXTREL(280,155,'仓 '+NUMTOSTRN(25+Sum((VOL/CAPITAL)*100*(tdj),0),1)+'%'),COLORYELLOW;
DRAWTEXTREL(280,225,'仓 '+NUMTOSTRN(25+Sum((VOL/CAPITAL)*100*(ddj),0),1)+'%'),Color62FFFF;
DRAWTEXTREL(280,295,'仓 '+NUMTOSTRN(25+Sum((VOL/CAPITAL)*100*(zdj),0),1)+'%'),ColorACFFFF;
DRAWTEXTREL(280,365,'仓 '+NUMTOSTRN(25+Sum((VOL/CAPITAL)*100*(sdj),0),1)+'%'),ColorFFFFFF;{程序化交易 www.cxh99.com }
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容