通达信半仓操作主图指标公式

M:=6;
{关键位预测}
买线:=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)));
多:=(((((((((((VAR1 OR VAR2) OR VAR3) OR VAR4) OR VAR5) OR VAR6) OR VAR7) OR VAR8) OR VAR9) OR VARA) OR VARB) OR VARC);
STICKLINE(多,L,H,0,0),COLOR0000FF;
STICKLINE(多 AND C>=O,C,O{REF(C,1)},3,1),COLOR0000FF;
STICKLINE(多 AND C<O,C,O{REF(C,1)},3,0),COLOR0000FF;
VARD:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));
VARE:=((REF(VARD,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VARF:=((REF(VARE,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR10:=((REF(VARF,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR11:=((REF(VAR10,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR12:=((REF(VAR11,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR13:=((REF(VAR12,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR14:=((REF(VAR13,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR15:=((REF(VAR14,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR16:=((REF(VAR15,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR17:=((REF(VAR16,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR18:=((REF(VAR17,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
空:=(((((((((((VARD OR VARE) OR VARF) OR VAR10) OR VAR11) OR VAR12) OR VAR13) OR VAR14) OR VAR15) OR VAR16) OR VAR17) OR VAR18);
STICKLINE(空,H,L,0 ,0 ),COLOR00FF00;
STICKLINE(空 AND C>=O,C,O{REF(C,1)},3,1),COLOR00FF00;
STICKLINE(空 AND C<O,C,O{REF(C,1)},3,0),COLOR00FF00;
VAR19:=(REF((((((((((((VARD OR VARE) OR VARF) OR VAR10) OR VAR11) OR VAR12) OR VAR13) OR VAR14) OR VAR15) OR VAR16) OR VAR17) OR VAR18),1) AND VAR1);
VAR1A:=(REF((((((((((((VAR1 OR VAR2) OR VAR3) OR VAR4) OR VAR5) OR VAR6) OR VAR7) OR VAR8) OR VAR9) OR VARA) OR VARB) OR VARC),1) AND VARD);
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0 ),COLORDDDDDD;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORFF8800;
DRAWICON(VAR19,L*0.995,1);
DRAWICON(VAR1A,H*1.005,2);
STICKLINE(CURRBARSCOUNT=1,预测,预测,100,-1),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=1,HUGO,HUGO,100,-1),COLORFF00FF;
DRAWTEXT(ISLASTBAR,预测,' 【预测关键位】'),COLORFFFFFF,LINETHICK1;
DRAWTEXT((A101=1 AND REF(A101,1)=0),O,'短主升'),COLOR00FFFF;
DRAWTEXT((A1=1 AND REF(A1,1)=0),O*0.985,'中长升'),COLOR00FFFF;
IF(CURRBARSCOUNT=T1+1,量30,DRAWNULL),CIRCLEDOT,COLORDD00FF,LINETHICK3;
DRAWTEXT(ISLASTBAR,量30,' 30量能平台');
{DRAWTEXT(ISLASTBAR,D顶,' D顶'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,D底,' D底'),COLORLIBLUE;}
DRAWTEXT(ISLASTBAR,中线,' 中线'),COLORDD99DD;
DRAWTEXT(ISLASTBAR,阻一,' 阻一'),COLOR00BB00;
DRAWTEXT(ISLASTBAR,阻二,' 阻二'),COLOR00BB00;
DRAWTEXT(ISLASTBAR,撑一,' 撑一'),COLOR00BB00;
DRAWTEXT(ISLASTBAR,撑二,' 撑二'),COLOR33BB33;
{DRAWTEXT_FIX(1,0.12,0.95,0,'【短线】 红白柱买入,蓝绿柱卖出。' ),COLORFFDD00;};
T6:=IF(FINDSTR(EXTERNSTR(0,1),','),STRCAT('千股千评:',EXTERNSTR(0,1)),'');
NNN:=IF(TOTALBARSCOUNT>=120,120,TOTALBARSCOUNT);
{本输出适用于锁定K线数为120,N可改为你习惯的K线数,见下图}
HH0:=HHV(H,NNN);
LL0:=LLV(L,NNN);
MM0:=CONST((HH0+LL0)*0.5);
S01:=CONST(IF(REF(C,NNN-15)>MM0,1.00,-0.08));
S02:=CONST(IF(REF(C,NNN-15)>MM0,-1,1));
S6:=IF(FINDSTR(EXTERNSTR(0,1),','),S01+(0.08*S02),S01);
DRAWTEXT_FIX(1,0,S6,0,T6)COLOR0000FF;

通达信半仓操作主图指标公式

版权声明

本文仅代表作者观点,不代表无忧指标公式网立场。
本文系作者授权无忧指标公式网发表,未经许可,不得转载。

文章内容来自互联网,本网站无任何收费项目也不推荐股票
广告投放请自行识别风险。本站无任何QQ群微信群