通达信知行箱体主图指标公式

通达信实用的宝塔线指标公式

通达信知行箱体主图指标公式:

限时日:=1161120;

限时:=IF(DATE<限时日,1,DRAWNULL);

M10:=MA(C,10)*限时;{注意:在每个要输出的指标后面都加上*限时}

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

Y311:=IFF(CURRBARSCOUNT=1,(xma(VV,3)*3-MA(VV,2)+VV)/3,XMA(VV,3));

Y312:=IFF(CURRBARSCOUNT=1,(XMA(Y311,3)*3-MA(Y311,2)+Y311)/3,XMA(Y311,3));

Y313:=IFF(CURRBARSCOUNT=1,(XMA(Y312,3)*3-MA(Y312,2)+Y312)/3,XMA(Y312,3));

Y314:=IFF(CURRBARSCOUNT=1,(XMA(Y313,3)*3-MA(Y313,2)+Y313)/3,XMA(Y313,3));

Y315:=IFF(CURRBARSCOUNT=1,(XMA(Y314,3)*3-MA(Y314,2)+Y314)/3,XMA(Y314,3));

Y316:=IFF(CURRBARSCOUNT=1,(XMA(Y315,3)*3-MA(Y315,2)+Y315)/3,XMA(Y315,3));

Y317:=IFF(CURRBARSCOUNT=1,(XMA(Y316,3)*3-MA(Y316,2)+Y316)/3,XMA(Y316,3));

Y318:=IFF(CURRBARSCOUNT=1,(XMA(Y317,3)*3-MA(Y317,2)+Y317)/3,XMA(Y317,3));

Y319:=IFF(CURRBARSCOUNT=1,(XMA(Y318,3)*3-MA(Y318,2)+Y318)/3,XMA(Y318,3));

Y320:=IFF(CURRBARSCOUNT=1,(XMA(Y319,3)*3-MA(Y319,2)+Y319)/3,XMA(Y319,3));

Y321:=IFF(CURRBARSCOUNT=1,(XMA(Y320,3)*3-MA(Y320,2)+Y320)/3,XMA(Y320,3));

Y322:=IFF(CURRBARSCOUNT=1,(XMA(Y321,3)*3-MA(Y321,2)+Y321)/3,XMA(Y321,3));

Y323:=IFF(CURRBARSCOUNT=1,(XMA(Y322,3)*3-MA(Y322,2)+Y322)/3,XMA(Y322,3));

Y324:=IFF(CURRBARSCOUNT=1,(XMA(Y323,3)*3-MA(Y323,2)+Y323)/3,XMA(Y323,3));

Y325:=IFF(CURRBARSCOUNT=1,(XMA(Y324,3)*3-MA(Y324,2)+Y324)/3,XMA(Y324,3));

Y326:=IFF(CURRBARSCOUNT=1,(XMA(Y325,3)*3-MA(Y325,2)+Y325)/3,XMA(Y325,3));

Y327:=IFF(CURRBARSCOUNT=1,(XMA(Y326,3)*3-MA(Y326,2)+Y326)/3,XMA(Y326,3));

Y328:=IFF(CURRBARSCOUNT=1,(XMA(Y327,3)*3-MA(Y327,2)+Y327)/3,XMA(Y327,3));

Y329:=IFF(CURRBARSCOUNT=1,(XMA(Y328,3)*3-MA(Y328,2)+Y328)/3,XMA(Y328,3));

Y330:=IFF(CURRBARSCOUNT=1,(XMA(Y329,3)*3-MA(Y329,2)+Y329)/3,XMA(Y329,3));

Y331:=IFF(CURRBARSCOUNT=1,(XMA(Y330,3)*3-MA(Y330,2)+Y330)/3,XMA(Y330,3));

Y332:=IFF(CURRBARSCOUNT=1,(XMA(Y331,3)*3-MA(Y331,2)+Y331)/3,XMA(Y331,3));

Y333:=IFF(CURRBARSCOUNT=1,(XMA(Y332,3)*3-MA(Y332,2)+Y332)/3,XMA(Y332,3));

Y334:=IFF(CURRBARSCOUNT=1,(XMA(Y333,3)*3-MA(Y333,2)+Y333)/3,XMA(Y333,3));

Y335:=IFF(CURRBARSCOUNT=1,(XMA(Y334,3)*3-MA(Y334,2)+Y334)/3,XMA(Y334,3));

Y336:=IFF(CURRBARSCOUNT=1,(XMA(Y335,3)*3-MA(Y335,2)+Y335)/3,XMA(Y335,3));

Y337:=IFF(CURRBARSCOUNT=1,(XMA(Y336,3)*3-MA(Y336,2)+Y336)/3,XMA(Y336,3));

Y338:=IFF(CURRBARSCOUNT=1,(XMA(Y337,3)*3-MA(Y337,2)+Y337)/3,XMA(Y337,3));

Y339:=IFF(CURRBARSCOUNT=1,(XMA(Y338,3)*3-MA(Y338,2)+Y338)/3,XMA(Y338,3));

Y340:=IFF(CURRBARSCOUNT=1,(XMA(Y339,3)*3-MA(Y339,2)+Y339)/3,XMA(Y339,3));

Y341:=IFF(CURRBARSCOUNT=1,(XMA(Y340,3)*3-MA(Y340,2)+Y340)/3,XMA(Y340,3));

Y342:=IFF(CURRBARSCOUNT=1,(XMA(Y341,3)*3-MA(Y341,2)+Y341)/3,XMA(Y341,3));

Y343:=IFF(CURRBARSCOUNT=1,(XMA(Y342,3)*3-MA(Y342,2)+Y342)/3,XMA(Y342,3));

Y344:=IFF(CURRBARSCOUNT=1,(XMA(Y343,3)*3-MA(Y343,2)+Y343)/3,XMA(Y343,3));

Y345:=IFF(CURRBARSCOUNT=1,(XMA(Y344,3)*3-MA(Y344,2)+Y344)/3,XMA(Y344,3));

Y346:=IFF(CURRBARSCOUNT=1,(XMA(Y345,3)*3-MA(Y345,2)+Y345)/3,XMA(Y345,3));

Y347:=IFF(CURRBARSCOUNT=1,(XMA(Y346,3)*3-MA(Y346,2)+Y346)/3,XMA(Y346,3));

Y348:=IFF(CURRBARSCOUNT=1,(XMA(Y347,3)*3-MA(Y347,2)+Y347)/3,XMA(Y347,3));

Y349:=IFF(CURRBARSCOUNT=1,(XMA(Y348,3)*3-MA(Y348,2)+Y348)/3,XMA(Y348,3));

Y350:=IFF(CURRBARSCOUNT=1,(XMA(Y349,3)*3-MA(Y349,2)+Y349)/3,XMA(Y349,3));

Y351:=IFF(CURRBARSCOUNT=1,(XMA(Y350,3)*3-MA(Y350,2)+Y350)/3,XMA(Y350,3));

Y352:=IFF(CURRBARSCOUNT=1,(XMA(Y351,3)*3-MA(Y351,2)+Y351)/3,XMA(Y351,3));

Y353:=IFF(CURRBARSCOUNT=1,(XMA(Y352,3)*3-MA(Y352,2)+Y352)/3,XMA(Y352,3));

Y354:=IFF(CURRBARSCOUNT=1,(XMA(Y353,3)*3-MA(Y353,2)+Y353)/3,XMA(Y353,3));

Y355:=IFF(CURRBARSCOUNT=1,(XMA(Y354,3)*3-MA(Y354,2)+Y354)/3,XMA(Y354,3));

Y356:=IFF(CURRBARSCOUNT=1,(XMA(Y355,3)*3-MA(Y355,2)+Y355)/3,XMA(Y355,3));

Y357:=IFF(CURRBARSCOUNT=1,(XMA(Y356,3)*3-MA(Y356,2)+Y356)/3,XMA(Y356,3));

Y358:=IFF(CURRBARSCOUNT=1,(XMA(Y357,3)*3-MA(Y357,2)+Y357)/3,XMA(Y357,3));

Y359:=IFF(CURRBARSCOUNT=1,(XMA(Y358,3)*3-MA(Y358,2)+Y358)/3,XMA(Y358,3));

Y360:=IFF(CURRBARSCOUNT=1,(XMA(Y359,3)*3-MA(Y359,2)+Y359)/3,XMA(Y359,3));

Y361:=IFF(CURRBARSCOUNT=1,(XMA(Y360,3)*3-MA(Y360,2)+Y360)/3,XMA(Y360,3));

Y362:=IFF(CURRBARSCOUNT=1,(XMA(Y361,3)*3-MA(Y361,2)+Y361)/3,XMA(Y361,3));

Y363:=IFF(CURRBARSCOUNT=1,(XMA(Y362,3)*3-MA(Y362,2)+Y362)/3,XMA(Y362,3));

Y364:=IFF(CURRBARSCOUNT=1,(XMA(Y363,3)*3-MA(Y363,2)+Y363)/3,XMA(Y363,3));

Y365:=IFF(CURRBARSCOUNT=1,(XMA(Y364,3)*3-MA(Y364,2)+Y364)/3,XMA(Y364,3));

Y366:=IFF(CURRBARSCOUNT=1,(XMA(Y365,3)*3-MA(Y365,2)+Y365)/3,XMA(Y365,3));

Y367:=IFF(CURRBARSCOUNT=1,(XMA(Y366,3)*3-MA(Y366,2)+Y366)/3,XMA(Y366,3));

Y368:=IFF(CURRBARSCOUNT=1,(XMA(Y367,3)*3-MA(Y367,2)+Y367)/3,XMA(Y367,3));

Y369:=IFF(CURRBARSCOUNT=1,(XMA(Y368,3)*3-MA(Y368,2)+Y368)/3,XMA(Y368,3));

Y370:=IFF(CURRBARSCOUNT=1,(XMA(Y369,3)*3-MA(Y369,2)+Y369)/3,XMA(Y369,3));

Y371:=IFF(CURRBARSCOUNT=1,(XMA(Y370,3)*3-MA(Y370,2)+Y370)/3,XMA(Y370,3));

Y372:=IFF(CURRBARSCOUNT=1,(XMA(Y371,3)*3-MA(Y371,2)+Y371)/3,XMA(Y371,3));

Y373:=IFF(CURRBARSCOUNT=1,(XMA(Y372,3)*3-MA(Y372,2)+Y372)/3,XMA(Y372,3));

Y374:=IFF(CURRBARSCOUNT=1,(XMA(Y373,3)*3-MA(Y373,2)+Y373)/3,XMA(Y373,3));

Y375:=IFF(CURRBARSCOUNT=1,(XMA(Y374,3)*3-MA(Y374,2)+Y374)/3,XMA(Y374,3));

Y376:=IFF(CURRBARSCOUNT=1,(XMA(Y375,3)*3-MA(Y375,2)+Y375)/3,XMA(Y375,3));

Y377:=IFF(CURRBARSCOUNT=1,(XMA(Y376,3)*3-MA(Y376,2)+Y376)/3,XMA(Y376,3));

Y378:=IFF(CURRBARSCOUNT=1,(XMA(Y377,3)*3-MA(Y377,2)+Y377)/3,XMA(Y377,3));

Y379:=IFF(CURRBARSCOUNT=1,(XMA(Y378,3)*3-MA(Y378,2)+Y378)/3,XMA(Y378,3));

Y380:=IFF(CURRBARSCOUNT=1,(XMA(Y379,3)*3-MA(Y379,2)+Y379)/3,XMA(Y379,3));

Y381:=IFF(CURRBARSCOUNT=1,(XMA(Y380,3)*3-MA(Y380,2)+Y380)/3,XMA(Y380,3));

Y382:=IFF(CURRBARSCOUNT=1,(XMA(Y381,3)*3-MA(Y381,2)+Y381)/3,XMA(Y381,3));

Y383:=IFF(CURRBARSCOUNT=1,(XMA(Y382,3)*3-MA(Y382,2)+Y382)/3,XMA(Y382,3));

Y384:=IFF(CURRBARSCOUNT=1,(XMA(Y383,3)*3-MA(Y383,2)+Y383)/3,XMA(Y383,3));

Y385:=IFF(CURRBARSCOUNT=1,(XMA(Y384,3)*3-MA(Y384,2)+Y384)/3,XMA(Y384,3));

Y386:=IFF(CURRBARSCOUNT=1,(XMA(Y385,3)*3-MA(Y385,2)+Y385)/3,XMA(Y385,3));

Y387:=IFF(CURRBARSCOUNT=1,(XMA(Y386,3)*3-MA(Y386,2)+Y386)/3,XMA(Y386,3));

Y388:=IFF(CURRBARSCOUNT=1,(XMA(Y387,3)*3-MA(Y387,2)+Y387)/3,XMA(Y387,3));

Y389:=IFF(CURRBARSCOUNT=1,(XMA(Y388,3)*3-MA(Y388,2)+Y388)/3,XMA(Y388,3));

Y390:=IFF(CURRBARSCOUNT=1,(XMA(Y389,3)*3-MA(Y389,2)+Y389)/3,XMA(Y389,3));

Y391:=IFF(CURRBARSCOUNT=1,(XMA(Y390,3)*3-MA(Y390,2)+Y390)/3,XMA(Y390,3));

Y392:=IFF(CURRBARSCOUNT=1,(XMA(Y391,3)*3-MA(Y391,2)+Y391)/3,XMA(Y391,3));

Y393:=IFF(CURRBARSCOUNT=1,(XMA(Y392,3)*3-MA(Y392,2)+Y392)/3,XMA(Y392,3));

Y394:=IFF(CURRBARSCOUNT=1,(XMA(Y393,3)*3-MA(Y393,2)+Y393)/3,XMA(Y393,3));

Y395:=IFF(CURRBARSCOUNT=1,(XMA(Y394,3)*3-MA(Y394,2)+Y394)/3,XMA(Y394,3));

Y396:=IFF(CURRBARSCOUNT=1,(XMA(Y395,3)*3-MA(Y395,2)+Y395)/3,XMA(Y395,3));

Y397:=IFF(CURRBARSCOUNT=1,(XMA(Y396,3)*3-MA(Y396,2)+Y396)/3,XMA(Y396,3));

Y398:=IFF(CURRBARSCOUNT=1,(XMA(Y397,3)*3-MA(Y397,2)+Y397)/3,XMA(Y397,3));

Y399:=IFF(CURRBARSCOUNT=1,(XMA(Y398,3)*3-MA(Y398,2)+Y398)/3,XMA(Y398,3));

Y400:=IFF(CURRBARSCOUNT=1,(XMA(Y399,3)*3-MA(Y399,2)+Y399)/3,XMA(Y399,3));

Y401:=IFF(CURRBARSCOUNT=1,(XMA(Y400,3)*3-MA(Y400,2)+Y400)/3,XMA(Y400,3));

Y402:=IFF(CURRBARSCOUNT=1,(XMA(Y401,3)*3-MA(Y401,2)+Y401)/3,XMA(Y401,3));

Y403:=IFF(CURRBARSCOUNT=1,(XMA(Y402,3)*3-MA(Y402,2)+Y402)/3,XMA(Y402,3));

Y404:=IFF(CURRBARSCOUNT=1,(XMA(Y403,3)*3-MA(Y403,2)+Y403)/3,XMA(Y403,3));

Y405:=IFF(CURRBARSCOUNT=1,(XMA(Y404,3)*3-MA(Y404,2)+Y404)/3,XMA(Y404,3));

Y406:=IFF(CURRBARSCOUNT=1,(XMA(Y405,3)*3-MA(Y405,2)+Y405)/3,XMA(Y405,3));

LL:=Y406;

{日周期}

{险1:=Y396*1.1,COLORRED,POINTDOT;}

险2:=Y396*1.125,COLORYELLOW,POINTDOT;

{险3:Y396*1.15,COLORRED,POINTDOT;}

{良1:=Y396*0.9,COLORLIBLUE,POINTDOT;}

良2:=Y396*0.875,COLORGREEN,POINTDOT;

{良3:Y396*0.85,COLORLIBLUE,POINTDOT;}

Aac:=MA((2*CLOSE+HIGH+LOW)/4,5);

通道1:=AAC*102/100;

通道2:=AAC*(200-102)/30;

CC:=Abs((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);

DD:=DMA(CLOSE,CC);

通道3:=(1+7/100)*DD;

通道4:=(1-7/100)*DD;

股价:=C*限时;

股价运动:=股价,LINETHICK2,COLORBLUE;

运动趋势:=Y406,LINETHICK1,COLORWHITE;

阶段顶:运动趋势*1.1*限时,COLORRED;

高风险区2:=运动趋势*1.125,COLORRED;

高风险区3:=运动趋势*1.15,COLORRED;

良机区1:=运动趋势*0.9,COLORGREEN;

良机区2:=运动趋势*0.875,COLORGREEN;

阶段底:运动趋势*0.85*限时,COLORGREEN;

T:=CLOSE/REF(CLOSE,1)*1000-1000;

QS2:=XMA(XMA(XMA(T,2),2),2);

QS4:=XMA(XMA(XMA(T,4),4),4);

QS6:=XMA(XMA(XMA(T,6),6),6);

高风险:=((C-运动趋势)/运动趋势*100>10 AND C>通道3) OR ((H-运动趋势)/运动趋势*100>10 AND H>通道3 ) OR ((O-运动趋势)/运动趋势*100>10 AND O>通道3);

DRAWTEXT(高风险*限时,H*1.02,'');

买进区:=((C-运动趋势)/运动趋势*100<-10 AND C<通道4) OR ((O-运动趋势)/运动趋势*100<-10 AND O<通道4 ) OR((L-运动趋势)/运动趋势*100<-10 AND L<通道4);

DRAWTEXT(买进区*限时,阶段底*0.9,'')COLOR00DD00;

N:=5;

MA05:MA(C,5)*限时 LINETHICK1,COLOR00CCFF;

MA10:=MA(C,10);

MA20:=MA(C,20);

MA30:=MA(C,30);

VAR1:=MA(CLOSE,5),COLOR00FFFF;

VAR6:=MA(CLOSE,54),COLORFF9900;

MA250:=MA(CLOSE,250),COLORMAGENTA,LINETHICK1;

MID:=MA(C,1);

VART1:=POW((C-MID),2);

VART2:=MA(VART1,N);

VART3:=SQRT(VART2);

UPPER:=MID+2*VART3;

LOWER:=MID-2*VART3;

boll:=REF(MID,1);

UB:=REF(UPPER,1);

LB:=REF(LOWER,1);

LOWER1:=MID-VART3;

LB1:=REF(LOWER1,1);

BB:=(C-LB1)/(UB-LB)*100,NODRAW;

MA6:=MA(BB,6),NODRAW;

DRAWICON(crOSS(BB,100)*限时,L*0.93,1),NODRAW;

DRAWTEXT(CROSS(BB,100)*限时,L*0.96,''),COLORCYAN;

{N(3,30,5);}

【箱顶】:PEAK(3,N,1)*0.999*限时,COLORFF9900,LINETHICK2;

【箱底】:TROUGH(3,N,1)*0.999*限时,COLORFF00FF,LINETHICK2;

【箱高】:=1*(【箱顶】-【箱底】)/【箱底】;

k线运行的升幅:=(MA(H,3)-REF(MA(H,3),1))*100/REF(MA(H,3),1);{NODRAW;}

{ML:=EMA(L,7),COLORMAGENTA;

MH:=MA(H,7),COLORGRAY;

趋势线:MA((MH+ML)/2,3),LINETHICK1,COLORGREEN;

趋势线1:IF(趋势线>REF(趋势线,1),趋势线,DRAWNULL),LINETHICK2,COLORMAGENTA;}

{八周均线}

涨:IF(MA(CLOSE,5)>REF(MA(CLOSE,5),1),MA(CLOSE,5)*限时,DRAWNULL),COLOR000099,LINETHICK1;

平:IF(MA(CLOSE,5)=REF(MA(CLOSE,5),1),MA(CLOSE,5)*限时,DRAWNULL),COLOR00CCFF,LINETHICK1;

跌:IF(MA(CLOSE,5)<REF(MA(CLOSE,5),1),MA(CLOSE,5)*限时,DRAWNULL),COLOR009900,LINETHICK1;

VAR0:=MA(C,7),COLORGREEN;

七日均价下:=IF(VAR0<REF(VAR0,1),VAR0,DRAWNULL),COLORGREEN,LINETHICK1;

七日均价上:=IF(VAR0>REF(VAR0,1),VAR0,DRAWNULL),COLORRED,LINETHICK1;

XDU:=IF(EMA(EMA(EMA(C,2),2),2)>REF(EMA(EMA(EMA(C,2),2),2),1),【箱底】,【箱顶】);

XTB:=【箱底】!=REF(【箱底】,2) &&【箱底】=REF(【箱底】,1);

XTS:=【箱顶】!=REF(【箱顶】,2) &&【箱顶】=REF(【箱顶】,1);

买点:=(【箱底】!=REF(【箱底】,2) && 【箱底】=REF(【箱底】,1));

卖点:=(【箱顶】!=REF(【箱顶】,2) && 【箱顶】=REF(【箱顶】,1));

DRAWICON(XTB,MIN(【箱底】*限时,L)*0.95,1);

DRAWTEXT(XTB,MIN(【箱底】*限时,L)*0.93,'底'),COLOR0000DD;

DRAWICON(XTS,MAX(【箱顶】*限时,H)*1.03,2);

DRAWTEXT(XTS,MIN(【箱顶】*限时,H)*1.07,'顶')COLOR00DD00;

上升段:DRAWLINE(XTB*限时,MIN(LLV(L,1),【箱底】),XTS,MAX(HHV(H,1),【箱顶】),0)

COLOR00FFFF,LINETHICK1;{XTBL}

下跌段:DRAWLINE(XTS*限时,MAX(HHV(H,1),【箱顶】),XTB,MIN(LLV(L,1),【箱底】),0)

COLORFFFF54,LINETHICK1;{XTSL}

{主图中涨停板,跌停板颜色。};

五日乖离率:=(C-MA05)/MA05*100;

BB05:=ATAN((MA05/REF(MA05,1)-1)*100)*180/3.1416;

速度5:=SMA(EMA((MA05-REF(MA05,1))/REF(MA05,1),3)*100,3,1);

加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;

BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;

三拾日乖离率:=(C-MA30)/MA30*100,NODRAW;

VAR2:=(MA30-MA20)<REF((MA30-MA20),1) AND MA20<REF(MA20,1) AND MA30<REF(MA30,1);

BB30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;

强势狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);

加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND MA05>REF(MA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA10>REF(MA10,1)

AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;

清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>MA30 OR O>MA30) AND MA05<REF(MA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) AND MA10<REF(MA10,1),10);

DRAWTEXT(加仓*限时 ,LOW*0.95,''),COLORRED;

JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) AND MA10>REF(MA10,1) ;

减仓:=FILTER(JC,10);

MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA05>REF(MA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<MA30;

买入:=FILTER(MR,10);

DRAWTEXT(减仓*限时,HIGH*1.04,''),COLORCYAN;

DRAWTEXT(买入*限时,LOW*0.98,'←短买'),COLORYELLOW;

DRAWTEXT(清仓*限时 ,HIGH*1.02,''),COLORGREEN;

DRAWTEXT(强势狙击*限时,LOW*0.98,''),COLORYELLOW;

VAR21:=MAX(ABS(HIGH-AMOUNT/vol/100),ABS(AMOUNT/VOL/100-LOW));

VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);

MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;

LC:=REF(CLOSE,1);

rsi:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);

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

BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;

上:=EMA(C,3),COLORBLUE,LINETHICK1;

中:=EMA(C,5),COLORWHITE,LINETHICK1;

下:=EMA(中,5),COLOR00FF00,LINETHICK1;

QQ:= C<中;

MM:=上>REF(上,1) AND REF(上,1)<REF(上,2) ;

V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);

V2:=(1-7/100)*(DMA(CLOSE,V1));

V3:=(1+7/100)*(DMA(CLOSE,V1));

V5:=MA((LOW+HIGH+CLOSE)/3,5);

{收盘价=4日内收盘价的最高值 AND 昨收=4日内收盘价的最低值}

VAR03:=CLOSE=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR

REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND

REF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND

C<REF(C,1) AND C<REF(C,2);

{收盘价=4日内收盘价的最低值 AND (昨收<2日前的收盘价}

VAR04:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND

REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);

{昨收=4日内收盘价的最低值 AND 收盘价>=2日前的收盘价}

VAR05:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND

REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) AND

REF(C,2)>=REF(C,4) AND C<REF(C,1);

{昨收=4日内收盘价的最高值 AND 收盘价<2日前的收盘价}

VAR06:=V5>REF(V5,1) AND REF(V5,1)<REF(V5,2);

{今日V5向上形成拐点}

VAR07:=LOW<HHV(V5,13) AND HIGH>HHV(V5,13) AND CLOSE>REF(C,1) AND CLOSE>OPEN;

VAR08:=VAR07 AND COUNT(VAR06,2);

VAR09:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6);

{涨停}

TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1;

立桩量:=FILTER(TJ1,5);

TJ2:=IF(BArslAst(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));

突破:=TJ2=1;

TJ3:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(LOW,3),1,0)));

三天法则:=TJ3=1;

P1:=5;

P2:=4;

P11:=LLV(LOW,P1);

P12:=HHV(HIGH,P1);

K:=EMA((CLOSE-P11)/(P12-P11)*100,P2),COLORRED,LINETHICK2;

D:=EMA(0.667*REF(K,1)+0.333*K,2),COLORGREEN,LINETHICK2;

DRAWTEXT(CROSS(K,D)*限时 AND D<40 AND XTB,H*1.01,''),COLORFF00FF;

DRAWTEXT(CROSS(K,D)*限时 AND D<40 AND 下跌段=DRAWNULL AND XTS!=1,H*1.01,''),COLORFF00FF;

DRAWTEXT(CROSS(D,K)*限时 AND XTS,H*1.01,''),COLORBLUE;

DRAWTEXT(CROSS(D,K)*限时 AND 上升段=DRAWNULL AND XTB!=1,H*1.01,''),COLORBLUE;

DRAWTEXT(CROSS(80,K)*限时,H*1.06,''),COLORCYAN;

DRAWTEXT(CROSS(D,K)*限时 AND D>=80,H*1.06,''),COLORCYAN;

DRAWTEXT(CROSS(zig(3,13)*限时,REF(ZIG(3,13),1)),MIN(【箱底】,L)*0.9,'重仓'),COLORFF00FF;

DIF1:=EMA(DCLOSE,12)-EMA(DCLOSE,26);

DEA1:=EMA(DIF1,9);

淘金1:=(DIF1-DEA1)*2*60;

主力:=淘金1-REF(淘金1,1),COLORRED;

DRAWTEXT(CROSS(主力,15)*限时 AND 主力-REF(主力,1)>5 AND 主力>5 AND 下跌段=DRAWNULL AND XTS!=1 AND C>=REF(C,1),HIGH*1,''),COLOR00CCFF;

DRAWTEXT(CROSS(主力,15)*限时 AND 主力-REF(主力,1)>5 AND 主力>5 AND 上升段=DRAWNULL AND XTB!=1 AND C<REF(C,1),HIGH*1,''),COLOR00CC00;

DRAWTEXT(CROSS(主力,15)*限时 AND 主力-REF(主力,1)>5 AND 主力>5 AND XTB,HIGH*1,'←涨'),COLOR00CCFF;

DRAWTEXT(CROSS(主力,15)*限时 AND 主力-REF(主力,1)>5 AND 主力>5 AND XTS,HIGH*1,'←跌'),COLOR00CC00;

差值:=IF(主力-REF(主力,1), 主力-REF(主力,1),0),COLORRED;

VARR:=TROUGHBARS(3,15,1)<4;

DRAWTEXT(FILTER(VARR=1,5)*限时,LOW*0.98,''),COLOR00CCFF;

市盈率 :DYNAINFO(39),NODRAW;

Z1:=STRCAT(HYBLOCK,' ');

Z2:=STRCAT(Z1,FGBLOCK);

Z3:=STRCAT(Z2,DYBLOCK);

Z4:=STRCAT(Z3,' ');

A1:=MA(C,20);

B1:=A1+2*STD(C,20);

C1:=A1-2*STD(C,20);

AA:=CROSS(C,B1) AND C/REF(C,1)>1.05;

DRAWTEXT(AA*限时 AND C>MA(C,60) AND C>MA(C,90) AND C>MA(C,120) AND C>MA(C,250),H*1.03,''),COLORYELLOW;

A11:=(C-MA(C,250))/MA(C,250)*100;

N11:=BARSLAST(CROSS(C,MA(C,250)));

N21:=BARSLAST(CROSS(MA(C,250),C));

B11:=IF(N11<N21,N11+1,0);

C11:=HHV(A11,B11);

D11:=(C-REF(C,B11))/REF(C,B11)*100;

N31:=BARSLAST(CROSS(C,MA(C,20)));

N41:=BARSLAST(CROSS(MA(C,20),C));

AA1:=IF(N31<N41,N31+1,0);

BB1:=(C-REF(C,AA1))/REF(C,AA1)*100,COLORRED;

DRAWTEXT(CROSS(BB1,10)*限时 AND C/REF(C,1)>1.05,H*1.01,''),COLORRED;

预警线:=18.5,COLORGREEN;

趋势线:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100,COLORMAGENTA,LINETHICK1;

DRAWTEXT(CROSS(18.5,趋势线)*限时,L,''),COLORFF00FF;

DRAWTEXT(CROSS(趋势线,94.5)*限时,H*1.01,''),COLOR70DB93;

VARR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;

VARR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;

VARR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;

VARR6:=(VARR3+VARR4+VARR5)/3;

VARR8:=IF(VARR6<=-20,10,0);

VARR9:=HHV(VARR8,10);

VARRA:=IF(VARR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);

DRAWTEXT(VARR8=10*限时 AND FILTER(VARR8=10,5),LOW*0.9,'')COLORFF00FF;

DRAWTEXT(VARRA=20*限时,LOW*0.94,'') COLOR70DB93;

DIFF:=EMA(CLOSE,3)-EMA(CLOSE,8);

AX1:=EMA(DIFF,5)*5;

AX2:=((EMA(CLOSE,3)-EMA(CLOSE,8)))*5;

资金动能A:=AX2,COLORYELLOW,LINETHICK2;

资金动能B:=AX1,COLORFFFF00,LINETHICK2;

DRAWTEXT((CROSS(资金动能A,资金动能B)*限时),LOW*0.9,'');

DRAWTEXT((CROSS(资金动能B,资金动能A)*限时),H*1.01,'');

TY:=H;

AS1:=REF(TY,10)=HHV(TY,2*10+1); BS1:=FILTER(AS1,10); CS1:=BACKSET(BS1,10+1); HD:=FILTER(CS1,10);

AS2:=REF(TY,10)=LLV(TY,2*10+1); BS2:=FILTER(AS2,10); CS2:=BACKSET(BS2,10+1); LD:=FILTER(CS2,10);

阻力:=REF(H,BARSLAST(HD)),COLOR00FF00;

DRAWTEXT(CROSS(C,阻力)*限时,LOW*0.93,''),COLORFF00FF;

VARS2:=LLV(LOW,10);

VARS3:=HHV(HIGH,25);

动力线:=EMA((CLOSE-VARS2)/(VARS3-VARS2)*4,4);

阶段卖:=3.2;

全清仓:=3.5;

底部:=0.2,COLOR70DB93;

起涨:=0.5,COLORYELLOW;

DRAWTEXT( FILTER(CROSS(动力线,起涨)*限时,20),LOW*0.93 ,'')COLORYELLOW;

DRAWTEXT( FILTER(CROSS(全清仓,动力线)*限时,20),H*1.03,'')COLORYELLOW;

DRAWTEXT( FILTER(CROSS(动力线,底部)*限时,20),LOW*0.93 ,'')COLORYELLOW;

DRAWTEXT( FILTER(CROSS(阶段卖,动力线)*限时,20),H*1.03,'')COLORYELLOW;

DRAWTEXT(CROSS(DATE,限时日) OR DATE=限时日,REF(M10,1),''),COLOR00FFFF;

通达信布林趋势指标公式