在线检测未来函数

大智慧阿旺主图指标公式

来源:Internet,编辑:股旁网,2014-12-10

外盘:=sum(if(DYNAINFO(23)*close,DYNAINFO(23),0),0)*0.003906;
内盘:=sum(if(DYNAINFO(22)*close,DYNAINFO(22),0),0)*0.003906;
主动率:=(外盘-内盘)/(内盘+外盘)*100;
PD:="DDX.DDX"=0;
买入单数:= IF(PD,"DDEDATA@ORDER"(1),ORDER(1));
卖出单数:= IF(PD,"DDEDATA@ORDER"(2),ORDER(2));
单数比:=卖出单数/买入单数;
ZDLR:=IF(PD,("DDEDATA@BIGORDER"(1,1)-"DDEDATA@BIGORDER"(1,2)),bigorder(1,1)-bigorder(1,2));
ZDLC:=IF(PD,("DDEDATA@BIGORDER"(2,1)-"DDEDATA@BIGORDER"(2,2)),bigorder(2,1)-bigorder(2,2));
DDLR:=IF(PD,"DDEDATA@BIGORDER"(1,2)-"DDEDATA@BIGORDER"(1,3),bigorder(1,2)-bigorder(1,3));
DDLC:=IF(PD,"DDEDATA@BIGORDER"(2,2)-"DDEDATA@BIGORDER"(2,3),bigorder(2,2)-bigorder(2,3));
TDLR:=IF(PD,"DDEDATA@BIGORDER"(1,3),bigorder(1,3));
TDLC:=IF(PD,"DDEDATA@BIGORDER"(2,3),bigorder(2,3));
XDLR:=IF(PD,1-"DDEDATA@BIGORDER"(1,1),1-bigorder(1,1));
XDLC:=IF(PD,1-"DDEDATA@BIGORDER"(2,1),1-bigorder(2,1));
ZLLR:=IF(PD,"DDEDATA@BIGORDER"(1,2),bigorder(1,2));
ZLLC:=IF(PD,"DDEDATA@BIGORDER"(2,2),bigorder(2,2));
ZLJL:=(ZLLR-ZLLC);
通吃:=(ZLLR-ZLLC)*AMOUNT;
通吃率:=通吃/AMOUNT*100;
DRAWTEXTABS(20,110,'主 动 率:'+ NUMTOSTRN(主动率,2)),COLOR00FFFF;
DRAWTEXTABS(170,110,'单 数 比:'+ NUMTOSTRN(单数比,2)),COLOR00FFFF;
DRAWTEXTABS(20,130,'通 吃 率:'+ NUMTOSTRN(通吃率,2)),COLOR00FFFF;
DRAWTEXTABS(170,15,'■所属板块:'+BKNAME),ColorYELLOW,linethick1;
流通盘大小:=FINANCE2(37)/1000000*100;
DRAWTEXTABS(20,15,'流通盘大小:'+NUMTOSTRN(流通盘大小,2)+'亿'),LINETHICK1,ColorYELLOW;
每股收益:=FINANCE2(3);
每股市盈率:=DYNAINFO(39);
每股净资产:=FINANCE2(4);
销售毛利率:=FINANCE2(12);
主营收入同比:=FINANCE2(11);
净利润同比增长:=FINANCE2(10);
DRAWTEXTABS(170,30,'每股收益:'+NUMTOSTRN(每股收益,2)+'元'),COLORRED;
DRAWTEXTABS(170,50,'每股市盈率:'+NUMTOSTRN(每股市盈率,1)+'倍'),COLORRED;
DRAWTEXTABS(170,70,'每股净资产:'+NUMTOSTRN(每股净资产,2)+'元'),COLORRED;
DRAWTEXTABS(20,30,'销售毛利率:'+NUMTOSTRN(销售毛利率,2)+'%'),LINETHICK1,COLOR00FF00;
DRAWTEXTABS(20,50,'主营收入同比增长:'+NUMTOSTRN(主营收入同比,2)+'%'),LINETHICK1,COLOR00FF00;
DRAWTEXTABS(20,70,'净利润同比增长:'+NUMTOSTRN(净利润同比增长,2)+'%'),LINETHICK1,COLOR00FF00;
DRAWTEXTABS(170,90,'历史最高价:'+HHV(HIGH,0)),Colorred,LINETHICK0;
DRAWTEXTABS(20,90,'历史最低价:'+LLV(LOW,0)),COLOR00FF00,LINETHICK0;
DRAWTEXTABS(170,1,'恭喜发财'),COLORff00ff;
DRAWTEXTABS(20,0,'☆阿旺☆均线主图'),COLORff00ff;
交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
预测量1:=IF(BARSTATUS=2,VOL/交易分钟数*240,VOL);
预测量:if(DYNAINFO(4)=0,v,预测量1),COLOR00FFFF,LINETHICK0;
DDX:=ZLJL*vol/capital*100;
天量:HHV(V,30),COLOR00FF00,linethick0;
地量:=IF(V=LLV(V,30),V,REF(V,BARSLAST(V=LLV(V,30))));
三十日地量:REF(地量,1),colorred,linethick0;
drawtext(天量=预测量 and DDX<0 and sum(DDX,3)<0 and REF(c,30)>0,HIGH,'压'),COLOR00FF00;
drawtext(三十日地量>预测量 and sum(DDX,3)>0 and REF(c,30)>0,LOW-0.1,'底'),COLORRED;
drawtext(REF(V,1)=三十日地量 and DDX>0 and sum(DDX,3)>0 and REF(c,30)>0,LOW,'拉'),COLOR00FFFF;
drawtext(REF(V,1)=天量 and 预测量<天量 and DDX<0 and REF(c,30)>0,HIGH+0.1,'跌'),COLOR00FF00;
委买1:=买入单数;
委卖1:=卖出单数;
交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
预测买1:=IF(BARSTATUS=2,委买1/交易分钟数*240,委买1);
委买:=if(DYNAINFO(4)=0,委买1,预测买1);
预测卖1:=IF(BARSTATUS=2,委卖1/交易分钟数*240,委卖1);
委卖:=if(DYNAINFO(4)=0,委卖1,预测卖1);
ST:=STRFIND(stkname,'ST',1)>0;
S:=STRFIND(stkname,'S',1)>0;
停牌:=DYNAINFO(4)=0;
流通股价:=FINANCE2(36)<50000 AND C<30 or FINANCE2(36)<80000 AND C<15;
委:=流通股价 and not(ST) and not(停牌) and not(S) and 委买<400 and 委卖<400;
XDJL:=(XDLR-XDLC)*3;
ZDJL:=(ZDLR-ZDLC)*3;
ZLJL1:=(ZLLR-ZLLC)*3;
主筹:=sum(ZLJL1,3);
派筹:=sum(XDJL+ZDJL,3);
抢筹:=sum(ZLJL1+ZDJL,3);
drawtext(抢筹>3 and 主筹>派筹,LOW+0.7,'持'),COLORRED;
STICKLINE(抢筹>1 and 主筹>派筹,CLOSE,OPEN,8.5,0),COLORRED;
STICKLINE(抢筹>2 and 主筹>派筹,CLOSE,OPEN,9.5,0),COLOR00FFFF;
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:= EMA(DIFF,9);
A1:=BARSLAST(REF(CROSS(DIFF,DEA ),1));
DRAWTEXT(REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA)>0,L-0.2,'M'),COLOR00FFFF;{MACD背离};
RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,13)-LLV(LOW,9))*100;
K1:=SMA(RSV1,3,1);
D1:=SMA(K1,3,1);
A2:=BARSLAST(REF(CROSS(K1,D1),1));
DRAWTEXT(REF(C,A2+1)>C AND REF(K1,A2+1)<K1 AND CROSS(K1,D1),L-0.3,'K'),COLORFF00FF;{KDJ底背离};
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
DRAWTEXT(REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2)>0,L-0.4,'强'),COLOR0000FF;{RSI底背离};
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
DRAWTEXT(REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF)>0,H+0.2,'M'),COLOR00FF00;{MACD顶背离};
C2:=BARSLAST(REF(CROSS(D1,K1),1));
DRAWTEXT(REF(C,C2+1)<C AND REF(K1,C2+1)>K1 AND CROSS(D1,K1)>0,H+0.3,'K'),COLORFFFFCC;{KDJ顶背离}
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
DRAWTEXT(REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1)>0,H+0.4,'弱'),COLORFF9900;{RSI顶背离};
DRAWTEXT(CROSS(ZIG(3,8),REF(ZIG(3,8),1)),LOW-0.6,'买') ,LINETHICK2,COLORRED;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH+0.6,'卖'),LINETHICK2,COLORGREEN;
重心:=(C+0.618*REF(C,1)+0.382*REF(C,1)+0.236*REF(C,3)+0.146*REF(C,4))/2.382;
操盘线:EMA(((SLOPE(C,22)*20)+C),55),COLORYELLOW,LINETHICK4;
PARTLINE(操盘线,重心>操盘线,RGB(255,0,0), 重心<操盘线,RGB(0,255,0)),linethick2;
变:EMA(CLOSE,5),LINETHICK1,COLORYELLOW;
PARTLINE(变,变>REF(变,1),RGB(255,0,0), 变<REF(变,1),RGB(0,255,0)),linethick2;
DRAWTEXT( BARSTATUS=2,变,'雷'),COLORRED;
DRAWTEXT( BARSTATUS=2,操盘线,'操'),COLORRED;
控盘:=(EMA(EMA(CLOSE,9),9)-REF(EMA(EMA(CLOSE,9),9),1))/REF(EMA(EMA(CLOSE,9),9),1)*1000;
DRAWTEXT(CROSS(控盘,0),l-0.1,'控'),COLOR00FFFF;
STICKLINE(控盘>0,CLOSE,OPEN,1.5,0),COLORff00ff;
STICKLINE(100*WINNER(CLOSE*0.95)>50 AND COST(85)<CLOSE AND 控盘>0,CLOSE,OPEN,3.6,0),COLORff00ff;
STICKLINE(CLOSE/REF(CLOSE,1)>1.06 AND VOL>MA(VOL,5) and 单数比>1.15 and ZLLR>ZLLC and ZLLR*v>v/2,CLOSE,OPEN,6.5,0),color1e90ff;
乖离线:=((c-ref(ma(c,20),1))/20+ma(c,20))*1.20;
STICKLINE(cross(c,乖离线),HHV(HIGH,1),c,7.5,0),COLORGREEN;
结线:=((REF(HIGH,1)+REF(LOW,1))/(2))*(IF((DATE<=9990314),1,0));
马线:=MA(CLOSE,20)+((2)*(STD(CLOSE,20)))*(IF((DATE<=9990314),1,0));
STICKLINE(CROSS(结线,马线),open,c,7.5,0),CoLor008000;
散买数:=amount*XDLR/10000/(200/c);
散卖数:=amount*XDLC/10000/(200/c);
主买数:=amount*bigorder(1,2)/10000/(2000/c);
主卖数:=amount*bigorder(2,2)/10000/(2000/c);
散净:=sum(散买数-散卖数,30);
主净:=sum(主买数-主卖数,30);
牛插:=CROSS(主净,散净);
死牛:=CROSS(主净,散净);
平主:=ma(主净,3);
平散:=ma(散净,3);
STICKLINE(CROSS(平散,散净) and 平散<REF(平散,1) and 散净<REF(散净,1) and CROSS(主净,平主) and 平主>REF(平主,1) and 主净>REF(主净,1),open,c,3.5,0),COLOR00FFFF;
STICKLINE(CROSS(散净,主净),open,c,6.5,0),colorwhite;
STICKLINE(CROSS(主净,散净),open,c,6.5,0),colorbrown;
主庄:=主净>0;
PARTLINE(变,主净>0),pointdot,linethick3,COLOR00FFFF;
STICKLINE(委,LLV(LOW,1),OPEN,7.5,0),COLOR00FFFF;
阻:=REF((1+7/100)*(DMA(CLOSE,ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20))),1);
平:=EMA(EMA(EMA(HIGH+(3.2*SLOPE(EMA(CLOSE,3),2)),3),4),4);
回:=EMA(EMA(EMA(HIGH+(3.2*SLOPE(EMA(CLOSE,3),2)),3),4),4)*0.95;
支:=REF((1-7/100)*(DMA(CLOSE,ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20))),1);
DRAWTEXT( CROSS(支,平),l,'价底');
DRAWTEXT( CROSS(平,支),l,'启动');
DRAWTEXT( CROSS(回,阻),l,'涨');
DRAWTEXT( CROSS(阻,平),h,'离');
DRAWTEXT( CROSS(阻,回),h,'逃');
趋势线:=EMA((3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1)),3);
STICKLINE(趋势线>90 and 趋势线>ref(趋势线,1),h+(h*0.015),h+(h*0.01),15,1),COLORFFFF00;
STICKLINE(趋势线<=13,LLV(LOW,10)-(LLV(LOW,10)*0.015),LLV(LOW,10)-(LLV(LOW,10)*0.01),5,0),colorcc9900;
散买数:=amount*XDLR/10000/(200/c);
散卖数:=amount*XDLC/10000/(200/c);
主买数:=amount*ZLLR/10000/(2000/c);
主卖数:=amount*ZLLC/10000/(2000/c);
散净:=sum(散买数-散卖数,30);
主净:=sum(主买数-主卖数,30);
平主:=ma(主净,3);
平散:=ma(散净,3);
{drawtext(散净>0 and 散净>平散 and 散净>REF(散净,1),HHV(HIGH,1)+(HHV(HIGH,1)*0.1),'↓'),COLORGREEN;
drawtext(主净>0 and 主净>平主 and 主净>REF(主净,1),LLV(LOW,1)-(LLV(LOW,1)*0.1),'↑'),COLORRED;}
季底:=ma(LLV(l,66),3);
月底:=ma(LLV(l,26),3)-0.1;
周底:=ma(LLV(l,5),3)-0.15;
DRAWTEXT( CROSS(月底,周底) and CROSS(季底,周底),LOW-0.5,'3底'),color0000ff;
季高:=ma(HHV(H,66),3);
月高:=ma(HHV(H,26),3)+0.1;
周高:=ma(HHV(H,5),3)+0.15;
DRAWTEXT( CROSS(周高,月高) and CROSS(周高,季高),HIGH+0.5,'三高'),COLORFFFF00;

大智慧阿旺主图指标公式

 

相关文章