通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
原理很简单,在价格和量能都在五日线上方的时候买进入,在价格和量能在五日线一下的时候卖出。
有喜欢做短线、做波段的朋友可能着重关注一下这个方法,虽然通常说30日线是生命线,但是五日在短期操作中也有很重要的指导意义,让我们随便找一直股票,比如之前被董小姐临幸的海立股份,跟做5日线做波段,几乎能到稳赚不赔,来让我们看下面几张图。
买入的时间点:
在操作的时候,在日K图里面只设置5日线,在量能柱上也只设置5日,之后每日盯盘,在价格和量能都在5日线上方的时候,买入并且一直持有,让我们来看下面的这张图。这是我随便找的一支股票,大家可以看到买入之后的行情。
卖出时间点
在k线完全低于五日线,并且量能柱完全低于5日线的时候选择清仓卖出。如下图中海立股份6月27日的收盘价格在11块钱,这时候清仓卖出,后市果然手出一波震荡下跌的走势,中间也并无k线图和量能柱同时高于5日线的情况。该股在7月17日的时候收了一根大阴线,收盘价在9.32元,按照这个系统操作就避免了每手损失将近的170块钱的结果。
是不是偶然的状况,让我们来看海立股份截止今天的走势图。
除此之外,大家要注意的就是,虽然这不是偶然,还是应该注意三个方面,这能使得的你们买卖点更加准确。让我们来看。
这就需要看看形态了,加入五日线和K线的价格差的非常远,那就需要进行减仓,甚至是清仓的操作了。这样的情况一般老说就是股价的高位了,上方还有一个压力位,无法向上突破。这是时候抛售,或者清仓是正确的选择。反之,在K线与五日先相互粘合的时候可以适当加仓。
同时,运用这种方法的时候,大家需要观察一下乖离率,也就是bias,是通过计算市场指数或收盘价与某条移动平均线之间的差距百分比,以反映一定时期内价格与其ma偏离程度的指标,如果运用5日均线法进行操作的话,如果乖离率达到20,那各位股民朋友就要小心了,这说明这段时间股价是走强了,但是有点离谱了。这个时候就需要谨慎操作,减仓,或者进行清仓的操作。
公式源码如下:
VAR1:=IF(DATE>=1990601,0,1);
VAR2:=TROUGHBARS(3,15,1)<10;
VAR3:=PEAKBARS(3,15,1)<10;
VAR4:=IF(VAR2=1,50,0);
VAR5:=IF(VAR3=1,50,0);
底部:=IF(VAR4=50,50,0);
头部:=IF(VAR5=50,100,0);
a:if(底部>ref(底部,1),50,0);
aa:if(头部>ref(头部,1),50,0);
DRAWTEXT(a=50,100,'买'),COLOR00ff00;
DRAWTEXT(aa=50,50,'卖'),COLORred;
INPUT:M1(5,1,999),M2(35,1,999),M3(135,1,999);
黄金柱:=V/REF(V,1)>=2.0;
K1:=SUMBARS(黄金柱,1);
K2:=SUMBARS(黄金柱,2);
K3:=SUMBARS(黄金柱,3);
K4:=SUMBARS(黄金柱,4);
K5:=SUMBARS(黄金柱,5);
K6:=SUMBARS(黄金柱,6);
K7:=SUMBARS(黄金柱,7);
K8:=SUMBARS(黄金柱,8);
K9:=SUMBARS(黄金柱,9);
K10:=SUMBARS(黄金柱,10);
stICKLINE(K1,REF(L,K1-1)*1.002,REF(L,K1-1),10,0),COLORYELLOW;
AA:K1,COLORYELLOW,LINETHICK;
{预定黄金柱}
{预定黄金柱:=REF(V,2)>=REF(V,3)*1.99ANDREF(C,2)>REF(O,2)
ANDREF(V,2)=HHV(V,3)ANDC/REF(C,2)>=1.0995ANDREF(L,2)=LLV(L,3);}
{预定:STICKLINE(预定黄金柱,H,H,30,0),COLORRED;}
{DRAWICON(预定黄金柱,H,19);}
{将军柱中的五星上将黄金柱}
T60:=V=HHV(V,60);
T100:=V=HHV(V,100);
T2:=V/REF(vol,1)>=3;
T3:=REF(C,1)/REF(O,1)<3;
五星上将:=(T60ANDT2ANDT3)OR(T100ANDT2ANDT3);
DRAWICON(五星上将,H,23);
{量柱图}
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,8,0),COLORWHITE;
STICKLINE(涨停,H,L,0,0),COLORWHITE;
DRAWICON(涨停,L-0.2,11);
DRAWTEXT(涨停,L-0.2,'–涨停');
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(跌停,OPEN,CLOSE,8,0),COLORBLUE;
STICKLINE(跌停,H,L,0,1),COLORBLUE;
DRAWICON(跌停,H+0.2,2);
DRAWTEXT(跌停,H+0.2,'–跌停');
{大阳线:=IF((C-C2)*100/C2>=5,1,0)ANDIF((C-C2)*100/C2<(10-0.01*100/C2),1,0)ORIF((C-O)*100/O>=5,1,0)ANDIF((C-C2)*100/C2<(10-0.01*100/C2),1,0);
STICKLINE(大阳线,OPEN,CLOSE,-1,0),COLORRED;
STICKLINE(大阳线,H,L,0,1),COLORRED;
大阴线:=IF((C2-C)*100/C2>=5,1,0)ANDIF((C2-C)*100/C2<(10-0.01*100/C2),1,0)ORIF((O-C)*100/O>=5,1,0)ANDIF((C2-C)*100/C2<(10-0.01*100/C2),1,0);
STICKLINE(大阴线,OPEN,CLOSE,-1,0),COLORGREEN;
STICKLINE(大阴线,H,L,0,1),COLORGREEN;}
{ma13:MA(CLOSE,13),COLORWHITE;
MA34:MA(CLOSE,34),COLORYELLOW;
MA55:MA(CLOSE,55),COLOR9933FF;}
{MA4:MA(CLOSE,4),COLORWHITE;
MA10:MA(CLOSE,10),COLORYELLOW;
MA20:MA(CLOSE,20),COLOR9933FF;
MA30:MA(CLOSE,30),COLORLIBLUE;
MA60:MA(CLOSE,60),COLORWHITE;
MA120:MA(CLOSE,120),COLORLIGREEN;}
S1:=IF(NAMELIKE('S'),0,1);
S2:=IF(NAMELIKE('*'),0,1);
S3:=DYNAINFO(17)>0;
C3:=REF(C,1);
涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);
涨停5日:=COUNT(涨停,5);
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
VV:=MA5>MA10ANDMA10>MA20;
回踩均线:=C>MA(C,5)ANDCROSS(MA(C,5),L);
XG:S1ANDS2ANDS3AND涨停5日AND回踩均线ANDVV;
TY:=C;
AA1:=REF(TY,10)=HHV(TY,2*10+1);BB1:=FILTER(AA1,10);C1:=BacKSET(BB1,10+1);HD:=FILTER(C1,10);
AA2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(AA2,10);CC2:=BACKSET(B2,10+1);LD:=FILTER(CC2,10);
前期高位:REF(H,BArslAST(HD)),COLOR00FF00,POINTDOT,LINETHICK3;
前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,POINTDOT,LINETHICK3;
{求位置坐标}
PHD:=IF(LLV(L,3)>=REF(H,3),REF(H,3),
IF((LLV(L,3)>=REF(C,3)ANDREF(C,3)>REF(O,3)),REF(C,3),
IF(LLV(L,3)>=REF(O,3)ANDREF(C,3)>REF(O,3),REF(O,3),REF(L,3))));
{自动画量能平台}
{NN130021}
{NN:=21;
TTJ:=BARSLAST(REF(倍量黄金柱,NN-1));
K0:=TTJ=0;
K1:=SUMBARS(K0,1);
K2:=SUMBARS(K0,2);
K3:=SUMBARS(K0,3);
K4:=SUMBARS(K0,4);
K5:=SUMBARS(K0,5);
K6:=SUMBARS(K0,6);
K7:=SUMBARS(K0,7);
K8:=SUMBARS(K0,8);
K9:=SUMBARS(K0,9);
K10:=SUMBARS(K0,10);
CCCC1:=REF(C,K1-1);}
{在k线图上标示量柱类型}
DRAWICON((VOL>REF(V,1)*2.0ORVOL=REF(V,1)*2.0)ANDC>REF(C,1),H+0.2,26);
倍量:=(VOL>REF(V,1)*2.0ORVOL=REF(V,1)*2.0)ANDC>REF(C,1);
DRAWICON(VOL<REF(LLV(VOL,13),1),H+0.1,2);
低量:=VOL<REF(LLV(VOL,13),1);
DRAWICON(VOL<REF(LLV(VOL,100),1),H+0.1,12);
地量:=VOL<REF(LLV(VOL,100),1);
DRAWICON(Abs(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5)<=0.03ORABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.03,H+0.1,16);
平量:=ABS(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5)<=0.03ORABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.03;
DRAWICON(VOL<=REF(V,1)*0.5,H+0.1,27);
倍缩:=VOL<=REF(V,1)*0.5;
{画量柱标识:}
{1.画倍量黄金柱标识–红箭头图标}
DRAWICON((LLV(L,3)>REF(L,3)ORLLV(L,3)=REF(L,3))ANDHHV(V,3)<REF(V,3)AND
REF(C,3)>REF(O,3)ANDREF(V,3)>=2*REF(V,4),H+0.2,1);
倍量黄金柱:=(LLV(L,3)>REF(L,3)ORLLV(L,3)=REF(L,3))ANDHHV(V,3)<REF(V,3)AND
REF(C,3)>REF(O,3)ANDREF(V,3)>=2*REF(V,4);
{2.画梯量黄金柱标识–橘子图标}
DRAWICON(LLV(L,3)>REF(L,3)ANDHHV(V,3)<REF(V,3)AND
REF(V,5)>REF(V,6)ANDREF(V,4)>REF(V,5)ANDREF(V,3)>REF(V,4),H,17);
梯量黄金柱:=LLV(L,3)>REF(L,3)ANDHHV(V,3)<REF(V,3)AND
REF(V,5)>REF(V,6)ANDREF(V,4)>REF(V,5)ANDREF(V,3)>REF(V,4);
{3.画平量黄金柱标识–苹果图标}
DRAWICON(LLV(L,3)>REF(L,3)ANDHHV(V,3)<REF(V,3)AND
REF(C,3)>REF(O,3)ANDABS(REF(V,3)-REF(V,4))/REF(V,4)<=0.03,H,19);
平量黄金柱:=LLV(L,3)>REF(L,3)ANDHHV(V,3)<REF(V,3)AND
REF(C,3)>REF(O,3)ANDABS(REF(V,3)-REF(V,4))/REF(V,4)<=0.03;
{4.画立桩量标识–顶部红箭头图标}
N:=25;
立桩量:=REF(V,3)/REF(MA(V,5),4)>(N/10)AND
REF(V,3)/REF(HHV(V,60),4)>1.5ANDLLV(L,3)>REF(L,3);
STICKLINE(倍量,OPEN,CLOSE,8,0),COLORYELLOW;
STICKLINE(倍量黄金柱,PHD,PHD,60,0),COLORWHITE;
倍量黄金线:倍量黄金柱,COLORWHITE,LINETHICK;
DRAWICON(倍量黄金柱,PHD*1.008,12);
DRAWTEXT(倍量黄金柱,PHD*1.010,'标准黄金柱精准线'),COLORFF00FF;
DRAWTEXT(倍量黄金柱,PHD,'================='),COLORWHITE;
{平量黄金线:STICKLINE(平量黄金柱,PHD*1.002,PHD,100,0),COLORYELLOW;
DRAWTEXT(平量黄金柱,PHD*1.015,'平量黄金线'),COLORLIGREEN;
梯量黄金线:STICKLINE(梯量黄金柱,PHD*1.002,PHD,100,0),COLORYELLOW;
DRAWTEXT(梯量黄金柱,PHD*1.015,'梯量黄金线'),COLORFF00FF;}
DRAWICON(立桩量,H*1.002,1);
立桩量标识:立桩量,LINETHICK;
DRAWTEXT(立桩量,H*1.06,'立'),COLORRED;
DRAWTEXT(立桩量,H*1.04,'桩'),COLORRED;
DRAWTEXT(立桩量,H*1.02,'量'),COLORRED;
{DA:STICKLINE(K4<=30,REF(C,K4-1)*1.002,REF(C,K4-1),10,0),COLORBLUE;
EA:STICKLINE(K5<=30,REF(C,K5-1)*1.002,REF(C,K5-1),10,0),COLORBLUE;
FA:STICKLINE(K6<=30,REF(C,K6-1)*1.002,REF(C,K6-1),10,0),COLORBLUE;
GA:STICKLINE(K7<=30,REF(C,K7-1)*1.002,REF(C,K7-1),10,0),COLORBLUE;
HA:STICKLINE(K8<=30,REF(C,K8-1)*1.002,REF(C,K8-1),10,0),COLORBLUE;
IA:STICKLINE(K9<=30,REF(C,K9-1)*1.002,REF(C,K9-1),10,0),COLORBLUE;
JA:STICKLINE(K10<=30,REF(C,K10-1)*1.002,REF(C,K10-1),10,0),COLORBLUE;}
AAA:=REFX(HHV(H,90),DATACOUNT-BARPOS);
TS1:=0+0.03;
TS2:=TS1+0.03;
TS3:=TS2+0.03;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS1),'<一>.量柱的阶段性拐点标志–空间转化原则:'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS2),'1.平台起柱:在k线整理平台上突然起柱;'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS3),'2.凹口起柱:在K线逐步回调形成凹口时起柱.常见凹口倍量;'),COLORFF00FF;
TS4:=TS3+0.03;
TS5:=TS4+0.03;
TS6:=TS5+0.03;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS4),'3.过顶起柱:过左峰起柱.常见过顶倍量;'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS5),'4.触底起柱:触前期谷底起柱.常见触底倍量.'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS6),'<二>.量柱的集合定性–组合量柱:'),COLORFF00FF;
TS7:=TS6+0.03;
TS8:=TS7+0.03;
TS9:=TS8+0.03;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS7),'1.低量柱+倍量柱:后市必大涨!'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS8),'2.倍量柱+倍量柱:主庄控盘良好,急于拉升!'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=158,AAA-(AAA*TS9),'3.缩倍柱+倍量柱:机会就在眼前!'),COLORFF00FF;
{============================}
BBB:=REFX(HHV(H,190),DATACOUNT-BARPOS);
TT1:=0+0.03;
TT2:=TT1+0.03;
TT3:=TT2+0.03;
DRAWTEXT(DATACOUNT-BARPOS+1=300,BBB-(BBB*TT1),'<三>.量柱的三日定性–时间转化原则:'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=300,BBB-(BBB*TT2),'1.后三日价升量缩:转化为黄金柱;'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=300,BBB-(BBB*TT3),'2.后三日量柱先阴后阳:该量柱官升一级;'),COLORFF00FF;
TT4:=TT3+0.03;
TT5:=TT4+0.03;
DRAWTEXT(DATACOUNT-BARPOS+1=300,BBB-(BBB*TT4),'3.后三日量柱阴阳相间:量柱退化,走势面临调整;'),COLORFF00FF;
DRAWTEXT(DATACOUNT-BARPOS+1=300,BBB-(BBB*TT5),'4.后三日量柱实体逐步缩小:力量将衰退,面临调整.'),COLORFF00FF;
{底部趋势拐点}
VVOL:=IF(ISLASTBARANDDATATYPE=6,VOL*240/OPENMINUTES(CURRENTTIME),VOL);
VOLUME:=VOL;
AAG:=VOL>=REF(V,1)*1.91ANDC>REF(C,1);
AA1G:=VOL<REF(LLV(VOL,21),1);
AA2G:=VOL<REF(LLV(VOL,55),1);
AA3G:=ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.05;
MAVOL5:=MA(VOLUME,M1);
MAVOL35:=MA(VOLUME,M2);
MAVOL135:=MA(VOLUME,M3);
VOLUME5:=MA(VOLUME,M1);
VOLUME35:=MA(VOLUME,M2);
VOLUME135:=MA(VOLUME,M3);
买入:=crOSS(VOLUME5,VOLUME135);
DRAWICON(买入,L,9);
买入1:=CROSS(VOLUME35,VOLUME135);
DRAWICON(买入1,L,5);
买入2:=CROSS(VOLUME5,VOLUME35);
DRAWICON(买入2,L,1);
{非常棒}
EMA13:=EMA(C,13),COLORWHITE;
EMA21:=EMA(C,21),COLORYELLOW;
EMA34:=EMA(C,34),COLORFF00FF;
EMA60:=MA(C,60),COLORFFCC66;
VAR2:=(2*CLOSE+HIGH+LOW)/4;
VAR3:=IF(YEAR>=2099ANDMONTH>2,0,1);
VAR4:=LLV(LOW,5);VAR5:=HHV(HIGH,4);
散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;
DRAWTEXT(CROSS(散户,庄家)AND散户<30,L-0.05,'←低吸'),COLORLIRED;
DRAWTEXT(CROSS(庄家,散户)AND散户>70,H+0.05,'←高抛'),COLORGREEN;
DRAWICON(CROSS(散户,庄家)AND散户<30,L-0.05,1);
DRAWICON(CROSS(庄家,散户)AND散户>70,H+0.05,2);
VAR9:=CLOSE-REF(CLOSE,5);
VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);
VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);
卖出:=IF(VARA>0ANDCROSS(VARC,VARA),90,100);
DRAWICON(卖出<0,H+0.05,2);
买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
B1:IF(CROSS(买线,卖线),L-0.02,0),LINETHICK,COLORMAGENTA;
PARTLINE(CROSS(买线,卖线),L-0.02),CROSSDOT,LINETHICK3,COLORMAGENTA;
S1:IF(CROSS(80,"rsi")*30,H+0.02,0),LINETHICK,COLORYELLOW;
PARTLINE(CROSS(80,"RSI")*30,H+0.02),CROSSDOT,LINETHICK3,COLORYELLOW;
VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;
S2:IF(VC>20ANDFILTER(VC<REF(VC,1),5),H+0.02,0),LINETHICK,COLORGREEN;
PARTLINE(VC>20ANDFILTER(VC<REF(VC,1),5),H+0.02),CIRCLEDOT,LINETHICK3,COLORGREEN;
A0:=(L+H+C*2)/4;
A1B:EMA(A0,14),COLORBLUE,LINETHICK2;
A2B:=EMA(A0,25),COLORC0C000,LINETHICK2;
A1X:=(A1B-REF(A1B,1))/REF(A1B,1)*100;
A2X:=(A2B-REF(A2B,1))/REF(A2B,1)*100;
看多:IF(A1X>=0ANDBARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),0),COLORMAGENTA,LINETHICK;
PARTLINE(A1X>=0ANDBARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0)))),COLORMAGENTA,LINETHICK1;
逃顶:IF(A1X<0ANDBARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),0),COLORCYAN,LINETHICK;
PARTLINE(A1X<0ANDBARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X)))),COLORCYAN,LINETHICK1;
买入持股:IF(A1X>=0,A1B,0),COLORRED,LINETHICK;
PARTLINE(A1X>=0,A1B),COLORRED,LINETHICK3;
卖出空仓:IF(A1X<0ANDA2X<0,A1B,0),COLORGREEN,LINETHICK;
PARTLINE(A1X<0ANDA2X<0,A1B),COLORGREEN,LINETHICK3;
{STICKLINE(CROSS(A1X,0),H,L,0,0),COLOR9933FF;
STICKLINE(CROSS(A1X,0),C,O,3,0),COLOR0000CC;
STICKLINE(CROSS(A1X,0),C,O,1,0),COLOR0033FF;
STICKLINE(CROSS(0,A1X),L,H,0,0),COLOR66CC33;};
{立体K线}
STICKLINE(CLOSE>OPEN,H,LOW,0.3,0),COLOR9933FF;
STICKLINE(OPEN>=CLOSE,L,HIGH,0.3,0),COLOR66CC33;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLOR009900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2,0),COLOR00CC00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),COLOR33FF00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1,0),COLOR66FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0),COLOR0033FF;
{修正价格}
重心:=(C+0.618*REF(C,1)+0.382*REF(C,2)+0.236*REF(C,3)+0.146*REF(C,4))/2.382,COLORYELLOW,LINETHICK1;
GAO:=HHV(C,60)-LLV(C,60);
RSI:=SMA(MAX(重心-REF(重心,1),0),5,1)/SMA(ABS(重心-REF(重心,1)),5,1);
指导线:重心+GAO*(RSI-0.5),COLORMAGENTA,LINETHICK1;
STICKLINE(CROSS(RSI,0.1),指导线,REF(指导线,1),1,0),COLORYELLOW;
STICKLINE(CROSS(0.9,RSI),指导线,REF(指导线,1),1,0),COLORCYAN;
{趋势}
平衡:=EMA(((SLOPE(CLOSE,22)*20)+CLOSE),55);
红升:IF(重心>=平衡,平衡,DRAWNULL),COLORRED,LINETHICK2;
蓝降:IF(重心<平衡,平衡,DRAWNULL),COLORBLUE,LINETHICK2;
导航家分析系统:CLOSE;
重心:(C+0.618*REF(C,1)+0.382*REF(C,2)+0.236*REF(C,3)+0.146*REF(C,4))/2.382,COLORYELLOW,LINETHICK1;
GAO:=HHV(C,60)-LLV(C,60);
RSI:=SMA(MAX(重心-REF(重心,1),0),5,1)/SMA(ABS(重心-REF(重心,1)),5,1);
{趋势}
平衡:=EMA(((SLOPE(CLOSE,22)*20)+CLOSE),55);
红升:IF(重心>=平衡,平衡,DRAWNULL),COLORRED,LINETHICK2;
绿降:IF(重心<平衡,平衡,DRAWNULL),COLORGREEN,LINETHICK2;
IF(重心>REF(重心,1),重心,DRAWNULL),COLORRED,LINETHICK2;
IF(重心<REF(重心,1),重心,DRAWNULL),COLORGREEN,LINETHICK2;
真阴线:=C<REF(C,1)ANDC<=O;
假阳线:=C<REF(C,1)ANDC>=O;
阴线:=真阴线>0OR假阳线>0;
阴线天数:=BArslAst(阴线);
阴线实体最高价:=maX(REF(C,阴线天数),REF(O,阴线天数));
阴线成交量:=REF(V,阴线天数);
阳胜条件:=阴线天数>0ANDC>=阴线实体最高价ANDV>=阴线成交量;
阳胜:=IF(阳胜条件>0ANDREF(阳胜条件,1)=0,1,0);
黄金阳胜:=C>REF(C,1)ANDV>=REF(V*1.9,1)ANDV<=REF(V*3,1);
{黄金柱:按后3天收盘价不低于基柱收盘价,或平均价不低于基柱收盘价}
HJJ1:=C<REFX(C,3)ANDC<REFX(C,2)ANDC<REFX(C,1);
HJJ2:=C<REFX(MA(C,3),3);
黄金价:=HJJ1ORHJJ2;
{黄金柱:1,后3日平均量小于基柱的量,2,或者成交量连续3天一天比一天小(下台阶)并且后
3日平均量小于基柱的量}
HJL1:=V>REFX(MA(V,3),3);
HJL2:=REFX(V,1)>REFX(V,2)ANDREFX(V,2)>REFX(V,3)ANDV>REFX(MA(V,3),1);
黄金量:=HJL1ORHJL2;
{黄金柱的升幅:(3日平均价-基柱的收盘)/基柱的收盘价*100%>(3日平
均量-基柱成交量/基柱成交量*100%的1.01倍以上}
黄金升幅:=(MA(C,3)-REF(C,3))/REF(C,3)*100>=(MA(V,3)-REF(V,3))/REF(V,3)*100*1.01;
黄金柱:={黄金升幅AND}黄金量AND黄金价AND(阳胜OR黄金阳胜);
合力黄金柱:=黄金柱ANDCOUNT(黄金柱,4)>=2ANDCOUNT(黄金柱,20)<=2;
JLHJZ1:=黄金柱ANDCOUNT(合力黄金柱,4)=1ANDCOUNT(黄金柱,20)>=3;
JLHJZ2:=黄金柱ANDO>=REF(C,REF(BARSLAST(黄金柱),1)+1)ANDO<=REF(C*1.02,REF(BARSLAST(黄金柱),1)+1)ANDREF(BARSLAST(黄金柱),1)+1>=4ANDREF(BARSLAST(黄金柱),1)+1<=20;
接力黄金柱:=JLHJZ1ORJLHJZ2;
XG:接力黄金柱;
[源码注释]通达信公式动态翻译结果
月K赋值:"KDJ的K[取月线数据]"(9,3,3)
月D赋值:"KDJ的D[取月线数据]"(9,3,3)
输出月金叉:月K上穿月D AND (月D<40 OR 月D>60)
评论(0)