# 如何录入通达信公式
导入技术指标公式的步骤:
- 打开通达信软件;
- 点击功能——公式系统——公式管理器;
- 选择技术指标公式——新建;
- 填写名称,复制公式粘贴到大框框里,如果公式前面有参数的,把参数填写到大框框上面的参数表中,选择公式类型为其它类型,选择画线方法为主图叠加或者副图;
- 测试公式——确定。
# 1.通达信主力监控指标
STEP1:=STEP/20;
MVALUE1:=MVALUE/8;
SARLINE:SAR(N,STEP1,MVALUE1),CIRCLEDOT,COLORRED;
STICKLINE(C>SAR(N,STEP1,MVALUE1) AND C<O,C,O,2.8,0),COLORRED;
STICKLINE(C>SAR(N,STEP1,MVALUE1) AND C>O,C,O,2.8,1),COLORRED;
STICKLINE(C>SAR(N,STEP1,MVALUE1),H,MAX(C,O),0,0),COLORRED;
STICKLINE(C>SAR(N,STEP1,MVALUE1),L,MIN(C,O),0,0),COLORRED;
STICKLINE(C<SAR(N,STEP1,MVALUE1) AND C<O,C,O,2.8,0),COLORCYAN;
STICKLINE(C<SAR(N,STEP1,MVALUE1) AND C>O,C,O,2.8,1),COLORCYAN;
STICKLINE(C<SAR(N,STEP1,MVALUE1),H,MAX(C,O),0,0),COLORCYAN;
STICKLINE(C<SAR(N,STEP1,MVALUE1),L,MIN(C,O),0,0),COLORCYAN;
DRAWTEXT(CROSS(C,SARLINE),L-0.05*L,'主力入场'),COLORRED;
DRAWTEXT(CROSS(SARLINE,C),H+0.05*H,'主力离场'),COLORCYAN;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# 2.通达信选股指标-群友指标 1
VA1:=100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55));
VA2:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
VA3:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VA4:=SMA(VA2,3,1);
VA5:=SMA(VA4,3,1);
VA6:=3*VA4-2*VA5;
VA7:=EMA(VA6,6);
{MACD}
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
妖:=CROSS(VA7,VA1) AND VA7<50 AND DEA>REF(DEA,1) AND MACD>=-0.07 AND V\*100/CAPITAL>1;// 这里有问题,手机上可以。
LWR1:=100*(HHV(HIGH,6)-CLOSE)/(HHV(HIGH,6)-LLV(LOW,6));
LWR3:=100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
L3:=FILTER(LWR3<9,9);
起:=LWR1<15 AND L3=1;
DYNAINFO(7)<30 AND DYNAINFO(7)>2 AND DYNAINFO(7)<MA(C,60)\*1.38 AND DYNAINFO(7)>MA(C,10) AND MA(C,60)>=REF(MA(C,60),1) AND
FINANCE(41) / 100000000 < 500 AND FINANCE(41) / 100000000 > 20 AND FINANCE(40) / 100000000 > 10 AND EXIST(妖, 3) AND EXIST(起, 3);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 通信达股票必涨买入公式,适合短线炒股操作
VAR2:=(EXPMA(VAR1,4),4),4);
J:(VAR2-ref(VAR2,1))/ref(VAR2,1)*100, COLORSTICK;
D:MA(J,3);
K:MA(J,1);
V1:=EMA(CLOSE,60)-EMA(CLOSE,300);
V2:=EMA(V1,300);
V3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
V6:=CLOSE/ref(CLOSE,3)>=1.1;
V7:=BACKSET(V6,3);
买入:IF((V7 AND COUNT(V7,3)=1),0.9,0),COLORFFAD1F,LINETHICK3;
DRAWTEXT(买入,0.6,'买入 '),COLORFFAD1F,LINETHICK3;
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 触底触顶波段操作图公式
RSV1:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
RSV2:=(CLOSE-LLV(LOW,37))/(HHV(HIGH,37)-LLV(LOW,37))*100;
短线:SMA(SMA(RSV1,3,1),3,1)+3*STD(CLOSE,21),COLOR00FF00;
中线:SMA(RSV2,5,1)+2*STD(CLOSE,37),COLORRED;
RSV3:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))_100;
长线:SMA(RSV3,5,1),COLORFFAD1F;
看底:STICKLINE(中线<15,中线,15,6,0),COLORF00FF0;
黄金坑:STICKLINE(短线<20 AND 中线<20 AND 长线<20,MAX(长线,MAX(短线,中线)),20,8,0),COLOR00CCFF;
看顶:STICKLINE(中线>80,80,中线,6,0),COLORFFF000;
DRAWICON(CROSS(长线,15),中线,1);
DRAWTEXT(LONGCROSS(中线,20,15),20,'追涨');
DRAWTEXT(CROSS(短线,长线)AND 长线<18 AND 长线>REF(长线,1)OR CROSS(长线,5),20,'千载难逢');
粘合星:DRAWTEXT(ABS(中线-长线)<2 AND 中线>REF(中线,1),中线,'_');
中线 2:=-100\*(HHV(HIGH,40)-CLOSE)/(HHV(HIGH,40)-LLV(LOW,40));
底:DRAWTEXT(CROSS(中线 2,-90) AND (长线<中线 AND 长线>REF(长线,1)OR 短线<20 AND 中线<20 AND 长线<20),长线,'底'),COLORFF00FF;
IF(COUNT(CROSS(中线 2,-90),12)=3,30,5);
IF(COUNT(CROSS(-5,中线 2),12)=3 OR COUNT(CROSS(-15,中线 2),6)=3,70,100);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 通达信综合操盘手主图指标公式
七天线:MA(C,7),COLORGRAY;
工作线:(EMA(C,17)) ,POINTDOT,LINETHICK4,COLORFFAD1F;
生命线:(MA(C,25)) ,LINETHICK2,COLORMAGENTA;
不惑线:(MA(C,43)) ,COLORCYAN;
姊妹线:(EMA(C,50)) ,CIRCLEDOT,COLORWHITE;
九号线:(MA(C,99)) ,LINETHICK1,COLOR0099FF;
卖线:EMA(SLOPE(C,21)_21+C,42),COLORRED,LINETHICK2;
A3:=EMA((((SLOPE(C,21)) _ 20) + C),68);
A4:=EMA(C,10);
A5:=REF(C,2);
A6:=((SMA((MAX((C - A5),0)),6,1)) / (SMA(ABS((C - A5)),6,1))) _ 100;
A7:=IF(((A6 < (REF(A6,1))) AND (A6 > 79)),A6,0);
DRAWTEXT((CROSS(A4,A3)),L,'△'),COLORFFAD1F;
DRAWTEXT(A7,H,'○'),LINETHICK3,COLORGREEN;
A8:=LLV(L,21);
A9:=HHV(H,21);
A10:=EMA((((CLOSE - A8) / (A9 - A8)) _ 100),5);
A11:=EMA((((CLOSE - A8) / (A9 - A8)) _ 50),13);
A12:=EMA(((0.667 _ (REF(A10,1))) + (0.333 _ A10)),2);
A13:=LLV(L,55);
A14:=HHV(H,34);
A15:=EMA((((C - A13) / (A14 - A13)) _ 100),3);
A16:=(A11 + A15) / 2;
A17:=EMA(((0.667 _ (REF(A15,1))) + (0.333 _ A10)),2);
A18:=EMA(A16,5);
A19:=EMA(((0.667 _ (REF(A18,1))) + (0.333 _ A18)),2);
A20:=CROSS(A10,A11);
A21:=(CROSS(A10,A19)) AND (A19 < 30);
A22:=A21 * 0.6;
DRAWTEXT((A22 = 0.6),L,'◇'),COLORFFAD1F;
DRAWTEXT((A20 = 1),L,'◇'),COLORWHITE;
A23:=((C + L) + H) / 3;
A24:=EMA(A23,6);
A25:=EMA(A24,5);
A26:=CROSS(A24,A25);
DRAWICON(A26,(LOW*0.98),5),COLORMAGENTA;
DRAWICON(CROSS(卖线,C),(H*1.02),4);
STICKLINE(((C >= 工作线) AND (C >= O)),O,C,3,1),COLORRED;
STICKLINE(((C >= 工作线) AND (C <= O)),O,C,3,0),COLORRED;
STICKLINE(((C < 工作线) AND (C >= O)),O,C,3,1),COLORGREEN;
STICKLINE(((C < 工作线) AND (C <= O)),O,C,3,0),COLORGREEN;
DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR0080FF;
DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR0080FF;
DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.06,0,'主题投资:')COLOR0000FF;
DRAWTEXT_FIX(1,0.07,0.06,0,EXTERNSTR(0,1))COLOR0000FF;
{股本市值}
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT(' 流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');
全流通:=STRCAT(' 全流通: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2));
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'亿');
上市天数:=STRCAT(' 上市天数: ',CON2STR(FINANCE(42),0));
{上市日期:=STRCAT(' 上市日期: ',CON2STR(HHV((BARSCOUNT(C)=0)*(DATE+19000000),0),0));}
股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值),上市天数));
{业绩综合}
市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));
市销率:=STRCAT(' 市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2));
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2));
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
净利润率:=STRCAT(' 净利润率 ',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
主营利润率:=STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
当前业绩:=STRCAT('当前业绩: ',STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(市盈率,市销率),市净率),净资收益率),毛利率),净利润率),主营利润率));
{风险系数}
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z 值:=X1+X2+X3+X4+X5;
预警:=IF(Z 值<1.2,'重警',IF(Z 值>=1.2 AND Z 值<2.6,'轻警','无警'));
财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z 值: ',CON2STR(Z 值,3))));
优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));{理论上越大越好但不同行业有不同标准};
现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};
财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));
DRAWTEXT_FIX(ISLASTBAR,0.00,0.12,0,股本市值),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.00,0.18,0,当前业绩),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.00,0.24,0,财务系数),COLORGREEN;
C2:=REF(C,1);
非 ST 涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
涨停:=非 ST 涨停;
STICKLINE(涨停,OPEN,CLOSE,2,0),COLOR00FFFF;
STICKLINE(涨停,H,L,0,0),COLOR00FFFF;
非 ST 跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
跌停:=非 ST 跌停;
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
半涨 1:=IF((C-C2)*100/C2>=(5-0.01*100/C2),1,0);
半涨 2:=IF((C-C2)*100/C2<(10-0.01*100/C2),1,0);
JRS:=半涨 1 AND 半涨 2 AND FINANCE(33)>0;
STICKLINE(JRS,OPEN,CLOSE,2,0),COLOR0066FF;
NUMBER:=COUNT(非 ST 涨停,BARSSINCE(非 ST 涨停)+1);
N:=10;
T1:=CONST(HHVBARS(V,N));
T0:IF(CURRBARSCOUNT<=N+7,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL),LINETHICK3,COLOR0000FF;
IF(CURRBARSCOUNT=T1+1,T0,DRAWNULL),CIRCLEDOT;
DRAWTEXT(ISLASTBAR,T0,' 量能平台');
DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR0080FF;
DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR0080FF;
DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.06,0,'主题投资:')COLOR0000FF;
DRAWTEXT_FIX(1,0.07,0.06,0,EXTERNSTR(0,1))COLOR0000FF;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# 牛市适用波段涨停指标
顶:80,COLORFFA500;
大顶:100,COLORBLUE;
VAR1:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80;
VAR2:=SMA(VAR1,10,1);
慢速:SMA(VAR2,5,1),COLORRED;
RSV:= ((HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100)-70;
RSV1:= (CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
FATK:=SMA(RSV1,3,1);
形态:SMA(FATK,3,1),COLORBB24DB;
VARA:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VARB:=SMA(VARA,3,1);
VARC:=SMA(VARB,3,1);
加速: EMA(3*VARB-2*VARC,3),COLORFFAD1F;
底:6,COLOR00BF00;
大底:-6,COLOR007300;
VAR11:=LLV(LOW,5)=LLV(LOW,45) AND CLOSE>=OPEN*1.04;
VAR22:=CLOSE>(REF(HIGH,1)+REF(LOW,1))/2;
买入:=VAR11 AND VAR22,STICK,LINETHICK2,COLORRED;
VAR3:=REF(CLOSE,1);
VAR4:=SMA(MAX(CLOSE-VAR3,0),6,1)/SMA(ABS(CLOSE-VAR3),6,1)*100;
卖出:=CROSS(80,VAR4),STICK,LINETHICK2,COLORGREEN;
{波段介入点}
A1:=REF(CLOSE,2);
A2:=SMA(MAX(CLOSE-A1,0),7,1)/SMA(ABS(CLOSE-A1),7,1)\*100;
波段介入点:IF(A2<19,19,0)COLORWHITE;
A4:=MA(CLOSE,20);A5:=(CLOSE>MA(CLOSE,5));A6:=(MA(CLOSE,5)>MA(CLOSE,10));
A7:=(CLOSE>MA(CLOSE,10));A8:=(MA(CLOSE,5)>MA(CLOSE,20));A9:=(CLOSE>MA(CLOSE,20));A10:=REF(A4,1);A11:=(A4 > A10);
AVX:(((((IF(A5,10,(0 - 10)) + IF(A6,10,(0 - 10))) + IF(A7,10,(0 - 10))) +
IF(A8,10,(0 - 10))) + IF(A9,10,(0 - 10))) + IF(A11,10,(0 - 10))),COLOR0000FF;
AVX 零轴:0,COLOR00FFFF;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 经典主力散户线指标公式
{短线:"KDJ.J"(5,3,3),COLORAAAAAA;}
散户线: 100*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60)),LINETHICK2,COLOR00FF00;
RSV30:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
K30:=SMA(RSV30,5,1);
D30:=SMA(K30,3,1);
J30:=3*K30-2*D30; 主力线:EMA(J30,6),COLORFFAD1F,LINETHICK2;
RSV21:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))\*100;
K21:=SMA(RSV21,13,8);
趋势:CEILING(SMA(K21,13,8)),COLORRED,LINETHICK1;
0;20;50;80;100;
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# 通达信黄金 MACD 八代指标公式
MACD2:(EXPMA(CLOSE,30)-REF(EXPMA(CLOSE,30),1))/REF(EXPMA(CLOSE,30),1)\*100,COLORSTICK;
DIF2:EMA(SUM(MACD2,2),5),LINETHICK2,COLORFFAD1F;
入 1:IF(DIF2>REF(DIF2,1),DIF2,DRAWNULL),COLORRED,LINETHICK2;
入 2:IF(DIF2<REF(DIF2,1),DIF2,DRAWNULL),COLOR00FF00,LINETHICK2;
DEA2:MA(DIF2,5),COLORWHITE;
1
2
3
4
5
2
3
4
5
# 通达信百战百胜指标
高1:=REF(HHV(H,120),3);
低1:=REF(LLV(L,120),3);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
突破:=REF(EMA(C,14),1);
A1X:=(EMA(C,10)-突破)/突破*100;
JZ:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1)),COLORFFFF00,LINETHICK2;
N1:=100;
KD:=BARSLAST(CURRBARSCOUNT=N1);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,KD),0));
DD:=CONST(IF(ISLASTBAR=1,LLV(L,KD),0));
KJ:=GD-DD;
GD4:=IF(CURRBARSCOUNT<=N1/2,GD,DRAWNULL);
ND:=IF(BARSCOUNT(C)>=8,8,BARSCOUNT(C));
AMOV:=VOL*(C+L+H)/3;
MN:=SUM(AMOV,ND)/SUM(VOL,ND);
AAC:=CROSS(A1X,0),LINETHICK0;
BBC:=CROSS(0,A1X),LINETHICK0;
DRAWICON(AAC,JZ*0.98,34);
DRAWICON(BBC,JZ*1.015,35);
LC:= REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
逃顶:=CROSS(82,RSI);
DRAWICON( 逃顶,H*1.01,15);
DRAWTEXT( 逃顶,H*1.01,' ←快跑'),COLORFFFFFF;
平衡:=IF(CURRBARSCOUNT<=N1,DD+KJ/2,DRAWNULL),COLOR00FFFF,NODRAW;
压力:=IF(CURRBARSCOUNT<=N1,GD-KJ*0.191,DRAWNULL),COLORFF00FF,NODRAW;
支撑:=IF(CURRBARSCOUNT<=N1,DD+KJ*0.191,DRAWNULL),COLOR00FF00,NODRAW;
高区:IF(CURRBARSCOUNT<=N1,GD,DRAWNULL),COLORRED,DOTLINE;
低区:IF(CURRBARSCOUNT<=N1,DD,DRAWNULL),COLOR00FF00,DOTLINE;
A1:=BARSLAST(MONTH!=REF(MONTH,1))+1;
月±%:(CLOSE/REF(CLOSE,A1)-1)*100,COLOR00FFFF,NODRAW;
DRAWKLINE(H,O,L,C);
DRAWTEXT(CURRBARSCOUNT=1,压力,'0.809'),COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=1,平衡,'0.500'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=1,支撑,'0.191'),COLOR00FFFF;
C1:=C>=JZ;
C2:=C<JZ;
AA:=C1>=C2 ;
BB:=C2>C1 ;
STICKLINE(AA,C,O,3,0),COLORRED;
STICKLINE(AA,H,L,0,0),COLORRED;
STICKLINE(BB,C,O,3,0),COLOR00FF00;
STICKLINE(BB,H,L,0,0),COLOR00FF00;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# 通达信成交量指标公式
STICKLINE(VOL/CAPITAL*100<=3,0,3,5,0),COLOR600000;
DRAWBAND(3,RGB(10,20,150),0,RGB(0,0,0));
成交量:V,COLORFFAD1F,NODRAW;
换手:VOL/CAPITAL*100,VOLSTICK;
VAR1B:=EMA(CLOSE,3)-EMA(CLOSE,89);
VAR1C:=EMA(VAR1B,21);
VAR1D:=(VAR1B-VAR1C)*10;
VAR1F:=POW(VAR1D,3)*0.01+POW(VAR1D,2);
拉升:=IF(VAR1D>0.015,VAR1F,0)/25;
STICKLINE(拉升 AND 拉升>0.05,拉升,0,0.2,0),COLOR00DDDD;
STICKLINE(拉升/REF(拉升,1)>2 AND 拉升>0.05,拉升,0,1,0),COLORDD00DD;
DRAWTEXT(拉升/REF(拉升,1)>2 AND 拉升>0.05,拉升,'追'),COLORFFAD1F;
DRAWTEXT_FIX(1,0,0,0,'【黄色柱:大幅缩短需小心,再等机会第二波】'),COLORFFAD1F;
DRAWTEXT_FIX(1,0,0.05,0,'【换手率大于3倍:为空心红柱】'),COLORRED;
DRAWTEXT_FIX(1,0,0.10,0,'【换手率大于10倍:为实芯绿柱】'),COLORGREEN;
DRAWTEXT_FIX(1,0,0.15,0,'【紫色柱:为上涨拉升“追”】'),COLORDD00DD;
DRAWICON(拉升/REF(拉升,1)>5 AND REF(拉升,1)/REF(拉升,2)>5,0.2,9);
DRAWTEXT(拉升/REF(拉升,1)>5 AND REF(拉升,1)/REF(拉升,2)>5,L*0.3,'买'),COLORFFAD1F;
STICKLINE(换手>3,3,换手,-1,1),COLOR0000EE;
STICKLINE(换手>10,10,换手,-1,0),COLORGREEN;
百日低换手:LLV(换手,100)=换手,NODRAW,COLORLIBLUE;
DRAWICON(百日低换手,0.2,11);
DRAWTEXT(百日低换手,L*0.1,'百'),COLORFFAD1F;
DRAWICON(LAST(换手>REF(换手,1),2,0),换手/15,1);
DRAWTEXT(LAST(换手>REF(换手,1),2,0),L*0.1,'加'),COLORFFAD1F;
MA5:MA(换手,5),COLORLIBLUE;
DRAWTEXT(ISLASTBAR AND MA5,MA5,STRCAT('—–五日换手 ',CON2STR(MA5,2))),COLORLIBLUE;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 陈小群
技术指标可以划线,选股指标不能划线。
X_1:=VOL/REF(VOL,1)>=0.95 AND VOL/REF(VOL,1)<=1.05;
X_2:=REF(HHV(VOL,2),1);
X_3:=VOL/X_2>=0.95 AND VOL/X_2<=1.05;
X_4:=REF(HHV(VOL,3),1);
X_5:=VOL/X_4>=0.95 AND VOL/X_4<=1.05;
X_6:=REF(HHV(VOL,4),1);
X_7:=VOL/X_6>=0.95 AND VOL/X_6<=1.05;
X_8:=REF(HHV(VOL,5),1);
X_9:=VOL/X_8>=0.95 AND VOL/X_8<=1.05;
X_10:=REF(HHV(VOL,6),1);
X_11:=VOL/X_10>=0.95 AND VOL/X_10<=1.05;
X_12:=REF(HHV(VOL,7),1);
X_13:=VOL/X_12>=0.95 AND VOL/X_12<=1.05;
X_14:=REF(HHV(VOL,8),1);
X_15:=VOL/X_14>=0.95 AND VOL/X_14<=1.05;
X_16:=REF(HHV(VOL,9),1);
X_17:=VOL/X_16>=0.95 AND VOL/X_16<=1.05;
X_18:=REF(HHV(VOL,10),1);
X_19:=VOL/X_18>=0.95 AND VOL/X_18<=1.05;
X_20:=REF(HHV(VOL,11),1);
X_21:=VOL/X_20>=0.95 AND VOL/X_20<=1.05;
X_22:=REF(HHV(VOL,12),1);
X_23:=VOL/X_22>=0.95 AND VOL/X_22<=1.05;
X_24:=REF(HHV(VOL,13),1);
X_25:=VOL/X_24>=0.95 AND VOL/X_24<=1.05;
X_26:=X_25 OR X_23 OR X_21 OR X_19 OR X_17 OR X_15 OR X_13 OR X_11 OR X_9 OR X_7 OR X_5 OR X_3 OR X_1;
X_27:=100;
X_28:=100*(VOL-LLV(VOL,X_27))/(HHV(VOL,X_27)-LLV(VOL,X_27));
X_29:=13;
X_30:=100*(VOL-LLV(VOL,X_29))/(HHV(VOL,X_29)-LLV(VOL,X_29));
倍量:VOL>=REF(VOL,1)*1.8,COLORYELLOW;
低量:VOL<=HHV(VOL,13)*0.33 OR X_30<5 AND VOL<REF(VOL,1),COLORMAGENTA;
地量:VOL<=MA(LLV(VOL,100),100) OR (X_28<4 AND VOL<REF(VOL,1)),COLORGREEN;
平量:X_26,COLORWHITE;
倍缩:VOL<=REF(VOL,1)*0.55,COLORRED;
缩量涨:COUNT(CLOSE>REF(CLOSE,1),2)=2 AND COUNT(VOL<REF(VOL,1),2)=2,COLORBLUE;
STICKLINE(CLOSE>OPEN,0,VOL,1.2,1),COLORRED;
STICKLINE(CLOSE<=OPEN,0,VOL,2,0),COLORLIBLUE;
STICKLINE(平量,0,VOL,1,0),COLORRED;
STICKLINE(倍量,0,VOL,1.2,0),COLORYELLOW;
STICKLINE(倍缩,0,VOL,2,0),COLORRED;
STICKLINE(低量,0,VOL,2,0),COLORMAGENTA;
STICKLINE(地量,0,VOL,1,0),COLORGREEN;
STICKLINE(缩量涨,0,VOL,1,0),COLORBLUE;
DRAWTEXT(倍量,VOL*1.09,'倍'),COLORYELLOW;
X_31:=(3*CLOSE+HIGH+LOW+OPEN)/6;
X_32:=(8*X_31+7*REF(X_31,1)+6*REF(X_31,2)+5*REF(X_31,3)+4*REF(X_31,4)+3*REF(X_31,5)+2*REF(X_31,6)+REF(X_31,8))/36;
X_33:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>X_32 AND CLOSE>OPEN;
黄金柱:FILTER(X_33,5),STICK,COLORRED;
STICKLINE(黄金柱,0,VOL,1.8,0),COLORRED;
DRAWTEXT(黄金柱,VOL*1.23,'黄'),COLORRED;
X_34:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
X_35:=VOL;
主买:IF(CLOSE>OPEN,X_34*(HIGH-LOW),IF(CLOSE<OPEN,X_34*(HIGH-OPEN+(CLOSE-LOW)),VOL/2)),NODRAW,COLORRED;
主卖:IF(CLOSE>OPEN,0-X_34*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,0-X_34*(HIGH-LOW),0-VOL/2)),POINTDOT,COLORGREEN;
STICKLINE(主卖<0,0,主卖,1,0),COLORGREEN;
DRAWTEXT(VOL=HHV(VOL,0),HHV(VOL,30)*0.918,'天量'),COLORWHITE;
MAV5:MA(VOL,5),COLORRED;
MA35:MA(VOL,35),COLORLIBLUE;
MAV120:MA(VOL,120),COLORYELLOW,LINETHICK2;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# 主力建仓指标
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
趋势线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14
*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8
*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)
+2*REF(MID,18)+REF(MID,20))/210,COLORRED;
买卖线:MA(趋势线,6),COLORGREEN;
支撑线:MA(趋势线,2),COLOR00CCCC;
STICKLINE(趋势线>=买卖线 AND C<O,C,O,2.8,0),COLORRED;
STICKLINE(趋势线>=买卖线 AND C>O,C,O,2.8,1),COLORRED;
STICKLINE(趋势线>=买卖线,H,MAX(C,O),0,0),COLORRED;
STICKLINE(趋势线>=买卖线,L,MIN(C,O),0,0),COLORRED;
STICKLINE(趋势线<买卖线 AND C<O,C,O,2.8,0),COLOR0066CC;
STICKLINE(趋势线<买卖线 AND C>O,C,O,2.8,1),COLOR0066CC;
STICKLINE(趋势线<买卖线,H,MAX(C,O),0,0),COLOR0066CC;
STICKLINE(趋势线<买卖线,L,MIN(C,O),0,0),COLOR0066CC;
DRAWTEXT(CROSS(趋势线,买卖线),L*0.99,'主力建仓'),COLORRED;
DRAWTEXT(CROSS(买卖线,趋势线),H*1.01,'主力离场'),COLOR0066CC;
DRAWTEXT(趋势线>=买卖线 AND ISLASTBAR,H+0.05*H,'持有'),COLORRED;
DRAWTEXT(趋势线<买卖线 AND ISLASTBAR,L-0.05*L,'观望'),COLORGREEN;
{
STICKLINE(红色持股,CLOSE,O,2.8,0),COLOR000055;
STICKLINE(红色持股,CLOSE,O,2,0),COLOR000088;
STICKLINE(红色持股,CLOSE,O,1.5,0),COLOR0000AA;
STICKLINE(红色持股,CLOSE,O,1,0),COLOR0000CC;
STICKLINE(红色持股,CLOSE,O,0.5,0),COLOR0000EE;
STICKLINE(青色观望,CLOSE,O,2.8,0),COLOR555500;
STICKLINE(青色观望,CLOSE,O,2,0),COLOR888800;
STICKLINE(青色观望,CLOSE,O,1.5,0),COLORAAAA00;
STICKLINE(青色观望,CLOSE,O,1,0),COLORCCCC00;
STICKLINE(青色观望,CLOSE,O,0.5,0),COLOREEEE00;
}
VAR0:=SMA(MAX(CLOSE-REF(C,1),0),12,1)/SMA(ABS(CLOSE-REF(C,1)),15,1)*100;
{DRAWTEXT(CROSS(82,VAR0),H*1.04,'快卖'),COLORWHITE;}
S:=C-REF(C,1);
DX:=100*EMA(EMA(S,6),6)/EMA(EMA(ABS(S),6),6);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
{DRAWTEXT(FILTER(买=1,5),L*0.96,'拉升'),COLORFFDE00;}
DA:=(EMA(C,1)+EMA(C,2)+EMA(C,3)+EMA(C,4))/4;
DB:=(EMA(C,10)+EMA(C,20)+EMA(C,40)+EMA(C,80))/4;
{DRAWICON(CROSS(DA-DB,0),L*0.98,7);}
JH:=SMA(MAX(C-REF(C,1),0),5,1)/SMA(ABS(C-REF(C,1)),5,1)*100;
{DRAWICON(CROSS(84,JH),H*1.04,8);}
字:=STRCAT(STRCAT(STRCAT(STRCAT('名称: ',STKNAME),' 代码: '),CODE),' ' );
板块:=STRCAT('概念板块: ',GNBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.65,0,0,STRCAT(字,板块)),COLOR00CCCC;
YC:=REF(CLOSE,1);
止损价位:=(YC*1.0035*97+0.2)/99.65;
E:=(HIGH+LOW+OPEN+2*CLOSE)/5;
明日阻力:=2*E-LOW;
明日支撑:=2*E-HIGH;
明日突破:=E+(HIGH-LOW);
明日反转:=E-(HIGH-LOW);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
{DRAWTEXT_FIX(C!=0,0.8,0.05,0,STRCAT('今日阻力: ',STRCAT(CON2STR(今日阻力,2),' 元'))),COLORFFFF00;
DRAWTEXT_FIX(C!=0,0.8,0.1,0,STRCAT('今日支撑: ',STRCAT(CON2STR(今日支撑,2),' 元'))),COLORRED;
DRAWTEXT_FIX(C!=0,0.8,0.15,0,STRCAT('明日突破: ',STRCAT(CON2STR(明日突破,2),' 元'))),COLORFF00FF;
DRAWTEXT_FIX(C!=0,0.8,0.2,0,STRCAT('明日阻力: ',STRCAT(CON2STR(明日阻力,2),' 元'))),COLORFFFF00;
DRAWTEXT_FIX(C!=0,0.8,0.25,0,STRCAT('明日支撑: ',STRCAT(CON2STR(明日支撑,2),' 元'))),COLORRED;
{DRAWTEXT_FIX(C!=0,0.8,0.3,0,STRCAT('明日反转: ',STRCAT(CON2STR(明日反转,2),' 元'))),COLOR00CCCC;}
A:=HHV(HIGH,13)=HIGH AND HIGH>REF(HIGH,1);
A1:=FILTER(A,12);
B:=LLV(LOW,13)=LOW AND LOW<REF(LOW,1);
B1:=FILTER(B,12);
TS1:=BARSLAST(A1);
箱顶:REF(HIGH,TS1),COLORFF00FF,NODRAW;
{STICKLINE(1,箱顶,箱顶,1.5,0),COLORFF00FF;
TS2:=BARSLAST(B1);
箱底:REF(LOW,TS2),COLORFFBB80,NODRAW;
STICKLINE(1,箱底,箱底,1.5,0),COLORFFBB80;
箱高:100*(箱顶-箱底)/箱底,NODRAW;}
均价:=(3*C+H+L+O)/6;
VAR1:=(8*均价+7*REF(均价,1)+6*REF(均价,2)+5*REF(均价,3)+
4*REF(均价,4)+3*REF(均价,5)+2*REF(均价,6)+REF(均价,8))/36;
VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND CLOSE>VAR2 AND CLOSE<VAR1;
SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1)
AND CLOSE<VAR2) OR (VAR1>VAR2 AND VAR1<REF(VAR1,1)
AND VAR2<REF(VAR2,1) AND CLOSE<VAR2);
SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<VAR2;
XD1:=VAR1=VAR2 AND CLOSE<VAR2 OR (VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1)
AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<VAR2);
XD2:=VAR1=VAR2 AND CLOSE>VAR1;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能饱和度:=IF(SAT>1,1,SAT)*100;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94