通达信半仓操作主图指标

2015-12-06 20:32:00来源:本站整理浏览:395

通达信半仓操作主图指标
 

源码

{关键位预测}

买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,13)*21+C,49);
预测:IF(买线<卖线,REFDATE(HHV(H,34),DATE)-(REFDATE(HHV(H,34),DATE)-REFDATE(LLV(L,34),DATE))*(1-0.236),REFDATE(LLV(L,34),DATE)+(REFDATE(HHV(H,34),DATE)-REFDATE(LLV(L,34),DATE))*(1-0.236)),COLORYELLOW,NODRAW;
 HUGO:=IF(买线>卖线,REFDATE(LLV(L,34),DATE)+(REFDATE(HHV(H,34),DATE)-REFDATE(LLV(L,34),DATE))*(1-0.236),DRAWNULL),COLORRED;
 {半仓操作判断}
D顶:REFDATE(HHV(H,34),DATE),COLORMAGENTA;
 D底:REFDATE(LLV(L,34),DATE),COLORLIBLUE;

机构买入:=L2_AMO(0,2)/100000000.0,NODRAW;
机构卖出:=-L2_AMO(0,3)/100000000.0,NODRAW;
机构净买:=机构买入+机构卖出,NODRAW;
累计:=EMA(机构净买,50)*60,NODRAW;
均值:=EMA(累计,MIN(10,10)),NODRAW;
 STICKLINE(累计>0,D顶,D底,6,0),COLOR1B0E8B;
 STICKLINE(累计<0,D顶,D底,6,0),COLOR6B6B12;

{持股持币判断}
DRAWBAND(MA(DKX,M),RGB(10,100,10),DKX,RGB(180,10,10));
持股:IF(DKX>=MA(DKX,M),1,DRAWNULL),COLORRED,NODRAW;
持币:IF(DKX<MA(DKX,M),1,DRAWNULL),COLOR00FF00,NODRAW;
阻二:(D顶+(D顶+(D顶+D底)/2)/2)/2,COLOR00BB00,DOTLINE;
阻一:(D顶+(D顶+D底)/2)/2,COLOR00BB00,DOTLINE;
中线:(D顶+D底)/2,COLORDD99DD,DOTLINE;
撑一:(D底+中线)/2,COLOR00BB00,DOTLINE;
撑二:(D底+撑一)/2,COLOR33BB33,DOTLINE;

{立柱量判断}
均价1:=(3*C+H+L+O)/6;
 VAR1AA:=(8*均价1+7*REF(均价1,1)+6*REF(均价1,2)+5*REF(均价1,3)+4*REF(均价1,4)+3*REF(均价1,5)+2*REF(均价1,6)+REF(均价1,8))/36;
 VAR2A:=(LLV(VAR1AA,2)+LLV(VAR1AA,4)+LLV(VAR1AA,6))/3;
 TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND C>VAR1AA;
立桩量:=FILTER(TJ1,5);
 TJ2:=IF(BARSLAST(立桩量)=1 AND C>REF(H,1),1,IF(BARSLAST(立桩量)=2 AND C>REF(H,2),1,IF(BARSLAST(立桩量)=3 AND C>REF(H,3),1,0)));
突破:=TJ2=1;
 TJ3:=IF(BARSLAST(立桩量)=1 AND C>REF(L,1),1,IF(BARSLAST(立桩量)=2 AND C>REF(L,2),1,IF(BARSLAST(立桩量)=3 AND C>REF(L,3),1,0)));
三天法则:=TJ3=1;
成立:=三天法则 AND 突破;
条件成立:=FILTER(成立,3),COLORF0099F,NODRAW;
 STICKLINE(立桩量>=1,L,H,8,0),COLORF0099F;
 STICKLINE(C,REF(H,BARSLAST(立桩量)),REF(H,BARSLAST(立桩量)),3,-1),COLORCYAN;
 STICKLINE(C,REF(L,BARSLAST(立桩量)),REF(L,BARSLAST(立桩量)),3,-1),COLORYELLOW;
 DRAWTEXT(条件成立,L*0.995,"成立"),COLORMAGENTA;

{主升浪判断}
A101:=EMA(CLOSE,5)>EMA(CLOSE,6) AND EMA(CLOSE,6)>EMA(CLOSE,7) AND EMA(CLOSE,7)>EMA(CLOSE,8) AND EMA(CLOSE,8)>EMA(CLOSE,9)
 AND EMA(CLOSE,9)>EMA(CLOSE,10) AND EMA(CLOSE,10)>EMA(CLOSE,11) AND EMA(CLOSE,11)>EMA(CLOSE,12)
 AND EMA(CLOSE,12)>EMA(CLOSE,13) {AND EMA(CLOSE,13)>EMA(CLOSE,14) AND EMA(CLOSE,14)>EMA(CLOSE,15)};
 A102:=EMA(CLOSE,15){EMA(CLOSE,15)}>EMA(CLOSE,21) AND EMA(CLOSE,21)>EMA(CLOSE,34) AND EMA(CLOSE,34)>EMA(CLOSE,55) AND EMA(CLOSE,55)>EMA(CLOSE,89)
 AND EMA(CLOSE,89)>EMA(CLOSE,144) AND EMA(CLOSE,144)>EMA(CLOSE,233);
 A1:= A101 AND A102;
短升:IF(A101,1,DRAWNULL),COLORFF00FF,NODRAW;
中升:IF(A1,1,DRAWNULL),COLORRED,NODRAW;
 STICKLINE(A101,L,H,6,0),COLOR006666;
 STICKLINE(A101 AND A102,L,H,4,0),COLOR660066;

{K线图}
DRAWKLINE(H,O,L,C);

{30日量能平台}
T1:=CONST(HHVBARS(V,30));
量30:IF(CURRBARSCOUNT<=30+7,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL),COLORYELLOW;

{均线}
MA5:MA(C,5),COLORFFFFFF,LINETHICK2;
 MA13:=MA(C,13),COLORWHITE,LINETHICK1;
 MA21:=MA(C,21),COLOREE00EE,LINETHICK2;
 MA34:=MA(C,34),COLOR00DDDD,LINETHICK1;
 MA55:=MA(C,55),COLOR00FFFF,LINETHICK2;
操盘:DKX,COLOR00FF00,LINETHICK3;
 IF(MA5>=REF(MA5,1),MA5,DRAWNULL),COLORFF00FF,LINETHICK2;
 IF(DKX>REF(DKX,1),DKX,DRAWNULL),COLORFF00FF,LINETHICK3;

{多空买卖判断}
VAR1:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));
 VAR2:=((REF(VAR1,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
 VAR3:=((REF(VAR2,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
 VAR4:=((REF(VAR3,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
 VAR5:=((REF(VAR4,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
 VAR6:=((REF(VAR5,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
 VAR7:=((REF(VAR6,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
 VAR8:=((REF(VAR7,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
 VAR9:=((REF(VAR8,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
 VARA:=((REF(VAR9,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
 VARB:=((REF(VARA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
 VARC:=((REF(VARB,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));

[1] [2]  下一页

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式