通达信指标公式源码分时波段指标
做波段很不错的指标通达信指标公式源码
做波段很不错的指标通达信指标公式源码通达信(TDX)是国内知名的股票分析软件,采用C语言开发。
在TDX中,可以通过编写指标公式实现自定义技术指标。
下面是一个使用通达信指标公式源码实现的简单的波段指标示例。
```javascript#include "stdio.h"//定义波段指标计算函数void BollingerBands(int n, double *close, double *upper_band, double *middle_band, double *lower_band)int i, j;double sum, sum_squares, sd, temp;//计算SMA(简单移动平均线)for(i=n-1; i<total_bars; i++)sum = 0;for(j=i-n+1; j<=i; j++)sum += close[j];}middle_band[i] = sum/n;}//计算标准差for(i=n-1; i<total_bars; i++)sum = 0;sum_squares = 0;for(j=i-n+1; j<=i; j++)temp = close[j] - middle_band[i];sum += temp;sum_squares += temp * temp;}sd = sqrt(sum_squares / n);upper_band[i] = middle_band[i] + 2 * sd;lower_band[i] = middle_band[i] - 2 * sd;}int maiint n = 20; // 计算波段指标使用的周期长度double close[] = {1.2, 1.5, 1.4, 1.6, 1.8, 1.7, 1.9, 1.8, 1.7, 1.6}; // 收盘价数据//计算波段指标double upper_band[10], middle_band[10], lower_band[10];BollingerBands(n, close, upper_band, middle_band, lower_band);//打印波段指标结果printf("Upper Band:\n");for(int i=0; i<10; i++)printf("%.2f ", upper_band[i]);}printf("\n");printf("Middle Band:\n");for(int i=0; i<10; i++)printf("%.2f ", middle_band[i]);}printf("\n");printf("Lower Band:\n");for(int i=0; i<10; i++)printf("%.2f ", lower_band[i]);}printf("\n");return 0;```以上代码实现了一个简单的波段指标计算函数BollingerBands,并在主函数中进行了调用和打印结果。
通达信指标公式源码波段鬼王指标公式
通达信波段鬼王指标公式{Z波段鬼王Z}VAR4:=100-ABS((C-MA(C,13))/MA(C,13)*100);VARC:=100-KDJ.J(75,20,15);看我实力:(100-KDJ.J(75,20,15)),LINETHICK6,COLORRED ;散户:MA(WINNER(CLOSE*0.95)*100,3),COLORYELLOW;新庄:(100-IF(1/WINNER(C)>5,IF(1/WINNER(C)<100,1/WINNER(C),VAR4-10),0) ), ,COLORGREEN;VARD:=散户>VAR4;VARE:=REF(L,1)*0.9;VARF:=LOW*0.9;VAR10:=(VARF*V+VARE*(CAPITAL-V))/CAPITAL;VAR11:=EMA(VAR10,30);VAR15:=RSI.RSI1(7,13,13);VAR16:=RSI.RSI2(7,13,13);VAR17:=BARSCOUNT(C);VAR19:=100-2*WR.WR1(60,60);VAR1B:=SMA((KDJ.K(15,4,4)-50)*2,3,1);VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; VAR1D:=SMA(VAR1C,4,1);VAR1E:=SMA(VAR1D,3,1);VAR1F:=(HHV(H,30)-C)/C*100;VAR20:=RSI.RSI1<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR11-CLOSE>=-0.25 AND VAR15<22 AND VAR16<28 AND VAR17>50;VAR22:=((H+L+C)/3-MA((H+L+C)/3,14))/(0.015*AVEDEV((H+L+C)/3,14)); VAR23:=((H+L+C)/3-MA((H+L+C)/3,70))/(0.015*AVEDEV((H+L+C)/3,70)); VAR24:=IF(VAR22>=150 AND VAR22<200 AND VAR23>=150 ANDVAR23<200,10,0);VAR25:=IF(VAR22<=-150 AND VAR22>-200 AND VAR23<=-150 ANDVAR23>-200,-10,VAR24);绝处逢生: IF(VAR23>=200 AND VAR22>=150,15,IF(VAR23<=-200 AND VAR22<=-150,-15,VAR25))+50,LINETHICK2,CROSSDOT;STICKLINE(VARD,VAR4,散户,5,0), , COLORRED;STICKLINE(1,散户,0,1,0), ,COLORYELLOW;STICKLINE(1,新庄,100,1,0), , COLORGREEN;STICKLINE(VAR20,0,80,5,0),LINETHICK3,COLORRED,;DRAWTEXT(CROSS(VAR20,0.5) AND COUNT(VAR20=1,10)=1,60,'有钱不赚傻!'),LINETHICK7 , COLORYELLOW;DRAWTEXT(CROSS(VARD,0.5) AND COUNT(VARD=1,10)=1,70,'**我走啦!!!'),LINETHICK7 , COLORGREEN;波段王:KDJ.D(27,3,3),LINETHICK2 ;波段鬼: SMA(KDJ.D(27,3,3),3,1),LINETHICK2 , COLORYELLOW;地狱: IF(CROSS(波段王,波段鬼) AND 波段王<40,35,0),LINETHICK2 , COLORRED;天堂: IF(CROSS(波段鬼,波段王) AND 波段鬼>75,70,100),LINETHICK2 , COLORGREEN;DRAWTEXT(CROSS(波段王,波段鬼) AND 波段王<40,25,'逢低吸呐'),LINETHICK4 , COLORWHITE;DRAWTEXT(CROSS(波段鬼,波段王) AND 波段鬼>75,85,'减磅是老师!'),LINETHICK4 ;。
通达信分时指标汇总(主图 源码 通达信
做短线看盘分时指标的参考很重要,而通达信分时指标只有一个MACD指标,如何盘中即时更换分时技术指标?方法如下:1.找到安装目录里面T0002文件夹下的user文件,2.用记事本方式打开找到Zstzb=MACD这一项改为=AAA,(由上往下点大约到98行位置,如图1),3.将你准备用作分时指标的公式改为AA开头的公式名。
4.进入K线分析图用键盘输入AA即可跳出AA开头的公式(如图2)。
5.选择你要用作分时指标的公式点击进入改名为AAA保存(如图3-4),6.回到分时分析图点技术指标即可(如图5)。
7如需更换其它指标时直接键入AAA进入该公式修改为另外的公式名,再重复4,5,6项即可通达信分时指标汇总通达信分时指标(虎主力散户)虎: (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100, COLORSTICK;主力:EXPMA( (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1) *100,120)-0.0004,LINETHICK5,COLORMAGENTA;散户:EXPMA( (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1) *100,200),LINETHICK5,COLORGREEN;DRAWICON(CROSS(EXPMA(虎,120)-0.0004,EXPMA(虎,200)),EXPMA(虎,200)*1,13); DRAWICON(CROSS(EXPMA(虎,200),EXPMA(虎,120)-0.0004),EXPMA(虎,200)*1,2);Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05, 0.95);Q2:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BAR SCOUNT(C))));DRAWICON(CROSS((C/Q2),1.03),0.02,6);STICKLINE(CROSS((C/Q2),1.03),0.02,0,4,0), , COLORYELLOW;通达信分时指标分时专用指标,55上红柱谨慎看多, 50下绿柱保持警惕,结合多(黄)空(绿)线,选择正确操作时段,按照图中提示关注,严格遵守操作纪律, 心态平衡投资顺利.希望大家能得到好的收益!Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05, 0.95);天:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BAR SCOUNT(C))));DRAWICON(CROSS((C/天),1.01),25,3);STICKLINE(CROSS((C/天),1.01),25,0,2,0), ,COLORYELLOW;VAR1:=REF(CLOSE,3.5);VAR2:=REF(CLOSE,1);VAR3:=SMA(MAX(CLOSE-VAR2,0),7,1)/SMA(ABS(CLOSE-VAR2),7,1)*100;Q2:=(CLOSE-LLV(LOW, 21))/(HHV(HIGH, 21)-LLV(LOW, 21))*100;Q3:=SMA(Q2, 9, 1);Q4:=SMA(Q3, 3, 1);Q8:=HHVBARS(HIGH, 50);Q10:=(CLOSE-REF(OPEN, Q8))/REF(OPEN, Q8)*100;快线: SMA(MAX(CLOSE-VAR1,0),7,1)/SMA(ABS(CLOSE-VAR1),7,1)*100,COLORFFAA66; 慢线:EMA(Q3, 3),COLORRED;DRAWBAND(快线,RGB(115,95,120),慢线,RGB(95,120,115));A:=VOL*CLOSE;B:=SUM(A,3.52)/SUM(VOL,3.82);B1:=EMA(B,13);主力线:(B-B1)*191/B+50,COLORMAGENTA;多头:3*Q3-2*Q4,COLORRED;VAR12:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;空头: SMA(VAR12,3,1),COLORGREEN;DRAWTEXT(CROSS(慢线, 多头) AND REF(多头,1)>80, REF(多头,3), '*顶'),COLORRED,LINETHICK5;●关注: DRAWTEXT(REF(CROSS(空头,慢线),25) AND 空头>1.005*慢线,慢线,'●关注'),COLORBLUE,LINETHICK1;★关注: DRAWTEXT(REF(CROSS(慢线,多头),82) AND 慢线>1.3*多头,多头,'★关注'),LINETHICK1;★追涨: DRAWTEXT(REF(CROSS(多头,慢线),1) AND 多头>1.3*慢线,慢线,'★追涨'),COLORRED,LINETHICK1;★抄底:IF(CROSS(多头,慢线) AND 快线>=REF(快线,1) AND 多头>=REF(多头,1) AND 慢线<38.2 AND 慢线>=REF(慢线,1) AND COUNT(REF(快线,1)=2,30,0),COLORMAGENTA;DRAWTEXT(CROSS(多头, 8) AND Q10<-13,20,'*大底'),COLORYELLOW,LINETHICK5; ★逃亡:IF(快线< REF(快线,1) AND 快线>61.8,70,100),COLORBLUE;50,POINTDOT,COLORWHITE;AZ1:=AMOUNT/VOL/100;AZ2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;AZ3:=SUM(AMOUNT,40)/AZ1/100;AZ4:=SUM(AMOUNT,80)/AZ1/100;BZ1:=DMA(AZ2,VOL/AZ3);BZ2:=DMA(AZ2,VOL/AZ4);BZ3:=(CLOSE-BZ1)/BZ1*100;BZ4:=(CLOSE-BZ2)/BZ2*100;DRAWTEXT(ISLASTBAR AND C,93,' 冷眼分时专用指标'),COLOR00AAFF; DRAWTEXT(ISLASTBAR AND C,80,' 55上红柱谨慎看多'),COLOR00BBBB; DRAWTEXT(ISLASTBAR AND C,68,' 50下绿柱保持警惕'),COLOR00BBBB; DRAWTEXT(ISLASTBAR AND C,56,' 结合多(黄)空(绿)线'),COLOR00BBBB; DRAWTEXT(ISLASTBAR AND C,44,' 选择正确操作时段'),COLOR00BBBB; DRAWTEXT(ISLASTBAR AND C,32,' 按照图中提示关注'),COLOR00BBBB; DRAWTEXT(ISLASTBAR AND C,20,' 严格遵守操作纪律'),COLOR00BBBB; DRAWTEXT(ISLASTBAR AND C,8,' 心态平衡投资顺利'),COLOR00BBBB;STICKLINE(FILTER(C,60)>0,100,-0,0,0),COLORRED;STICKLINE(BZ4>0,50,50+13.82*BZ4,0,0),COLORYELLOW;STICKLINE(BZ3>0,50,50+13.82*BZ3,0,0),COLORRED;STICKLINE(BZ3<=0,50,50+13.82*BZ3,0,0),COLORGREEN;[通达信L-2] 动态买进通达信分时指标动态买进VAR0:=VOL/CLOSE/2;VAR1:=SUM(IF(VAR0 > 100 AND CLOSE > REF(CLOSE,1),VAR0,0),0);VAR2:=SUM(IF(VAR0 > 100 AND CLOSE < REF(CLOSE,1),VAR0,0),0);VAR3:=SUM(IF(VAR0 < 100 AND CLOSE > REF(CLOSE,1),VAR0,0),0);VAR4:=SUM(IF(VAR0 < 100 AND CLOSE < REF(CLOSE,1),VAR0,0),0);VAR5:=VAR1 + VAR2 + VAR3 + VAR4;VAR6:=IF(CURRBARSCOUNT,100 * VAR1/VAR5,0);VAR7:=IF(CURRBARSCOUNT,100 * VAR2/VAR5,0);VAR8:=IF(CURRBARSCOUNT,100 * VAR3/VAR5,0);VAR9:=IF(CURRBARSCOUNT,100 * VAR4/VAR5,0);机构买盘:VAR1,LINETHICK2,COLORFF55FF;机构卖盘:VAR2,LINETHICK2,COLORFFFF55;散户买盘:VAR3,COLOR5555FF;散户卖盘:VAR4,COLOR55FF55;自用分时(通达信分时指标副图、源码、贴图MA30:=EMA(CLOSE,30);{强弱:EMA(CLOSE,900);STICKLINE((MA30>强弱),MA30,强弱,1,0),COLOR0000FF;STICKLINE((MA30<强弱),MA30,强弱,1,0),COLOR00FF00;}H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:L1+P1*7/8,COLOR00DD00;支撑:L1+P1*0.5/8,COLOR00DD00;现价:CLOSE,COLORWHITE,LINETHICK1;STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW; DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'买'),COLORYELLOW;{吸} DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★卖'),COLORRED;{抛};日时转换:=IF(PERIOD=5,120,240);QZS:=(EMA(CLOSE,10)+EMA(CLOSE,32))/2;VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;VAR2:=(EMA(VOL,10)+EMA(VOL,32))/2;VAR3:=(VAR1+VAR2)/2;VAR4:=EMA(VAR3,30);VAR5:=EMA(VAR3,60);VAR6:=EVERY(VAR1>REF(VAR1,1),5) AND EVERY(VAR4>REF(VAR4,1),5); DRAWBAND(VAR1,RGB(150,30,30),EMA(VAR1,60),RGB(0,110,30));牵引线:VAR1,COLORYELLOW;强弱线:EMA(VAR1,日时转换),POINTDOT,COLORWHITE;趋势关注:IF(CROSS(VAR1,EMA(VAR1,60)) AND VAR6,1,0),NODRAW,COLORRED;量价关注:IF(CROSS(VAR3,VAR5) AND VAR6,1,0),NODRAW,COLORWHITE;冲击量:IF(VAR3>VAR5 AND VAR6,1,0),NODRAW,COLORYELLOW;强势区:IF(VAR1>强弱线,1,DRAWNULL),NODRAW,COLORRED;止损区:IF(VAR1<强弱线,1,DRAWNULL),NODRAW,COLORGREEN;STICKLINE(QZS>VAR1,QZS,VAR1,1,0),COLORFF00FF;STICKLINE(冲击量=1,QZS,VAR1,1,0),COLORYELLOW;DRAWICON(趋势关注=1,EMA(VAR1,60),13);DRAWTEXT(量价关注=1,EMA(VAR1,60),'★'),COLORWHITE;通达信分时指标WW:3*SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,10,1),LINESTICK; 40;250;300;分时有庄(通达信分时指标源码VAR1:=EMA(EMA(CLOSE,13),13);控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;STICKLINE(控盘<0,控盘,0,1,1),COLOR00FF00;STICKLINE(控盘>REF(控盘,1) AND 控盘<0,控盘,0,1,1),COLORFF00FF;无庄控盘:=控盘<0;STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,1,1),COLOR0000FF;有庄控盘:=控盘>REF(控盘,1) AND 控盘>0;VAR2:=100*WINNER(CLOSE*0.95);STICKLINE(控盘0,控盘,0,1,1),COLORFFFF00;主力出货:=控盘0;STICKLINE(VAR2>50 AND COST(85)0,控盘,0,1,1),COLOR00FFFF;高度控盘: VAR2>50 AND COST(85)0,COLOR00FFFF,LINETHICK2;A10:=CROSS(控盘,0);控盘B:=FILTER(IF(A10,1,0),5);{分时价格原码}JJ:=DYNAINFO(11);{波段买卖原码}P:=55;S:=8;M1:=3;财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10,COLORRED,LINETHICK2;神:=EMA(财,M1),COLORGREEN,LINETHICK1;DRAWBAND(财,RGB(255,0,0),神,RGB(0,100,50));{股价与均线偏离买卖条件}BTJ1:=(C-JJ)/JJ<-0.03;BTJ11:=(C-JJ)/JJ<-0.03;BTJ12:=LAST(JJ>=REF(JJ,1),5,1) AND (C-JJ)/JJ<0.005;STJ1:=(C-JJ)/JJ>0.005;{控盘买卖条件}STJ01:=控盘0.5;STJ02:=控盘>0;BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;BTJ22:=控盘>REF(控盘,1) AND 控盘<0 ;{波段买卖条件}BTJ3:=CROSS(财,神) AND 财<-0.3;BTJ32:=CROSS(财,神) AND 财<-0.1;STJ31:=CROSS(神,财);STJ32:=CROSS(神,财) AND 财>1.618;{以下为信号};BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,13);BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,13);DRAWTEXT(BTJ81,神,'↑买底'),COLORRED;DRAWTEXT(BTJ811,神*1.2,'↑有庄'),COLORWHITE;STJ81:=FILTER(STJ1 AND STJ01 AND STJ31,13);STJ82:=FILTER(STJ02 AND STJ32 ,13);STJ83:=STJ81 AND STJ82;DRAWTEXT(STJ83,神,'↓卖'),COLOR00FF00;DIFF: (EMA(CLOSE,8) - EMA(CLOSE,55))*10,COLORRED;DEA: EMA(DIFF,3),COLORGREEN;庄:= BTJ11 AND BTJ2 AND BTJ3;有庄:FILTER(庄,55),COLORWHITE;DRAWTEXT(BTJ811,有庄,'有庄'),COLORWHITE;分时买卖图(通达信分时指标源码图中分时买卖图,能看懂分时均价线的那就跳过,对分时走势均价图没有一定的功力,最好不要用,此指标有未来慎用!欣赏下还行。
通达信指标公式源码分时主图指标
通达信指标公式源码分时主图指标通达信是一款流行的股票行情软件,拥有丰富的指标公式库。
下面是一些常见的通达信指标公式源码,这些公式可以用于绘制分时主图指标。
1.均线:均线是最常见的技术指标之一,它代表了一段时间内的平均价格。
通达信中绘制均线的公式如下:MA(N):N日均线MA(N,X):N日均线,显示为实线,X为线宽度具体实现如下:MA(N):REF(C,N)MA(N,X):MA(N)其中,C代表收盘价,N代表计算的天数,REF函数是通达信的内置函数,用于获取前N天的数据。
2.成交量:成交量是衡量市场活跃度的指标之一,可以使用以下公式绘制成交量:VOL:成交量具体实现如下:VOL:V其中,V代表成交量。
3.平均成交量:平均成交量是一种相对成交量指标,可以用来衡量一些时间段内股票成交量的相对活跃程度。
在通达信中,可以使用以下公式绘制平均成交量:MAVG(VOL,N):N日平均成交量具体实现如下:MAVG(VOL,N):MA(VOL,N)其中,N代表计算的天数。
4.布林线:布林线是一种用来衡量股票价格波动性的指标,它由三条线组成,分别是上轨线、中轨线和下轨线。
在通达信中,可以使用以下公式绘制布林线:BOLL(M,N):中轨线UB(M,N,K):上轨线LB(M,N,K):下轨线具体实现如下:BOLL(M,N):MA(C,N)UB(M,N,K):MA(C,N)+K*STDEV(C,N)LB(M,N,K):MA(C,N)-K*STDEV(C,N)其中,C代表收盘价,M代表计算的天数,N代表计算的天数,K是标准差系数。
5.相对强弱指标(RSI):RSI是一种相对强弱指标,用于衡量市场的超买超卖情况。
在通达信中,可以使用以下公式绘制RSI:RSI(N):N日相对强弱指标具体实现如下:RSI(N):RSI(C,N)其中,C代表收盘价,N代表计算的天数。
以上是通达信中常见的分时主图指标公式源码,可以根据需要进行相应的调整和修改。
通达信指标公式源码 好用分时突破指标
均线:IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW, LINETHICK1;均线H:=(均线*1.007 ),COLORLICYAN;均线L:=(均线/1.005 ),COLORWHITE;均线横盘:=C<均线H AND C>均线L;放量:=SUM(VOL,6)>REF(MA(VOL,30),1)*10;横盘:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/ CLOSE)<1;收:DYNAINFO( 3),COLORWHITE,LINETHICK2;横涨:=横盘AND 放量AND (C>均线H);横跌:=横盘AND 放量AND CROSS(均线L,C) ;突破:=FILTER(横涨,100);下破:=FILTER(横跌,50) ;DRAWTEXT(突破,C*1.01,'突破'),COLORWHITE;现价:C,COLORWHITE;AA:=MA((2*CLOSE+HIGH+LOW)/4,5);谷1:AA*102/100,COLORMAGENTA;BGTYU:=IF(DATE<=1130107,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOS E*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95); VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU)) ),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUN T((DCLOSE*BGTYU)))));DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),现价*0.98,'买进'),COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),现价*0.99,1);DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/V BNH),120)),现价,'主穿散')COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),现价*0.98,55),COLORWHITE;MA30:=EMA(CLOSE,30);强弱界定:=EMA(CLOSE,900);DRAWICON(CROSS(MA30,强弱界定),现价*0.98,34);VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;VAR2:=(EMA(VOL,10)+EMA(VOL,32))/2;VAR3:=(VAR1+VAR2)/2;VAR4:=EMA(VAR3,30);VAR5:=EMA(VAR3,60);VAR6:=EVERY(VAR1>REF(VAR1,1),5) AND EVERY(VAR4>REF(VAR4,1),5);趋势关注:=IF(CROSS(VAR1,EMA(VAR1,60)) ANDVAR6,1,0);DRAWBAND(VAR1*0.96,RGB(150,30,30),EMA(VAR1,60)*0.96,RGB( 0,110,30));DRAWTEXT(趋势关注=1,C*0.97,'转折'),COLORWHITE;DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA:=EMA(DIFF,9),COLORFFFF00;MACD:=(DIFF-DEA)*2;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA);DRAWTEXT(底背离,L*0.98,'↖底背'),COLORYELLOW; GDK:=(SMA(C,2,1)-SMA(C,6,1))*8;ZSR:DYNAINFO( 3)*0.96;STICKLINE(GDK>0,ZSR,ZSR+GDK,0,0) ,COLORRED;STICKLINE(GDK<=0,ZSR,ZSR+GDK,0,0) ,COLORGREEN;STICKLINE(GDK>0 ,ZSR+GDK*0.05,ZSR+GDK*0.15,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.2,ZSR+GDK*0.35,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.4,ZSR+GDK*0.55,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.6,ZSR+GDK*0.75,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.8,ZSR+GDK*0.95,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.86,ZSR+GDK*0.999,0,0) ,COLORRED; STICKLINE(GDK<=0 ,(ZSR+GDK*0.05),(ZSR+GDK*0.15),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.2),(ZSR+GDK*0.35),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.4),(ZSR+GDK*0.55),0,0),COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.6),(ZSR+GDK*0.75),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.8),(ZSR+GDK*0.95),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.86),(ZSR+GDK*0.999),0,0) ,COLORGREE N;均价:DYNAINFO(11),COLORGREEN,DOTLINE;神奇:=HHV(MA(H,13),45),COLORGREEN,LINETHICK4;奇特:=LLV(MA(H,13),1),COLORWHITE;STICKLINE(神奇=奇特,DYNAINFO( 3)*0.935,DYNAINFO( 3)*0.938,2,1),COLORMAGENTA;MA25:= EMA(CLOSE,25);牛熊分水岭:=EMA(CLOSE,905);STICKLINE((MA25 > 牛熊分水岭),DYNAINFO( 3)*0.925,DYNAINFO( 3)*0.928,4,0),COLORRED; 均线2:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW; 均线H1:=(均线2*1.005 ),COLORFF6600;均线L1:=(均线2/1.002 ),COLOR00FF00;均线横盘1:=C<均线H1 AND C>均线L1;STICKLINE(均线横盘1,DYNAINFO( 3)*0.921,DYNAINFO( 3)*0.923,3,0),COLORYELLOW;。
多空分时通达信指标公式源码
多空分时通达信指标公式源码
多空分时指标(DMI)是一种技术分析指标,用于判断股价的上涨或下跌趋势的强弱,以及市场的多头或空头力量的对比。
下面是通达信的多空分时指标公式源码。
公式1:上升动量值(DM+)
DM+=最高价-前一日最高价
公式2:下降动量值(DM-)
DM-=前一日最低价-最低价
公式3:真实波幅(TR)
TR=MAX(MAX(最高价-最低价,ABS(最高价-前一日收盘价)),ABS(最低价-前一日收盘价))
公式4:上升方向指标(+DI)
+DI=N日内DM+的总和/N日内TR的总和*100
公式5:下降方向指标(-DI)
-DI=N日内DM-的总和/N日内TR的总和*100
公式6:相对方向指标(DX)
DX=ABS(+DI-(-DI))/(+DI+(-DI))*100
公式7:平均动向指标(ADX)
ADX=MA(DX,M)
其中,N为计算DMI指标的周期,M为计算ADX指标的周期。
上述源码为通达信的多空分时指标公式,使用该源码可以在通达信软件上计算多空分时指标。
需要注意的是,该源码中的计算方式可能与其他软件中的指标计算方式存在差异,请根据实际需求进行相应的调整。
通达信指标公式源码 波段操作的选择 主图 源码
T:=(C+L+H)/3;SL:=((REF(T,1)*REF(V,1)+T*V)/(REF(V,1)+V));VV:=SL;Y911:=IFF(CURRBARSCOUNT=1, (XMA(VV,9)*9-MA(VV,8)+MA(VV,7)-MA(VV,6)+MA(VV,5) -MA(VV,4)+MA(VV,3) -MA(VV,2) +VV)/9,XMA(VV,9)); Y912:=IFF(CURRBARSCOUNT=1, (XMA(Y911,9)*9-MA(Y911,8)+MA(Y911,7) -MA(Y911,6)+MA(Y911,5) -MA(Y911,4)+MA(Y911,3) -MA(Y911,2)+Y911)/9,XMA(Y911,9));Y913:=IFF(CURRBARSCOUNT=1, (XMA(Y912,9)*9-MA(Y912,8)+MA(Y912,7) -MA(Y912,6)+MA(Y912,5) -MA(Y912,4)+MA(Y912,3) -MA(Y912,2)+Y912)/9,XMA(Y912,9));中期趋势:Y913,LINETHICK2,COLORGREEN;Y291:=IFF(CURRBARSCOUNT=1,(XMA(VV,29)*29-MA(VV,28)+MA(VV,27)-MA (VV,26)+MA(VV,25)-MA(VV,24)+MA(VV,23)-MA(VV,22)+MA(VV,21)-MA(VV,20 )+MA(VV,19)-MA(VV,18)+MA(VV,17)-MA(VV,16)+MA(VV,15)-MA(VV,14)+MA( VV,13)-MA(VV,12)+MA(VV,11) -MA(VV,10)+MA(VV,9) -MA(VV,8)+MA(VV,7) -MA(VV,6)+MA(VV,5) -MA(VV,4)+MA(VV,3) -MA(VV,2)+VV)/29,XMA(VV,29)); Y292:=IFF(CURRBARSCOUNT=1,(XMA(Y291,29)*29-MA(Y291,28)+MA(Y291, 27)-MA(Y291,26)+MA(Y291,25)-MA(Y291,24)+MA(Y291,23)-MA(Y291,22)+MA(Y291,21)-MA(Y291,20)+MA(Y291,19)-MA(Y291,18)+MA(Y291,17)-MA(Y291,16)+MA(Y291,15)-MA(Y291,14)+MA(Y291,13)-MA(Y291,12)+MA(Y291,11) -MA(Y291,10)+MA(Y291,9) -MA(Y291,8)+MA(Y291,7)-MA(Y291,6)+MA(Y291,5) -MA(Y291,4)+MA(Y291,3)-MA(Y291,2)+Y291)/29,XMA(Y291,29));Y293:=IFF(CURRBARSCOUNT=1,(XMA(Y292,29)*29-MA(Y292,28)+MA(Y292, 27)-MA(Y292,26)+MA(Y292,25)-MA(Y292,24)+MA(Y292,23)-MA(Y292,22)+M A(Y292,21)-MA(Y292,20)+MA(Y292,19)-MA(Y292,18)+MA(Y292,17)-MA(Y292 ,16)+MA(Y292,15)-MA(Y292,14)+MA(Y292,13)-MA(Y292,12)+MA(Y292,11) -MA(Y292,10)+MA(Y292,9) -MA(Y292,8)+MA(Y292,7)-MA(Y292,6)+MA(Y292,5) -MA(Y292,4)+MA(Y292,3)-MA(Y292,2)+Y292)/29,XMA(Y292,29));长期趋势:Y293,LINETHICK2,COLORGREEN;IF(Y293>REF(Y293,1),Y293,DRAWNULL),COLORRED,LINETHICK2;IF(Y913>REF(Y913,1),Y913,DRAWNULL),COLORMAGENTA,LINETHICK2;高险区1:Y293*1.036,COLORLICYAN;高风区2:Y293*1.031,COLORLICYAN;高风区3:Y293*1.026,COLORLICYAN;良机区1:Y293*0.974,COLORLICYAN;良机区2:Y293*0.969,COLORLICYAN;良机区3:Y293*0.964,COLORLICYAN;WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;WSR2:=CROSS(WSR1,5);WSR3:=CROSS(8,WSR1);WSR4:=CROSS(WSR1,-5);WSR5:=CROSS(WSR1,-8);WSR6:=WSR3;WSR7:=WSR4 OR WSR5;WSR8:=WSR7 AND FILTER(WSR7,5);WSR10:DRAWICON(WSR8,L-0.01,1);WSR9:=WSR6 AND FILTER(WSR6,5);WSR11:DRAWICON(WSR9,H+0.01,2);WSR12:=O<良机区3;DRAWICON(WSR12 AND FILTER(WSR12,12),L-0.03,9);W1:=C>REF(C,1) AND MACD<REF(MACD,1) AND MACD>0 AND V<REF(V,1); W2:=C>REF(C,1) AND MACD<0 AND MACD<REF(MACD,1) AND V<REF(V,1); XG:=W1 OR W2;VAR1:=AMOUNT/VOL/7;VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;VAR3:=SUM(AMOUNT,10)/VAR1/7;VAR4:=DMA(VAR2,VOL/VAR3);VAR5:=(CLOSE-VAR4)/VAR4*100,COLORLIMAGENTA;XG1:=CROSS(VAR5,MA(VAR5,2)) AND VAR5<0 AND C<(HHV(H,5)*0.88) AND REF(O>C,1) AND REF(O>C,2);XG3:=XG AND XG1 AND L<良机区1;WSR13:=O>良机区3 AND L<良机区1 OR XG3;DRAWICON(WSR13 AND FILTER(WSR13,10),L-0.03,5);WSR14:=H>高风区3;DRAWICON(WSR14 AND FILTER(WSR14,15),H+0.03,6); WSR15:=H<高风区3 AND H>高风区2;DRAWICON(WSR15 ANDFILTER(WSR15,5),H+0.03,4);WSR16:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3);WSR17:=(INDEXC-MA(INDEXC,8))/MA(INDEXC,8);WSR18:=(INDEXC-MA(INDEXC,18))/MA(INDEXC,18);WSR19:=(WSR16 + WSR17 + WSR18)/3;WSR20:=(C-MA(C,3))/MA(C,3);WSR21:=(C-MA(C,8))/MA(C,8);WSR22:=(C-MA(C,18))/MA(C,18);WSR23:=(WSR20 + WSR21 + WSR22)/3;WSR24:=(WSR19>REF(WSR19,1) AND CROSS(WSR23,WSR19))*50;WSR25:=(INDEXC-MA(INDEXC,6))/MA(INDEXC,6);WSR26:=(INDEXC-MA(INDEXC,12))/MA(INDEXC,12);WSR27:=(INDEXC-MA(INDEXC,24))/MA(INDEXC,24);WSR28:=(WSR25 + WSR26 + WSR27)/3;WSR29:=(C-MA(C,6))/MA(C,6);WSR30:=(C-MA(C,12))/MA(C,12);WSR31:=(C-MA(C,24))/MA(C,24);WSR32:=(WSR29 + WSR30 + WSR31)/3;WSR33:=(WSR28>REF(WSR28,1) AND CROSS(WSR32,WSR28))*20;WSR34:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR35:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR36:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR37:=(WSR34 + WSR35 + WSR36)/3;WSR38:=(C-MA(C,13))/MA(C,13);WSR39:=(C-MA(C,34))/MA(C,34);WSR40:=(C-MA(C,55))/MA(C,55);WSR41:=(WSR38 + WSR39 + WSR40)/3;WSR42:=(WSR37>REF(WSR37,1) AND CROSS(WSR41,WSR37));WSR43:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR44:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR45:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR46:=(WSR43 + WSR44 + WSR45)/3;WSR47:=(C-MA(C,30))/MA(C,30);WSR48:=(C-MA(C,60))/MA(C,60);WSR49:=(C-MA(C,90))/MA(C,90);WSR50:=(WSR47 + WSR48 + WSR49)/3;WSR51:=(WSR46>REF(WSR46,1) AND CROSS(WSR50,WSR46));WSR52:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR53:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR54:=(INDEXC-MA(INDEXC,89))/MA(INDEXC,89);WSR55:=(WSR52 + WSR53 + WSR54)/3;WSR56:=(C-MA(C,60))/MA(C,60);WSR57:=(C-MA(C,120))/MA(C,120);WSR58:=(C-MA(C,220))/MA(C,220);WSR59:=(WSR56 + WSR57 + WSR58)/3;WSR60:=(WSR59>REF(WSR59,1) AND CROSS(WSR59,WSR55));WSR61:=WSR24 OR WSR33 OR WSR42 OR WSR51 OR WSR60; DRAWTEXT(WSR61 AND H<Y293 AND FILTER(WSR61,5),良机区3,'良机'); XG88:=(WSR61 AND H<Y293 AND FILTER(WSR61,5))=1;K13:EXPMA(C,204) ,COLORWHITE;K14:EXPMA(C,216) ,COLORWHITE;K15:EXPMA(C,228) ,COLORWHITE;K16:EXPMA(C,260) ,COLORWHITE;K1:EXPMA(C,6),COLORRED;K2:EXPMA(C,14) ,COLORRED;K3:EXPMA(C,20) ,COLORRED;K4:EXPMA(C,24) ,COLORLIGREEN;K5:EXPMA(C,30) ,COLORYELLOW;K6:EXPMA(C,36) ,COLORYELLOW;K7:EXPMA(C,42) ,COLORYELLOW;K8:EXPMA(C,48) ,COLORYELLOW;K9:EXPMA(C,100) ,COLORBLUE;K10:EXPMA(C,112) ,COLORBLUE;K11:EXPMA(C,124) ,COLORBLUE;K12:EXPMA(C,138) ,COLORBLUE;。
分时主图通达信指标公式源码
叶子分时主图:均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;T:=0;RSV:=((CLOSE-LLV(LOW,240))/(HHV(HIGH,240)-LLV(LOW,240))*200-100)/2; K:=SMA(SMA( RSV,18,1),3,1);D:=MA(EMA(K,18),3);J:=3*K-2*D;DIFF:=EMA(CLOSE,240)-EMA(CLOSE,240)*100;DEA:=EMA(DIFF,18);多头:=(-3*(DIFF-DEA))*2;LC:=REF(CLOSE,1);RSI:=((SMA(MAX(CLOSE - LC,0),4.1,1))/(SMA(ABS(CLOSE - LC),4.1,1)))*(100);买:=(CROSS(RSI,11))*(80) AND J<-20,COLORRED;VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100,COLOR RED;卖:= CROSS(82,VARR1) AND C/(SUM(AMOUNT,0)/SUM(VOL*100,0))>1.01 AND 多头>6,COLORGREEN ;DRAWTEXT(买,L * 0.998,'B'),LINETHICK5 ,COLORRED;DRAWTEXT(卖,H*1.002,'卖'),LINETHICK5 ,COLORGREEN;DRAWICON(买,L,25);DRAWICON(卖,H,27);叶子分时:VAR0:=(EMA(CLOSE,5) * 7 + EMA(CLOSE,10) * 3)/10;VAR1:=SUM((CLOSE - VAR0)/VAR0 * 100 + 20,1);VAR2:=SUM((HIGH - VAR0)/VAR0 * 100 + 20,1);VAR3:=SUM((LOW - VAR0)/VAR0 * 100 + 20,1);VAR4:=SUM(VAR1 - VAR2,1);VAR5:=SUM(VAR1 - VAR3,1);VAR6:=SUM(CLOSE - VAR0,1);VAR7:=MA(VAR6,8);VAR8:=(CLOSE - LLV(LOW,60))/(HHV(HIGH,60) - LLV(LOW,60)) * 80;VAR9:=SMA(VAR8,7,1);VAR10:=SMA(VAR9,5,1);VAR11:=REF(CLOSE,1);VAR12:=SMA(MAX(CLOSE - VAR11,0),12,1)/SMA(ABS(CLOSE - VAR11),12,1) * 100; VAR13:=SMA(MAX(CLOSE - VAR11,0),18,1)/SMA(ABS(CLOSE - VAR11),18,1) * 100; VAR14:=MA(3 * VAR12 - 2 * SMA(MAX(CLOSE - VAR11,0),16,1)/SMA(ABS(CLOSE - VAR11),16,1) * 100,3);VAR15:=EMA(VAR14,8);VAR16:=IF(CROSS(VAR6,VAR7) AND VAR15 < 40 AND VAR10 < 40 AND VAR7 <0,-15,-30);VAR17:=IF((CLOSE - VAR0)/VAR0 * 100 < -10,-11,-20);VAR18:=REF(VAR17,1);VAR19:=IF(CROSS(VAR7,VAR6) AND VAR10 > 60 AND VAR15 > 70 AND VAR7 >0,15,20);T:=0;RSV:=((CLOSE-LLV(LOW,240))/(HHV(HIGH,240)-LLV(LOW,240))*200-100)/2;K1:=SMA(SMA( RSV,18,1),3,1);D1:=MA(EMA(K1,18),3);J1:=3*K1-2*D1;买:FILTER(IF(CROSS(VAR6,VAR7) AND VAR15 < 40 AND VAR10 < 40 AND VAR7 < 0,-15,-30)=-15,10) AND J1<-10,COLORRED;DIFF:=EMA(CLOSE,240)-EMA(CLOSE,240)*100;DEA:=EMA(DIFF,18);多头:=(-3*(DIFF-DEA))*2;卖:FILTER(VAR19=15,5) AND 多头>2.5,COLORGREEN;。
通达信波段主图指标通达信指标源码公式
通达信主图指标,长期波段短期波段结合N:=IF(BARSCOUNT(C)>=10,10,BARSCOUNT(C));STICKLINE(C>=MA(C,N),MA(C,N),MA(C,N*0.7),2,0),COLORYELLOW;STICKLINE(C<MA(C,N),MA(C,N),MA(C,N*0.7),2,0),COLORBLUE;DRAWKLINE(H,O,L,C);短波段A: IF(C>=MA(C,N),MA(C,N),MA(C,N*0.7));短波段B: IF(C<MA(C,N),MA(C,N),MA(C,N*0.7));NOTEXT1:IF(CLOSE>短波段A AND CLOSE!=短波段A,短波段A,DRAWNULL),COLORYELLOW;NOTEXT2:IF(CLOSE<短波段A AND CLOSE!=短波段A,短波段A,DRAWNULL),COLORBLUE; NOTEXT3:IF(CLOSE>短波段B AND CLOSE!=短波段B,短波段B,DRAWNULL),COLORYELLOW;NOTEXT4:IF(CLOSE<短波段B AND CLOSE!=短波段B,短波段B,DRAWNULL),COLORBLUE; R:=IF(BARSCOUNT(C)>=45,45,BARSCOUNT(C));STICKLINE(C>=MA(C,R),MA(C,R),MA(C,R*0.78),2,0),COLORMAGENTA;STICKLINE(C<MA(C,R),MA(C,R),MA(C,R*0.78),2,0),COLORLIGREEN;DRAWKLINE(H,O,L,C);长波段A:IF(C>=MA(C,R),MA(C,R),MA(C,R*0.78));长波段B:IF(C<MA(C,R),MA(C,R),MA(C,R*0.78));NOTEXT5:IF(CLOSE>长波段A AND CLOSE!=长波段A,长波段A,DRAWNULL),COLORMAGENTA;NOTEXT6:IF(CLOSE<长波段A AND CLOSE!=长波段A,长波段A,DRAWNULL),COLORLIGREEN;NOTEXT7:IF(CLOSE>长波段B AND CLOSE!=长波段B,长波段B,DRAWNULL),COLORMAGENTA;NOTEXT8:IF(CLOSE<长波段B AND CLOSE!=长波段B,长波段B,DRAWNULL),COLORLIGREEN;VR1:=(REF(C,2)-REF(C,1))/REF(C,2)>0.05;VR2:=(REF(C,3)-REF(C,2))/REF(C,3)>0.05;VR3:=REF(H,2)-REF(H,1);VR4:=REF(H,1)-VR3;VR5:=V/CAPITAL*100;VR6:=1-(VR5<15 AND (H-L)/C>0.045 AND C>VR4 AND VR1 AND VR2 AND C>O AND MA(C,60)-MA(C,9)/2.68>C);VR7:=VR6;。
通达信指标公式源码 不错的分时指标 副图源码
VAR1:=EMA(EMA(CLOSE,13),13);控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;STICKLINE(控盘<0,控盘,0,1,1),COLOR00FF00;STICKLINE(控盘>REF(控盘,1) AND 控盘<0,控盘,0,1,1),COLORFF00FF;无庄控盘:=控盘<0;STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,1,1),COLOR0000FF;有庄控盘:=控盘>REF(控盘,1) AND 控盘>0;VAR2:=100*WINNER(CLOSE*0.95);STICKLINE(控盘<REF(控盘,1) AND 控盘>0,控盘,0,1,1),COLORFFFF00;主力出货:=控盘<REF(控盘,1) AND 控盘>0;STICKLINE(VAR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,1,1),COLOR00FFFF; 高度控盘: VAR2>50 AND COST(85)<CLOSE AND 控盘>0,COLOR00FFFF,LINETHICK2; A10:=CROSS(控盘,0);控盘B:=FILTER(IF(A10,1,0),5);{分时价格原码}JJ:=DYNAINFO(11);{波段买卖原码}P:=55;S:=8;M1:=3;财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10,COLORRED,LINETHICK2;神:=EMA(财,M1),COLORGREEN,LINETHICK1;DRAWBAND(财,RGB(255,0,0),神,RGB(0,100,50));{股价与均线偏离买卖条件}BTJ1:=(C-JJ)/JJ<-0.03;BTJ11:=(C-JJ)/JJ<-0.03;BTJ12:=LAST(JJ>=REF(JJ,1),5,1) AND (C-JJ)/JJ<0.005; STJ1:=(C-JJ)/JJ>0.005;{控盘买卖条件}STJ01:=控盘<REF(控盘,1) AND 控盘>0.5;STJ02:=控盘>0;BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;BTJ22:=控盘>REF(控盘,1) AND 控盘<0 ;{波段买卖条件}BTJ3:=CROSS(财,神) AND 财<-0.3;BTJ32:=CROSS(财,神) AND 财<-0.1;STJ31:=CROSS(神,财);STJ32:=CROSS(神,财) AND 财>1.618;{以下为信号};BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,13);BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,13); DRAWTEXT(BTJ81,神,'↑买底'),COLORRED; DRAWTEXT(BTJ811,神*1.2,'↑有庄'),COLORWHITE; STJ81:=FILTER(STJ1 AND STJ01 AND STJ31,13);STJ82:=FILTER(STJ02 AND STJ32 ,13);STJ83:=STJ81 AND STJ82;DRAWTEXT(STJ83,神,'↓卖'),COLOR00FF00;DIFF: (EMA(CLOSE,8) - EMA(CLOSE,55))*10,COLORRED; DEA: EMA(DIFF,3),COLORGREEN;庄:= BTJ11 AND BTJ2 AND BTJ3;有庄:FILTER(庄,55),COLORWHITE;DRAWTEXT(BTJ811,有庄,'有庄'),COLORWHITE;。