通达信公式源码概况:

指标类别:通达信公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

最后一次高点与趋势线距离较远,要等回抽后操作

趋势线的有效突破

①时间上,常用的方法是”两天原则”,即市场连续两天的收盘价都穿越了趋势线,否则便有可能出现假突破

②空间上,常用的方法是”5%”的原则,也就是市场对趋势线的突破必须达到5%的幅度,否则视为假突破而不予确认.

趋势线的应用调整

1)45度倾斜角度的趋势线最有价值.这种角度的趋势线反映出市场随着时间运动的速率,正好处于价格和时间的完善平衡之中.

2)趋势线的倾斜角度过大,通常表明市场上升或下降的速度过快,市场要想一直保有这样的运动速度是不大可能的.如果描述这种暴涨或暴跌的趋势线被击穿了,并不能认为市场的既有趋势被破坏了,它只能意味着市场会放缓原有的激烈运动,并回到可能让多空力量处于暂时平衡的45度线附近.

3)如果趋势线过于平缓,即倾斜角度过小,则说明市场的价格运动过于衰弱,难以准确描述市场运动的丰富变化,可靠程度不高.

image.png

公式源码如下:

  

C2:=REF(C,1);  

涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);  

stICKLINE(涨停,OPEN,CLOSE,-1,0),COLORYELLOW;  

STICKLINE(涨停,H,L,0,0),COLORYELLOW;  

跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);  

STICKLINE(跌停,OPEN,CLOSE,-1,0),COLORBLUE;  

STICKLINE(跌停,H,L,0,1),COLORBLUE;  

大阳线:=IF((C-C2)*100/C2>=5,1,0)&amp;&amp;IF((C-C2)*100/C2<(10-0.01*100/C2),1,0)ORIF((C-O)*100/O>=5,1,0)&amp;&amp;IF((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)&amp;&amp;IF((C2-C)*100/C2<(10-0.01*100/C2),1,0)ORIF((O-C)*100/O>=5,1,0)&amp;&amp;IF((C2-C)*100/C2<(10-0.01*100/C2),1,0);  

STICKLINE(大阴线,OPEN,CLOSE,-1,0),COLORGREEN;  

STICKLINE(大阴线,H,L,0,1),COLORGREEN;  

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,CIRCLEDOT;  

前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,CIRCLEDOT;  

{黄金柱}  

JJ:=(3*C+H+L+O)/6;  

VAR1:=(8*JJ+7*REF(JJ,1)+6*REF(JJ,2)+5*REF(JJ,3)+4*REF(JJ,4)+3*REF(JJ,5)+2*REF(JJ,6)+REF(JJ,8))/36;  

TJ1:=vol=HHV(VOL,10)ANDVOL>2*REF(VOL,1)ANDCLOSE>VAR1ANDC>REF(C,1);  

LJL:=FILTER(TJ1,5);  

TJ2:=IF(BARSLAST(LJL)=1ANDCLOSE>REF(HIGH,1),1,IF(BARSLAST(LJL)=2ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(LJL)=3ANDCLOSE>REF(HIGH,3),1,0)));  

TP:=TJ2=1;  

STICKLINE(CLOSE,REF(LOW,BARSLAST(LJL)),REF(LOW,BARSLAST(LJL)),6,0),COLORYELLOW;  

TJ3:=IF(BARSLAST(LJL)=1ANDCLOSE>REF(LOW,1),1,IF(BARSLAST(LJL)=2ANDCLOSE>REF(LOW,2),1,IF(BARSLAST(LJL)=3ANDCLOSE>REF(LOW,3),1,0)));  

STFZ:=TJ3=1;  

CL:=STFZANDTP;  

TJCL:=FILTER(CL,3);  

DRAWTEXT(LJL,L*0.99,'黄'),COLORYELLOW;  

DRAWTEXT(LJL,L*0.95,'金'),COLORYELLOW;  

DRAWTEXT(LJL,L*0.90,'柱'),COLORYELLOW;  

{涨停跟踪}  

ZT:=C/REF(C,1)>1.097;  

XH:=FILTER(ZT,13);  

BH:=BARSLAST(ZT);  

CZ:=REF(H,BH)-REF(L,BH);  

STICKLINE(C,(REF(L,BH)+CZ*0.5),(REF(L,BH)+CZ*0.5),7,0),COLORRED;  

STICKLINE(C,REF(L,BH),REF(L,BH),7,0),COLORBLUE;  

DRAWTEXT(ZT,L*0.98,'涨停'),COLORF00FF0;  

VARZT:=BARSLAST(C/REF(C,1)>1.097);  

STICKLINE(VARZT=2,L*0.97,L*0.98,8,0),COLOR0000FF;  

DRAWTEXT(VARZT=2,L*0.95,'3天'),COLORYELLOW;  

STICKLINE(VARZT=4,H*1.03,H*1.02,8,0),COLOR9966FF;  

DRAWTEXT(VARZT=4,H*1.06,'5天'),COLORYELLOW;  

STICKLINE(VARZT=7,L*0.97,L*0.98,8,0),COLOR00FFFF;  

DRAWTEXT(VARZT=7,L*0.95,'8天'),COLORYELLOW;  

STICKLINE(VARZT=12,H*1.03,H*1.02,8,0),COLORFF33FF;  

DRAWTEXT(VARZT=12,H*1.06,'13天'),COLORYELLOW;  

STICKLINE(VARZT=20,L*0.97,L*0.98,8,0),COLOR0066FF;  

DRAWTEXT(VARZT=20,L*0.95,'21天'),COLORYELLOW;  

STICKLINE(VARZT=33,H*1.03,H*1.02,8,0),COLOR9932CD;  

DRAWTEXT(VARZT=33,H*1.06,'34天'),COLORYELLOW;  

STICKLINE(VARZT=54,L*0.97,L*0.98,8,0),COLOR006600;  

DRAWTEXT(VARZT=54,L*0.95,'55天'),COLORYELLOW;  

STICKLINE(VARZT=88,H*1.03,H*1.02,8,0),COLOR00FF00;  

DRAWTEXT(VARZT=88,H*1.06,'89天'),COLORYELLOW;  

STICKLINE(VARZT=143,L*0.97,L*0.98,8,0),COLORCCFFFF;  

DRAWTEXT(VARZT=143,L*0.95,'144天'),COLORYELLOW;  

STICKLINE(VARZT=232,H*1.03,H*1.02,8,0),COLORFF0033;  

DRAWTEXT(VARZT=232,H*1.06,'233天'),COLORYELLOW;  

STICKLINE(VARZT=376,L*0.97,L*0.98,8,0),COLORFF9966;  

DRAWTEXT(VARZT=376,L*0.95,'377天'),COLORYELLOW;  

Var3:=VOL/CAPITAL*100;  

Var4:=CLOSE/OPEN;  

短期兵力:EMA(Var3*Var4,9)*44.545*0.999,colorred;  

中期兵力:EMA(Var3*Var4,33)*44.545*0.999,COLORwhite;  

长期兵力:EMA(Var3*Var4,61)*44.545*0.999,coloryellow;;  

预备兵力:EMA(Var3*Var4,120)*44.545*0.888,COLOR00ff00;  

Var5:=EMA(100*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,33)),20);  

Var6:=EMA(Var5,1);  

Var7:=VOL/CAPITAL*100;  

Var8:=SUM(Var7,5)&gt;=3;  

Var9:=Var8/REF(Var7,10)&gt;=2;  

VarA:=HHV(CLOSE,5);  

VarB:=VarA/REF(CLOSE,5)&gt;=1.01;  

VarC:=Var6&gt;20;  

VarD:=HIGH/REF(LOW,20)&lt;1.2;  

VarE:=WINNER(CLOSE)*100;  

VarF:=Var8ANDVarCANDVar9ANDVar3ANDVarB;  

Var10:=FILTER(VarF,20);  

DRAWTEXT(Var10,3.82*中期兵力,'★资金活动'),coloryellow;  

STICKLINE(短期兵力&gt;长期兵力,预备兵力,短期兵力,1.5,0),colorred;  

STICKLINE(短期兵力&lt;中期兵力,预备兵力,中期兵力,1.5,0),colorLIME;  

STICKLINE(短期兵力&lt;预备兵力,预备兵力,短期兵力,1.5,0),colorLIME;  

VAR1:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*200-100)/2;  

VAR2:=SMA(SMA(VAR1,3,1),3,1);  

跟风盘:MA(EMA(VAR2,3),3);  

股价趋势:3*VAR2-2*跟风盘;  

VAR3:=EMA(CLOSE,13)-EMA(CLOSE,26)*100;  

VAR4:=EMA(VAR3,3);  

多头能量:3*(VAR4-VAR3);  

空头能量:2*跟风盘-3*VAR2;  

STICKLINE(空头能量&gt;0,空头能量,0,0,0);  

STICKLINE(空头能量&lt;0,空头能量,0,0,0);  

input:N1(14,1,100);  

LC:=REF(C,1);  

rsi:SMA(MAX(C-LC,0),N1,1)/SMA(ABS(C-LC),N1,1)*100,ColorFF00FF;  

QS:HHV(MA(RSI,3),13),Color00ADFF;  

RS:llV(MA(RSI,3),13),ColorFF8000;  

Var1:=BACKSET(REF(QS,2)=HHV(QS,5),3);  

Var2:=CROSS(Var1,0.9);  

Var3:=BACKSET(REF(RS,2)=LLV(RS,5),3);  

Var4:=CROSS(Var3,0.9);  

压力:REF(QS,BARSLAST(Var2)),POINTDOT,ColorEA91B5;  

STICKLINE(rsi,REF(QS,BARSLAST(Var2)),REF(QS,BARSLAST(Var2)),5,0),Color00ff00{EA91B5};  

支撑:REF(RS,BARSLAST(Var4)),POINTDOT,Color0087FF;  

STICKLINE(rsi,REF(RS,BARSLAST(Var4)),REF(RS,BARSLAST(Var4)),5,0),Color0087FF;  

DRAWBAND(ma(CLOSE,60),RGB(80,0,0),MA(CLOSE,120),RGB(0,91,0));  

DRAWBAND(MA(CLOSE,5),RGB(155,50,50),MA(CLOSE,10),RGB(83,123,68));  

DRAWKLINE(H,O,L,C);  

MA5:=MA(CLOSE,5),COLORWHITE;  

MA10:=MA(CLOSE,10),COLORYELLOW;  

MA30:=MA(CLOSE,30),COLORMAGENTA;  

MA60:=MA(CLOSE,60),COLORGREEN;  

MA120:=MA(CLOSE,120),COLORLIMAGENTA;  

MA240:=MA(CLOSE,240),COLORBLUE,NODRAW;  

vol5:=MA(VOL,5),COLORWHITE;  

VOL10:=MA(VOL,10),COLORYELLOW;  

VOL40:=MA(VOL,40),COLORFF00FF;  

量托:=VOL5>=VOL40ANDcrOSS(VOL10,VOL40)ANDREF(VOL10,1)<REF(VOL40,1);  

DRAWTEXT(量托,L-0.012,'量托'),COLORWHITE;  

AA1:=BArslAst(MA60>MA30AND(MA30=MA10ORMA30>MA10));  

BB1:=REF(COUNT(C<MA60,AA1)=AA1,1);  

CC1:=CROSS(C,MA60)ANDVOL>MA(VOL,5)AND(C-REF(C,1))/REF(C,1)*100>3;  

芙蓉出水:=BB1ANDCC1,COLOR00FF00;  

DRAWTEXT(芙蓉出水,H+0.3,'芙蓉出水'),COLORFF00FF;  

STICKLINE(芙蓉出水,H,L,1,1),COLORFF00FF;  

STICKLINE(芙蓉出水,O,C,3,1),LINETHICK2,COLORFF00FF;  

MA1:=MA(CLOSE,5);  

MA2:=MA(CLOSE,10);  

MA3:=MA(CLOSE,20);  

ZJ:=AMOUNT/10000;{资金}  

TM:=V-MA(V,10);{量填满}  

一穿三:=MA1>OANDMA2>OANDMA3>OANDMA1<CANDMA2<CANDMA3<CANDCLOSE>OPEN;  

DRAWTEXT(一穿三,L-0.012,'一穿三'),COLORFF00FF;  

STICKLINE(一穿三,OPEN,CLOSE,1,0),COLORFF00FF;  

TY:=C;  

A1:=REF(TY,10)=HHV(TY,2*10+1);B1:=FILTER(A1,10);C1:=BacKSET(B1,10+1);HD:=FILTER(C1,10);  

A2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10);  

前期高位:REF(C,BARSLAST(HD)),COLORBLUE,POINTDOT;  

STICKLINE(C,前期高位,前期高位,8,0),COLORBLUE;  

{高点:=(C/REF(C,BARSLAST(HD))-1)*100,NODRAW;  

STICKLINE((HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667,H,C,0.8,0),COLORBLUE;}  

三日不破:=MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(L,3);  

三日量缩:=(MAX(MAX(V,REF(V,1)),REF(V,2))<REF(V,3));  

三日价涨A:=C>=REF(C,1);  

三日价涨B:=C<REF(C,1);  

三日价涨C:=MIN(MIN(C,REF(C,1)),REF(C,2))>=REF(L,3);  

TIM:=IF(DATE<1140214,1,0);  

缩倍柱:=(VOL*1.95<=REF(VOL,1))*TIM;  

百日低量:=(VOL=LLV(VOL,100))*TIM;  

倍量柱:=C>REF(C,1)*1.04AND(VOL>=1.9*REF(VOL,1))*TIM;  

四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4))*TIM;  

四日前高量柱:=(REF(VOL,3)>=REF(VOL,4)ANDREF(VOL,3)<1.9*REF(VOL,4)AND三日量缩)*TIM;  

前三引用不成立:=COUNT(REF(四日前倍量柱,1)AND(REF(三日不破,1)ORREF(三日价涨C,1)),3)=0ANDCOUNT(REF(四日前高量柱,1)AND(REF(三日不破,1)ORREF(三日价涨C,1)),3)=0;  

倍量黄金柱:=四日前倍量柱AND三日量缩AND三日不破AND三日价涨AAND前三引用不成立;  

高量黄金柱:=四日前高量柱AND三日量缩AND三日不破AND三日价涨AAND前三引用不成立;  

黄金柱:=倍量黄金柱OR高量黄金柱;  

次倍量黄金柱:=NOT(黄金柱)AND四日前倍量柱AND三日量缩AND三日不破AND三日价涨BAND前三引用不成立;  

次高量黄金柱:=NOT(黄金柱)AND四日前高量柱AND三日量缩AND三日不破AND三日价涨BAND前三引用不成立;  

次黄金柱:=次倍量黄金柱OR次高量黄金柱;  

准倍量黄金柱:=NOT(黄金柱OR次黄金柱)AND四日前倍量柱AND((三日量缩AND三日价涨C)OR(COUNT(倍量柱,3)>=1AND三日不破))AND前三引用不成立;  

准高量黄金柱:=NOT(黄金柱OR次黄金柱)AND四日前高量柱AND(三日量缩AND三日价涨C)AND前三引用不成立;  

准黄金柱:=准倍量黄金柱OR准高量黄金柱;  

倍量将军柱:=NOT(黄金柱OR次黄金柱OR准黄金柱)AND四日前倍量柱AND三日不破AND三日价涨AAND前三引用不成立;  

高量将军柱:=NOT(黄金柱OR次黄金柱OR准黄金柱)AND四日前高量柱AND三日不破AND三日价涨AAND前三引用不成立;  

将军柱:=倍量将军柱OR高量将军柱;  

次倍量将军柱:=NOT(黄金柱OR次黄金柱OR准黄金柱OR将军柱)AND四日前倍量柱AND三日不破AND三日价涨BAND前三引用不成立;  

次高量将军柱:=NOT(黄金柱OR次黄金柱OR准黄金柱OR将军柱)AND四日前高量柱AND三日不破AND三日价涨BAND前三引用不成立;  

次将军柱:=次倍量将军柱OR次高量将军柱;  

准倍量将军柱:=NOT(黄金柱OR次黄金柱OR准黄金柱OR将军柱OR次将军柱)AND四日前倍量柱AND三日价涨CAND前三引用不成立;  

准高量将军柱:=NOT(黄金柱OR次黄金柱OR准黄金柱OR将军柱OR次将军柱)AND四日前高量柱AND三日价涨CAND前三引用不成立;  

准将军柱:=准倍量将军柱OR准高量将军柱;  

BACKSET100:=BACKSET(黄金柱OR次黄金柱OR准黄金柱OR将军柱OR次将军柱OR准将军柱,4);  

FILTER100:=FILTER(BACKSET100,3),NODRAW;  

BACKSET101:=BACKSET(黄金柱,4);  

FILTER101:=FILTER(BACKSET101,3);  

BACKSET102:=BACKSET(次黄金柱,4);  

FILTER102:=FILTER(BACKSET102,3);  

BACKSET103:=BACKSET(准黄金柱,4);  

FILTER103:=FILTER(BACKSET103,3);  

BACKSET104:=BACKSET(将军柱,4);  

FILTER104:=FILTER(BACKSET104,3);  

BACKSET105:=BACKSET(次将军柱,4);  

FILTER105:=FILTER(BACKSET105,3);  

BACKSET106:=BACKSET(准将军柱,4);  

FILTER106:=FILTER(BACKSET106,3);  

黄金线下影线:=REF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))<=REF(L,3);  

黄金线实体下端:=REF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))<=MIN(REF(C,3),REF(O,3))ANDMIN(MIN(L,REF(L,1)),REF(L,2))>REF(L,3),LINETHICK0;  

黄金线上影线:=REF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))>=REF(H,3);  

黄金线实体上端:=REF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))>=MAX(REF(C,3),REF(O,3))ANDREF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))<REF(H,3);  

黄金线实体中间:=REF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3))ANDREF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3));  

黄金线实体中间1:=REF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3))ANDREF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3))ANDREF(L,2)=MIN(MIN(L,REF(L,1)),REF(L,2));  

黄金线实体中间2:=REF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3))ANDREF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3))ANDREF(L,1)=MIN(MIN(L,REF(L,1)),REF(L,2));  

黄金线实体中间3:=REF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3))ANDREF(FILTER100,3)=1ANDMIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3))ANDL=MIN(MIN(L,REF(L,1)),REF(L,2));  

{简睿时空法则}  

斜率:=角度调节/IF(C&lt;300,1000,10);{角度调节以便把握趋势}  

最低:=TROUGHBARS(L,之字幅度,1);{调整之字幅度找到低位起点110054}  

高价L:=CONST(HHV(H,最低))*1.05;  

低价:DRAWLINE(最低=0,L,ISLASTBAR,REF(L,BARSLAST(最低=0)),0);  

上分6:=IF(低价+3.618*低价&gt;=低价,低价+3.618*低价,DRAWNULL);  

上分5:=IF(低价+2.382*低价&gt;=低价,低价+2.382*低价,DRAWNULL);  

上分4:=IF(低价+1.618*低价&gt;=低价,低价+1.618*低价,DRAWNULL);  

上分3:=IF(低价+1*低价&gt;=低价,低价+1*低价,DRAWNULL);  

上分2:=IF(低价+0.618*低价&gt;=低价,低价+0.618*低价,DRAWNULL);  

上分1:=IF(低价+0.382*低价&gt;=低价,低价+0.382*低价,DRAWNULL);  

上分0:=IF(低价+0.192*低价&gt;=低价,低价+0.192*低价,DRAWNULL);  

上斜线:=IF(低价+CONST(斜率*3.618)*最低&lt;=上分6,低价+CONST(斜率*3.618)*最低,DRAWNULL);  

上斜线0:=IF(低价+CONST(斜率*1.618)*最低&lt;=上分6,低价+CONST(斜率*1.618)*最低,DRAWNULL);  

上斜线1:=IF(低价+CONST(斜率*1.000)*最低&lt;=上分6,低价+CONST(斜率*1.000)*最低,DRAWNULL);  

上斜线2:=IF(低价+CONST(斜率*0.750)*最低&lt;=上分6,低价+CONST(斜率*0.750)*最低,DRAWNULL);  

上斜线3:=IF(低价+CONST(斜率*0.618)*最低&lt;=上分6,低价+CONST(斜率*0.618)*最低,DRAWNULL);  

上斜线4:=IF(低价+CONST(斜率*0.50)*最低&lt;=上分6,低价+CONST(斜率*0.50)*最低,DRAWNULL);  

上斜线5:=IF(低价+CONST(斜率*0.382)*最低&lt;=上分6,低价+CONST(斜率*0.382)*最低,DRAWNULL);  

上斜线6:=IF(低价+CONST(斜率*0.250)*最低&lt;=上分6,低价+CONST(斜率*0.250)*最低,DRAWNULL);  

上斜线7:=IF(低价+CONST(斜率*0.156)*最低&lt;=上分6,低价+CONST(斜率*0.156)*最低,DRAWNULL);  

上斜线8:=IF(低价+CONST(斜率*0.092)*最低&lt;=上分6,低价+CONST(斜率*0.092)*最低,DRAWNULL);  

上斜线9:=IF(低价+CONST(斜率*0.055)*最低&lt;=上分6,低价+CONST(斜率*0.055)*最低,DRAWNULL);  

上斜线10:=IF(低价+CONST(斜率*0.033)*最低&lt;=上分6,低价+CONST(斜率*0.033)*最低,DRAWNULL);  

STICKLINE(CROSS(上斜线,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线0,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线1,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线2,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线3,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线4,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线5,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线6,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线7,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线8,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线9,上分4),高价L,低价,1,0);  

STICKLINE(CROSS(上斜线10,上分4),高价L,低价,1,0);  

上分线6:IF(上分6&lt;=高价L,上分6,DRAWNULL),LINETHICK2;  

上分线5:IF(上分5&lt;=高价L,上分5,DRAWNULL),LINETHICK2;  

上分线4:IF(上分4&lt;=高价L,上分4,DRAWNULL),LINETHICK2;  

上分线3:IF(上分3&lt;=高价L,上分3,DRAWNULL),LINETHICK2;  

上分线2:IF(上分2&lt;=高价L,上分2,DRAWNULL),LINETHICK2;  

上分线1:IF(上分1&lt;=高价L,上分1,DRAWNULL),LINETHICK2;  

上分线0:IF(上分0&lt;=高价L,上分0,DRAWNULL),LINETHICK2;  

上线10:IF(上斜线10&lt;=高价L,上斜线10,DRAWNULL);  

上线9:IF(上斜线9&lt;=高价L,上斜线9,DRAWNULL);  

上线8:IF(上斜线8&lt;=高价L,上斜线8,DRAWNULL);  

上线7:IF(上斜线7&lt;=高价L,上斜线7,DRAWNULL);  

上线6:IF(上斜线6&lt;=高价L,上斜线6,DRAWNULL);  

上线5:IF(上斜线5&lt;=高价L,上斜线5,DRAWNULL);  

上线4:IF(上斜线4&lt;=高价L,上斜线4,DRAWNULL);  

上线3:IF(上斜线3&lt;=高价L,上斜线3,DRAWNULL);  

上线2:IF(上斜线2&lt;=高价L,上斜线2,DRAWNULL);  

上线1:IF(上斜线1&lt;=高价L,上斜线1,DRAWNULL);  

上线0:IF(上斜线0&lt;=高价L,上斜线0,DRAWNULL);  

上线:IF(上斜线&lt;=高价L,上斜线,DRAWNULL);  

DRAWKLINE(HIGH,OPEN,LOW,CLOSE);  

BACKSET201:=BACKSET(黄金线下影线,4);  

FILTER201:=FILTER(BACKSET201,3),NODRAW;  

BACKSET202:=BACKSET(黄金线实体下端,4);  

FILTER202:=FILTER(BACKSET202,3),NODRAW;  

BACKSET203:=BACKSET(黄金线上影线,4);  

FILTER203:=FILTER(BACKSET203,3),NODRAW;  

BACKSET204:=BACKSET(黄金线实体上端,4);  

FILTER204:=FILTER(BACKSET204,3),NODRAW;  

BACKSET205:=BACKSET(黄金线实体中间,4);  

FILTER205:=FILTER(BACKSET205,3),NODRAW;  

BACKSET2051:=BACKSET(黄金线实体中间1,4);  

FILTER2051:=FILTER(BACKSET2051,3),NODRAW;  

BACKSET2052:=BACKSET(黄金线实体中间2,4);  

FILTER2052:=FILTER(BACKSET2052,3),NODRAW;  

BACKSET2053:=BACKSET(黄金线实体中间3,4);  

FILTER2053:=FILTER(BACKSET2053,3),NODRAW;  

BT201:=IF(BARSLAST(FILTER201)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST(FILTER201));  

BT202:=IF(BARSLAST(FILTER202)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST(FILTER202));  

BT203:=IF(BARSLAST(FILTER203)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST(FILTER203));  

BT204:=IF(BARSLAST(FILTER204)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST(FILTER204));  

BT205:=IF(BARSLAST(FILTER205)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST(FILTER205));  

BT2051:=IF(BARSLAST(FILTER2051)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST(FILTER2051));  

BT2052:=IF(BARSLAST(FILTER2052)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST(FILTER2052));  

BT2053:=IF(BARSLAST(FILTER2053)=DRAWNULL,BARSCOUNT(CLOSE),BARSLAST(FILTER2053));  

最近黄金线:=MIN(MIN(MIN(MIN(MIN(MIN(BT201,BT202),BT203),BT204),BT2051),BT2052),BT2053);  

DAY1:=SUMBARS(FILTER100,1),NODRAW;  

HJX1_1:=IF(SUMBARS(FILTER201,1)=DAY1,IF(DAY1=1,LOW,REF(LOW,DAY1-1)),0),NODRAW;  

HJX1_2:=IF(SUMBARS(FILTER202,1)=DAY1,IF(DAY1=1,MIN(C,O),MIN(REF(C,DAY1-1),REF(OPEN,DAY1-1))),0),NODRAW;  

HJX1_3:=IF(SUMBARS(FILTER203,1)=DAY1,IF(DAY1=1,HIGH,REF(HIGH,DAY1-1)),0),NODRAW;  

HJX1_4:=IF(SUMBARS(FILTER204,1)=DAY1,IF(DAY1=1,MAX(C,O),MAX(REF(C,DAY1-1),REF(OPEN,DAY1-1))),0),NODRAW;  

HJX1_51:=IF(SUMBARS(FILTER2051,1)=DAY1,IF(DAY1=2,LOW,IF(DAY1<2,DRAWNULL,REF(LOW,DAY1-2))),0),NODRAW;  

HJX1_52:=IF(SUMBARS(FILTER2052,1)=DAY1,IF(DAY1=3,LOW,IF(DAY1<3,DRAWNULL,REF(LOW,DAY1-3))),0),NODRAW;  

HJX1_53:=IF(SUMBARS(FILTER2053,1)=DAY1,IF(DAY1=4,LOW,IF(DAY1<4,DRAWNULL,REF(LOW,DAY1-4))),0),NODRAW;  

黄金线:=HJX1_1+HJX1_2+HJX1_3+HJX1_4+HJX1_51+HJX1_52+HJX1_53,COLORYELLOW,NODRAW;  

立桩量:=VOL=HHV(VOL,40)ANDVOL>1.9*REF(VOL,1);  

立桩量三日突破:=IF(BARSLAST(立桩量)=1ANDCLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3ANDCLOSE>REF(HIGH,3),1,0)));  

立桩量三日不破:=BARSLAST(立桩量)=3ANDREF(LOW,3)<=MIN(MIN(C,REF(C,1)),REF(C,2));  

BACKSET300:=BACKSET(立桩量三日不破,4);  

BACKSET301:=BACKSET(立桩量三日突破,4);  

立桩量成立:=FILTER(BACKSET300,3)ANDBACKSET301AND立桩量;  

DRAWTEXT(立桩量成立,HIGH*1.01,'↙立桩量'),COLOR00FF00;  

DRAWTEXT(FILTER101,LOW*0.986,'↖黄金柱'),COLORYELLOW;  

STICKLINE(FILTER101,OPEN,CLOSE,0.5,0),COLORYELLOW;  

DRAWTEXT(FILTER102,LOW*0.986,'↖次黄金柱'),COLORYELLOW;  

DRAWTEXT(FILTER104,LOW*0.986,'↖将军柱'),COLORYELLOW;  

STICKLINE(FILTER104,OPEN,CLOSE,1.5,0),COLORYELLOW;  

K1:=SUMBARS(FILTER104,1);  

STICKLINE(K1,REF(L,K1-2),REF(L,K1-2),10,0),COLORYELLOW;  

K2:=SUMBARS(FILTER101,1);  

STICKLINE(K2,REF(L,K2-2),REF(L,K2-2),10,0),COLORYELLOW;  

强势5:MA(C,5),LINETHICK1;  

生命24:MA(C,24),COLORRED,LINETHICK1;  

DG1:=(CROSS(强势5,生命24));  

DRAWICON(DG1,生命24,1);  

X1:=(C+L+H)/3;  

BB5:=ATAN(EMA(X1,7)-REF(EMA(X1,7),1))*3.1416*10;  

EMA3:=EMA(C,3);  

DRAWTEXT(FILTER(BB5>1ANDEMA(X1,7)>REF(EMA(X1,7),1),10),  

LOW*0.99,'★∠45'),COLORFFFFFF;  

涨家数:INDEXADV,NODRAW,COLORLIMAGENTA;  

跌家数:INDEXDEC,NODRAW,COLORGREEN;  

C3:=REF(C,1);  

涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);  

STICKLINE(涨停,OPEN,CLOSE,2.5,0),COLORRED;  

跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);  

STICKLINE(跌停,OPEN,CLOSE,2.5,0),COLORGREEN;  

image.png

[源码注释]通达信公式动态翻译结果

AA赋值:成交量(手)/自由流通股本(股)*10000

输出XG:AA位于8和15之间

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。