章萌主 发表于 2023-7-19 02:43:22

通达信趋势共振指标公式

每天早上9:00(提前半小时)更新--最新股票指标

DRAWGBK(CURRBARSCOUNT=1, RGB(310,108,108),RGB(88,30,0),0,'',0);
五日换手:SUM(vol,5)*100/CAPITAL,COLORRED,NODRAW;
二十换手:SUM(VOL,20)*100/CAPITAL,COLORRED,NODRAW;
上顶线:95,COLORWHITE,LINETHICK4;
强弱分界:50,POINTDOT,COLORGREEN,LINETHICK7;
下底线:5,COLORWHITE,LINETHICK4;
NOTEXT顶部标线:117,COLORBROWN;
NOTEXT底部标线:-17,COLORBROWN;
{看涨趋势0}
趋势力度:(3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*
SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)),COLORCYAN;
A1:=1;
A2:=5;
A3:=(((2 * CLOSE) + HIGH) + LOW) / 4;
A4:=LLV(LOW,34);
A5:=HHV(HIGH,34);
A6:=EMA((((A3 - A4) / (A5 - A4)) * 100),13);
A7:=(EMA(((0.667 * (REF(A6,1))) + (0.333 * A6)),2)) * A1;
A8:=(HHV(HIGH,9)) - (LLV(LOW,9));
A9:=(HHV(HIGH,9)) - CLOSE;
A10:=CLOSE - (LLV(LOW,9));
A11:=((A9 / A8) * 100) - 70;
A12:=SMA(((A10 / A8) * 100),3,1);
A13:=(SMA(A12,3,1)) - (SMA(A11,9,1));
A14:=(EMA((((A3 - A4) / (A5 - A4)) * 100),8)) * A1;
A15:=(EMA(A14,5)) * A1;
A16:=(EMA(A7,A2)) * A1;
A17:=(A14 - A15)>0 AND 趋势力度>A16;
看涨趋势:IF(A17,趋势力度,DRAWNULL),COLORYELLOW,LINETHICK2;
{人气趋势1}
V1:=REF(CLOSE,1);
V2:=Abs(HIGH-V1);
V3:=ABS(LOW-V1);
V4:=ABS(HIGH-REF(LOW,1));
V5:=ABS(V1-REF(OPEN,1));
V6:=IF(V2>V3 AND V2>V4,V2+V3/2+V5/4,IF(V3>V4 AND V3>V2,V3+V2/2+V5/4,V4+V5/4));
V7:=(CLOSE-V1+(CLOSE-OPEN)/2+V1-REF(OPEN,1));
V8:=8*V7/V6*MAX(V2,V3);
V9:=SUM(V8,0);
V10:=MA(V9,34);
V11:=V9>V10;
V12:=V9<=V10;
STICKLINE(V11,70,67,2,0),COLORRED;
STICKLINE(V12,70,67,2,0),COLORFF6633;
{强弱趋势2}
趋势强A:=IF(SAR(10,2,20)<=L,sar(10,2,20),DRAWNULL),COLORRED,NODRAW;
趋势弱A:=IF(SAR(10,2,20)>=H,SAR(10,2,20),DRAWNULL),COLORCYAN,NODRAW;
STICKLINE(趋势强A,60,57,2,0),COLORRED;
STICKLINE(趋势弱A,60,57,2,0),COLORFF6633;
{平衡趋势3}
NOTEXTV13:IF(C>=MA(C,80),强弱分界,DRAWNULL),COLORRED,POINTDOT,LINETHICK9;
NOTEXTV14:IF(C<MA(C,80),强弱分界,DRAWNULL),COLORBLUE,POINTDOT,LINETHICK9;
{转折趋势4}
趋势强B:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
趋势弱B:=SMA(SMA(趋势强B,3,1),3,1);
STICKLINE(SMA(趋势强B,3,1)>趋势弱B,43,40,2,0),COLOR1133FF;
STICKLINE(SMA(趋势强B,3,1)<=趋势弱B,43,40,2,0),COLORFF6633;
{异动趋势5}
V15:=(C*2+H+L)/4*10;
V16:=EMA(V15,13)-EMA(V15,34);
V17:=EMA(V16,5);
V18:=2*(V16-V17)*5.5;
异动趋势1:=V18>REF(V18,1) AND V18>6;
异动趋势2:=(V18<=REF(V18,1) AND V18>6) OR V18<=6;
STICKLINE(异动趋势1,33,30,2,0),COLORRED;
STICKLINE(异动趋势2,33,30,2,0),COLORFF6633;
{趋势5红共振}
V19:=V11 AND SAR(10,2,20)<=L,SAR(10,2,20) AND C>=MA(C,80) AND SMA(趋势强B,3,1)>趋势弱B AND 异动趋势1;
V20:=IF(V19=1 AND REF(V19,1)=0,1,0);
STICKLINE(V20=1,70,30,0,1),COLORYELLOW;
{趋势拐点信号}
EM01:=EMA(C,13);
EM:=EMA(C,21);
UP:=EMA(EM,13);
DOWN:=EMA(EM,17);
短期趋势:=(EMA(EM01,2)+EMA(EM01,7))/2;
短红升:=IF(短期趋势>=REF(短期趋势,1),短期趋势,DRAWNULL);
中期趋势:=(UP+DOWN)/2,COLORYELLOW,NODRAW;
中红升:=IF(中期趋势>REF(中期趋势,1),中期趋势,DRAWNULL);
长期趋势:=EMA(C,144),POINTDOT,COLORRED,NODRAW;
长红升:=IF(长期趋势>=REF(长期趋势,1),长期趋势,DRAWNULL);
异动0:=短红升 OR 中红升 OR 长红升;
N:=26;M1:=10;M2:=20;M3:=40;M4:=62;{--拐点A--}
N1:=26;N2:=12;M5:=6;N3:=9;M6:=3;M7:=3;
MID1:=REF(HIGH+LOW,1)/2;
cr:=SUM(MAX(0,HIGH-MID1),N)/SUM(MAX(0,MID1-LOW),N)*100;
MA1:=REF(MA(CR,M1),M1/2.5+1);
MA2:=REF(MA(CR,M2),M2/2.5+1);
MA3:=REF(MA(CR,M3),M3/2.5+1);
MA4:=REF(MA(CR,M4),M4/2.5+1);
BR:=SUM(MAX(0,HIGH-REF(CLOSE,1)),N1)/SUM(MAX(0,REF(CLOSE,1)-LOW),N1)*100;
AR:=SUM(HIGH-OPEN,N1)/SUM(OPEN-LOW,N1)*100;
PSY:=COUNT(CLOSE>REF(CLOSE,1),N2)/N2*100;
psyMA:=MA(PSY,M5);
RSV:=(CLOSE-LLV(LOW,N3))/(HHV(HIGH,N3)-LLV(LOW,N3))*100;
K:=SMA(RSV,M6,1);
D:=SMA(K,M7,1);
J:=3*K-2*D;
趋势:=SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1);
判断:=SMA(趋势,3,1);
异动1:=CR>MA1 AND CR>MA2 AND CR>MA3 AND CR>MA4;
异动2:=BR>AR;
异动3:=PSY>PSYMA;
异动4:=异动1 AND 异动2 AND 异动3;
异动5A:=(J<100 AND K>75) OR (J>100 AND K<75) OR (J<100 AND K<75);
异动5B:=J>K AND J>D AND K>D;
异动5:=异动5A AND 异动5B;
异动6:=判断>20 AND 判断<70 AND 趋势>判断;
异动7:=异动4=1 AND REF(异动4=0,1) AND 异动5 AND 异动6 AND 异动0;
DRAWICON(异动7,72,1),COLORRED;
DRAWICON(异动7,70,13),COLORRED;
DRAWTEXT(异动7,65,'↖拐点A'),COLORYELLOW;
异动8:=REF(趋势弱A,1)>0 AND 趋势强A>0;{--拐点B--}
异动9:=异动8 AND 趋势力度<=50 AND 异动0 AND C>REF(C,1)*1.04 AND VOL>REF(VOL,1);
DRAWICON(异动9,62,1),COLORRED;
DRAWICON(异动9,60,13),COLORRED;
DRAWTEXT(异动9,55,'↖拐点B'),COLORYELLOW;
异动10:=100-(100-3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1)+2*
SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1),15,1));{--拐点C--}
异动11:=100-(100-3*SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1)+2*
SMA(SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1),15,1));
异动12:=异动10>REF(异动11,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
异动13:=异动12 AND COUNT(异动12,30)=1;
DRAWICON(异动13,45,1),COLORRED;
DRAWICON(异动13,43,13),COLORRED;
DRAWTEXT(异动13,38,'↖拐点C'),COLORYELLOW;
异动14:=C=LLV(C,60);{--拐点D--}
异动15:=BArslAST(异动14);
异动16:=BETWEEN(异动15,1,60) AND C/REF(C,1)>1.043;
异动17:=异动16 AND COUNT(异动16,异动15)=1 AND 异动0;
DRAWICON(异动17,35,1),COLORRED;
DRAWICON(异动17,33,13),COLORRED;
DRAWTEXT(异动17,28,'↖拐点D'),COLORYELLOW;
{炫彩魔光信号}
异动18:=(COUNT(异动7,6)=1) + (COUNT(异动9,6)=1) + (COUNT(异动13,6)=1) + (COUNT(异动17,6)=1);
炫彩魔光:异动7 AND 异动18>=3,NODRAW;
STICKLINE(炫彩魔光,53,47,2,2),COLORFFFFFF;
{量变+质变信号}
量变1:=REF(LOW,1);
量变2:=(SMA(ABS(LOW-量变1),13,1))/(SMA(MAX(LOW-量变1,0),13,1))*4;
量变3:=EMA(量变2,13);
量变4:=LLV(LOW,34);
量变5:=EMA(IF(LOW<=量变4,量变3,0),3);
量变6:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
量变7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
量变8:=量变6<REF(量变7,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
量变9:=量变8 AND COUNT(量变8,18)=1 AND 异动0;
量变:IF(量变9,18,4.5),COLOREE44BB;
DRAWICON(量变9,10,18),COLORRED;
DRAWICON(量变9,8,1),COLORRED;
DRAWTEXT(量变9,18,'量变'),COLORFFFFFF;
质变1:=(EMA(CLOSE,2)) * A1;
质变2:=(EMA((((SLOPE(CLOSE,21)) * 20) + CLOSE),42)) * A1;
质变3:=(HHV((MA(HIGH,13)),13)) * A1;
质变4:=(LLV((MA(HIGH,13)),1)) * A1;
质变5:=(EMA(CLOSE,4)) * A1;
质变6:=((((质变1 >= 质变2) AND (质变4 = 质变3)) AND (质变1 > 质变5)) AND (CLOSE > 质变4)) AND ((REF(质变4,1)) < (REF(质变3,1)));
质变7:=BARSLAST(质变6) + 1;
质变8:=(LLV(LOW,质变7)) * 1.3;
质变9:=(LLV(LOW,20)) * 1.418;
质变10:=(((((质变1 >= 质变2) AND (质变4 = 质变3)) AND ((CLOSE / (REF(CLOSE,1))) >= 1.07)) AND (质变7 <= 30)) AND (CLOSE <= 质变8)) AND (CLOSE <= 质变9);
质变11:=质变10 AND (FILTER(质变10,质变7));
质变12:=(((((质变1 >= 质变2) AND (质变4 = 质变3)) AND ((CLOSE / (REF(CLOSE,1))) >= 1.035)) AND (质变7 <= 30)) AND (CLOSE <= 质变8)) AND (CLOSE <= 质变9) ;
质变13:=质变12 AND (FILTER(质变12,20));
质变14:=质变11 OR 质变13;
质变15:=质变14 AND REF(COUNT(量变9,20)=1,1) ;
质变:IF(质变15,18,4.5),COLORRED;
DRAWICON(质变15,10,18),COLORRED;
DRAWICON(质变15,8,1),COLORRED;
DRAWTEXT(质变15,18,'质变'),COLORFFFFFF;
{短中玉石底信号}
DB1:=CROSS(趋势力度,下底线);
DB2:=REF(COUNT(DB1,20)=2,1);
DB3:=REF(COUNT(DB1,30)=3,1);
DB4:=DB2 OR DB3;
钻石底:DB1 AND DB4,COLORGREEN,NODRAW;
DRAWTEXT(钻石底,2,'↖钻石底')COLORGREEN;
{趋势转弱信号}
逃顶:=1;
VAR01:=(HIGH+LOW+CLOSE)/3;
VAR02:=(VAR01-MA(VAR01,14))/(0.015*AVEDEV(VAR01,14));
VAR03:=(VAR01-MA(VAR01,70))/(0.015*AVEDEV(VAR01,70));
VAR04:=IF(VAR02>=150 AND VAR02<200 AND VAR03>=150 AND VAR03<200,10,0);
VAR05:=IF(VAR02<=-150 AND VAR02>-200 AND VAR03<=-150 AND VAR03>-200,-10,VAR04);
VAR1B:=(IF(VAR03>=200 AND VAR02>=150,15,IF(VAR03<=-200 AND VAR02<=-150,-15,VAR05))+60)*逃顶;
趋势转弱:FILTER(VAR1B=75,5),COLORMAGENTA,NODRAW;
DRAWICON(FILTER(VAR1B=75,5),95,2),COLORGREEN;
DRAWICON(FILTER(VAR1B=75,5),97,13),COLORGREEN;
DRAWTEXT(FILTER(VAR1B=75,5),96,'↙顶'),COLORBLacK;
{用法标注}
DRAWTEXT(ISLASTBAR,68.5,'★人气趋势★')COLORGREEN;
DRAWTEXT(ISLASTBAR,58.5,'★强弱趋势★')COLORGREEN;
DRAWTEXT(ISLASTBAR,强弱分界,'★平衡趋势★')COLORGREEN;
DRAWTEXT(ISLASTBAR,41.5,'★转折趋势★')COLORGREEN;
DRAWTEXT(ISLASTBAR,31.5,'★异动趋势★')COLORGREEN;





阅读后把下面的在看和赞点亮

设定为星标

系统才会给你主动推荐最新指标

凌777 发表于 2023-7-28 00:11:56

无量天尊!

漂浮的囚徒富 发表于 2023-8-21 16:21:48

感谢感谢!楼主功德无量,哈哈!

ypfy4234 发表于 2023-8-22 12:54:58

小手一抖,花花到手!

123459909 发表于 2023-10-28 09:38:47

好好 学习了 确实不错

愛你的泡泡 发表于 2023-12-16 21:04:00

沙发!沙发!

梦的衣裳323 发表于 2023-12-28 22:41:58

好贴不能沉!

福田换奥迪谱 发表于 2024-2-8 04:13:15

内容真的很不错
页: [1]
查看完整版本: 通达信趋势共振指标公式