通达信系统指标公式
比较稳定的通达信指标公式
比较稳定的通达信指标公式一、STOCH:STOCH指标是KDJ系列指标中的一种,它可以直观表示股票市场的快速和慢速行情趋势,其值越高说明股票的价格越快,越低说明价格越慢,K线图中STOCH指标的公式形式如下:STOCH(N,M)=(C-Ln)/(Hn-Ln)*100其中,N是指Fast STOCH中的“K”,M是指Slow STOCH中的“D”;C是收盘价;Ln是N日内最低价;Hn是N日内最高价。
比较稳定的STOCH指标公式可简化为:STOCH(5,3)=(C-L5)/(H5-L5)*100二、MACD:MACD指标是股市行情分析中使用最广泛的一种指标,也叫指数平滑异同平均线指标,它能够直观反映价格的上涨和下跌趋势,及行情的快慢程度,它的公式形式如下:MACD(N,M)=[12*EMA(C,N)-26*EMA(C,M)]/9其中,N代表EMA1的周期,M代表EMA2的周期;C是收盘价;EMA是指数平滑移动平均值。
比较稳定的MACD指标公式可简化为:MACD(12,26)=[12*EMA(C,12)-26*EMA(C,26)]/9三、RSI:RSI指标,也称相对强弱指数,是一种常用的股市技术分析指标,它能够直观反映股市的强弱,以及股价波动的大小,其公式形式如下:RSI(N)=100-[100/(1+RSV)]其中,N代表周期;RSV代表相对强弱指标值,即上涨天数的比率。
比较稳定的RSI指标公式可简化为:RSI(14)=100-[100/(1+RSV)]四、BOLL:BOLL指标是股市行情分析中使用的一种较重要的技术指标,它可以反映股价的快慢变化,以及股价上下波动的范围,其公式形式如下:BOLL(N,M)=(MA(C,N) +up*sigma(C,N))/ (MA(C,N) -dn*sigma(C,N))其中,N表示均线的周期,M表示上下界扭转设定值;C是收盘价;MA是简单移动平均价;SIGMA是标准差;UP是倍数上轨;DN是倍数下轨。
通达信指标公式大全
通达信指标公式大全:1.主力大单指标公式ZZ:=(HHV(H,3)+LLV(L,3))/2;A:=IF(C>ZZ,VOL,0);B:=IF(C<ZZ,VOL,0);总0:=(A-B);BBD:EMA(总0,3)/SUM(VOL,5)*100,LINETHICK;STICKLINE(BBD>=0,0,BBD,3,0),COLOR000088;STICKLINE(BBD>=0,0,BBD,1.5,0),COLOR0000AA;STICKLINE(BBD>=0,0,BBD,1,0),COLOR0000CC;STICKLINE(BBD>=0,0,BBD,0.5,0),COLOR0000FF;STICKLINE(BBD<0,0,BBD,3,0),COLOR888800;STICKLINE(BBD<0,0,BBD,1.5,0),COLORAAAA00;STICKLINE(BBD<0,0,BBD,1,0),COLORCCCC00;STICKLINE(BBD<0,0,BBD,0.5,0),COLORFFFF00;XH1:=REF(BBD,1)<REF(BBD,2) AND REF(BBD,1)<-10 AND BBD>REF(BBD,1) AND BBD>0;XH2:=REF(BBD,1)>=REF(BBD,2) AND REF(BBD,1)>8 AND BBD<REF(BBD,1) AND BBD<0;DRAWICON(XH1,-20,1);DRAWICON(XH2,20,2);2.主力控盘指标公式V AR2:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);V AR3:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);V AR4:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);V AR5:=(((V AR2 + (2 * V AR3)) + (3 * V AR4)) / 6);V AR6:=MA(V AR5,3);开始控盘:STICKLINE((VAR6 <= (0 - 10)),0,(0 - 20),3.5,0),COLOR00AAFF;STICKLINE((V AR6 <= (0 - 10)),0,(0 - 20),3.5,0),COLOR0044FF;STICKLINE((V AR6 <= (0 - 10)),0,(0 - 20),2.5,0),COLOR0088FF;STICKLINE((V AR6 <= (0 - 10)),0,(0 - 20),3,0),COLOR00AAFF;V AR1:=EMA(EMA(CLOSE,3),1);控盘:=(V AR1-REF(V AR1,1))/REF(VAR1,1)*1000;STICKLINE(控盘<0,控盘,0,3.5,0),COLORFFAA00;STICKLINE(控盘<0,控盘,0,3.5.2,0),COLORFF4400;STICKLINE(控盘<0,控盘,0,2.5,0),COLORFF8800;STICKLINE(控盘<0,控盘,0,0,0),COLORFFAA00;无控盘:0,COLORFFAA00;STICKLINE(控盘>REF(控盘,3) AND 控盘>0,控盘,0,3.5,0),COLOR000088;STICKLINE(控盘>REF(控盘,3) AND 控盘>0,控盘,0,2.5,0),COLOR0000AA;STICKLINE(控盘>REF(控盘,3) AND 控盘>0,控盘,0,1.5,0),COLOR0000CC;STICKLINE(控盘>REF(控盘,3) AND 控盘>0,控盘,0,1,0),COLOR0000EE;高度控盘:0,COLOR0000FF;STICKLINE(控盘<REF(控盘,3) AND 控盘>0,控盘,0,3.5,0),COLOR008800;STICKLINE(控盘<REF(控盘,3) AND 控盘>0,控盘,0,2.5,0),COLOR00AA00;STICKLINE(控盘<REF(控盘,3) AND 控盘>0,控盘,0,1.5,0),COLOR00CC00;STICKLINE(控盘<REF(控盘,3) AND 控盘>0,控盘,0,1,0),COLOR00EE00;STICKLINE(DDX<0,0,DDX,3.5,0),COLOR008800;STICKLINE(DDX<0,0,DDX,2.5,0),COLOR00AA00;STICKLINE(DDX<0,0,DDX,1.5,0),COLOR00CC00;STICKLINE(DDX<0,0,DDX,1,0),COLOR00EE00;对倒出货:0,COLOR00FF00;3.通达信资金进出分时指标公式(C,1),C*V,0),FROMOPEN),STICK,COLORRED;资金流出:-SUM(IF(C<REF(C,1),C*V,0),FROMOPEN),STICK,COLOR00FF00;资金差:资金流入+资金流出,COLORYELLOW;4.通达信做T+0的分时公式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,'★B'),COLORYELLOW;{吸} DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★'),COLORRED;{抛};5.通达信超准分时图指标公式BGTYU:=IF(DATE<=1150530,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*1 00,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM(AMOUNT,BARS COUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))));底线:1.003,COLORRED,LINETHICK2;高线:1.03,COLORRED,LINETHICK3;黄色起动线:EXPMA((DCLOSE/VBNH),20),COLORYELLOW,POINTDOT;绿色散户线:EXPMA((DCLOSE/VBNH),120),COLORGREEN,LINETHICK2;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/VBNH),120)),EXPMA((DCLOSE/ VBNH),60)*1,1);DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),EXPMA((DCLOSE/VBNH),60)),EXPMA((DCLOSE/ VBNH),120)*1,2);DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),1.02+0.005,18);STICKLINE(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),1.02,1.025,4,0), , COLORMAGENTA; STICKLINE(EXPMA(C,10)>EXPMA(C,60) ,1.03,1.034,1.0,0),COLORRED;STICKLINE(EXPMA(C,10)<EXPMA(C,60) ,1.03,1.025,1.0,0),COLORGREEN;DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.04),1.04,'可能涨停'),COLORWHITE; STICKLINE(EXPMA((DCLOSE/VBNH),120)>1.003 ,1.03,1.039,1.0,0),COLORMAGENTA; DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),1.028,'买进'),COLORWHITE; DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),1.036,'观察分时量 '),COLORWHITE; DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),1.003*1,13);6.通达信观察分时指标公式BG:=IF(DATE<=1150530,1,0);GH:=BETWEEN((DCLOSE*BG)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BG)))/SUM(VOL*100,BARSCOU NT((DCLOSE*BG)))),1.05,0.95);VB:=IF(GH=0,MA((DCLOSE*BG),BARSCOUNT((DCLOSE*BG))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BG)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BG)))));中线:1,COLORBLUE,LINETHICK2;快趋势线:EXPMA((DCLOSE/VB),21),COLORYELLOW,,LINETHICK1;慢趋势线:EXPMA((DCLOSE/VB),54),COLORGREEN,LINETHICK1;DRAWICON(CROSS(快趋势线,中线),快趋势线,1);DRAWICON(CROSS(慢趋势线,中线) AND (快趋势线>中线),中线-0.002,15);DRAWTEXT(CROSS(EXPMA((DCLOSE/VB),20),1),快趋势线-0.0025,'涨'),COLORRED; DRAWTEXT(CROSS(快趋势线,中线),快趋势线-0.0055,'买进'),COLORYELLOW;DRAWICON(CROSS(快趋势线,慢趋势线),慢趋势线,13);STICKLINE(快趋势线>中线 AND 快趋势线>REF(快趋势线,1) AND 快趋势线>慢趋势线,快趋势线,快趋势线+0.0015,1,0),COLORMAGENTA;DRAWTEXT(CROSS(中线,快趋势线),中线,'注意'),COLORWHITE;DRAWICON(CROSS(慢趋势线,快趋势线),慢趋势线,2);V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55)) /(HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势线:= EMA(V11,3);V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;BB:= (趋势线<=13 AND V12>13) AND FILTER((趋势线<=13 AND V12>13),10);CCC:=(趋势线>=90 AND V12) AND FILTER((趋势线>=90 AND V12),10);见顶清仓:= STICKLINE(趋势线>=90 AND V12,中线,快趋势线,2,0),COLORCYAN; DRAWICON(CCC,快趋势线,12);DRAWICON(BB,快趋势线,23);DRAWTEXT (BB,快趋势线,'补仓'),COLORLIRED;7.通达信分时买卖力道指标公式A1:=(VOL/CLOSE)/3;A2:=SUM((IF(((A1>0.29) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);A3:=SUM((IF(((A1>0.29) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);A4:=SUM((IF(((A1<0.29) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);A5:=SUM((IF(((A1<0.29) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);A6:=((A2+A3)+A4)+A5;A7:=IF((ISLASTBAR=1),((100*A2)/A6),0);A8:=((IF((ISLASTBAR=1),((100*A3)/A6),0)));A9:=((IF((ISLASTBAR=1),((100*A4)/A6),0)));A10:=((IF((ISLASTBAR=1),((100*A5)/A6),0)));机构买盘:(A2),LINETHICK0;机构卖盘:(A3),LINETHICK0;散户买盘:(A4),LINETHICK0;散户卖盘:(A5),LINETHICK0;STICKLINE(机构买盘>0 AND 机构买盘>=机构卖盘 AND 机构买盘>=REF(机构买盘,1),20,20+100,1,0),COLORRED;STICKLINE(机构卖盘>0 AND 机构卖盘>=机构买盘 AND 机构卖盘>=REF(机构卖盘,1),20,20+100,1,0),COLORWHITE;STICKLINE(散户买盘>0 AND 散户买盘>=散户卖盘 AND 散户买盘>=REF(散户买盘,1),-20,-20-100,1,0),COLORLIMAGENTA;STICKLINE(散户卖盘>0 AND 散户卖盘>=散户买盘 AND 散户卖盘>=REF(散户卖盘,1),-20,-20-100,1,0),COLORCYAN;VAR2:=(CLOSE-LLV(LOW,24))/(HHV(HIGH,24)-LLV(LOW,24))*2000;买卖力道: SMA(VAR2,3,1),COLORLIGRAY;VAR3:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));VAR4:=(IF(CLOSE>OPEN,VAR3*(HIGH-LOW),IF(CLOSE<OPEN,VAR3*(HIGH-OPEN+CLOSE-LOW),V OL/2))/(IF(CLOSE>OPEN,0-VAR3*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-VAR3*(HIGH-L OW),0-VOL/2))*(-1))-IF(CLOSE>OPEN,0-VAR3*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-VAR3*(HIGH-LOW),0-VOL/2))*(-1)/IF(CLOSE>OPEN,VAR3*(HIGH-LOW),IF(CLOSE<OPEN,VAR3 *(HIGH-OPEN+CLOSE-LOW),VOL/2)));VAR5:=AMOUNT/(100*VOL);VAR6:=MA(VAR5,40);VAR7:=100*(CLOSE-VAR6)/VAR6;底部追击:= IF(VAR4>0 AND VAR7<-12 AND CLOSE/OPEN>1.08,300,200),COLORGREEN; STICKLINE(VAR4>0 AND VAR7<-12 AND CLOSE/OPEN>1.08,1200,200,10,0) , COLORGREEN; VAR8:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;VAR9:=SMA(VAR8,3,1);VARA:=SMA(VAR9,3,1);D: SMA(VARA,5,1)*20, COLORCYAN;V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55)) /(HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势线:= EMA(V11,3);V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;BB:(趋势线<=13 AND V12>13) AND FILTER((趋势线<=13 AND V12>13),10);买入股票:= (趋势线<=13 AND V12>13),COLORRED;CCC:=(趋势线>=90 AND V12) AND FILTER((趋势线>=90 AND V12),10);清仓:=FILTER(趋势线>=90 AND V12 AND CROSS(D,买卖力道),5),COLORYELLOW;卖出区: 清仓+1800,COLORYELLOW;中:(0+卖出区)/2, COLORGREEN;{股旁网-股票公式网站 }STICKLINE(买卖力道>=中 AND 买卖力道>=REF(买卖力道,1),中,买卖力道+中/10,0,0),COLORMAGENTA;STICKLINE(买卖力道>=中 AND 买卖力道< REF(买卖力道,1),中,买卖力道+中/10,0,0),COLORBROWN;STICKLINE(买卖力道<中 AND 买卖力道>=REF(买卖力道,1),中,买卖力道-中/10,0,0),COLORGREEN;STICKLINE(买卖力道<中 AND 买卖力道< REF(买卖力道,1),中,买卖力道-中/10,0,0),COLORBLUE;DRAWICON(买入股票,中,15);DRAWTEXT (BB,0,'买股'),COLORYELLOW;DRAWTEXT(清仓,买卖力道,'顶'),COLORYELLOW;STICKLINE(清仓,买卖力道,买卖力道+0.01,2,0),COLORBLUE; DRAWICON(CROSS(D,中),中,13);DRAWICON(CROSS(中,买卖力道),买卖力道,2);DIF:=(EMA(CLOSE,13) - EMA(CLOSE,24));DEA:=(EMA(DIF,6));MACD:=(DIF-DEA)*3;红线:=IF(MACD>=0 AND MACD>REF(MACD,1),中,DRAWNULL);青线:=IF(MACD>=0 AND MACD< REF(MACD,1),中,DRAWNULL);粉线:=IF(MACD<0 AND MACD>=REF(MACD,1),中,DRAWNULL);蓝线:=IF(MACD<0 AND MACD< REF(MACD,1),中,DRAWNULL); STICKLINE(红线,200,250,1,0),COLORRED,LINETHICK1;STICKLINE(青线,200,250,1,0),COLORCYAN,LINETHICK1;STICKLINE(粉线,200,250,1,0),COLORMAGENTA,LINETHICK1; STICKLINE(蓝线,200,250,1,0),COLORBLUE,LINETHICK1;DRAWICON(CROSS((A2),(A3)),200,23);通达信如何使用分时指标的教程找到通达信软件的安装位置,打开“T0002”文件夹,找到“user.ini”文件,用记事本打开,把里面“Zstzb=MACD”这一句中的MACD修改为自己要用的指标名称就OK啦。
通达信_指标公式源码大全
【通达信】魔鬼操盘(主图)-指标公式源码均5:MA(CLOSE,5) COLORYELLOW;均10:MA(CLOSE,10)COLORGREEN;均30: MA(CLOSE,30) COLORMAGENTA ;均60: MA(CLOSE, 60) COLORRED POINTDOT LINETHICK3;均250: MA(CLOSE, 250) COLORBLUE LINETHICK2 ;魔鬼通道上:均30 + 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2 ;魔鬼通道下:均30 - 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2; VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=VAR1*;VAR5:=MA(CLOSE,5);VAR6:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR7:=SMA(VAR6,5,1);VAR8:=VOL>REF(VOL,1);VAR9:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30);【通达信】平均价格(主图)-指标公式源码A:=(3*C+H+L+O)/6;XJ:=(A+*REF(A,1)+*REF(A,2)+*REF(A,3)+*REF(A,4))/;YCZXH:=(MA(HHV(A,2),5)+MA(HHV(A,2),13)+MA(HHV(A,2),21)+MA(HHV(A,2),32 ))/4;YCZXL:=(MA(LLV(A,2),5)+MA(LLV(A,2),13)+MA(LLV(A,2),21)+MA(LLV(A,2),32 ))/4;SMH:EMA(YCZXH,21),COLOR004000;SML:EMA(YCZXL,21),COLOR004000;SMJ:(SML+SMH)/2,COLOR004000;PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*REF(A,5)+4*RE F(A,6)+3*REF(A,7)+2*REF(A,8)+REF(A,9))/55;A1:=EMA(PJ,3),COLOR004000;A2:=EMA(PJ,5),COLOR004000;A3:=EMA(PJ,7),COLOR004000;A4:=EMA(PJ,9),COLOR004000;A5:=EMA(PJ,11),COLOR004000;LX:=REF(XJ,1);ZD:=(SMA(MAX(XJ-LX,0),5,1)/SMA(ABS(XJ-LX),5,1))*100;KX1:=(CLOSE>=OPEN) AND ZD>=50;KX2:=(CLOSE<OPEN) AND ZD>=50;KX3:=(CLOSE>=OPEN) AND ZD<50;KX4:=(CLOSE<OPEN) AND ZD<50;IF(A5<REF(A5,1),A5,DRAWNULL),COLOR820000,LINETHICK2;IF(A5>REF(A5,1),A5,DRAWNULL),COLOR00005B,LINETHICK2;IF(A4<REF(A4,1),A4,DRAWNULL),COLOR8C0000,LINETHICK1;IF(A4>REF(A4,1),A4,DRAWNULL),COLOR000055,LINETHICK1;IF(A3<REF(A3,1),A3,DRAWNULL),COLOR9B0000,LINETHICK1;IF(A3>REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1;IF(A2<REF(A2,1),A2,DRAWNULL),COLORBB0000,LINETHICK1;IF(A2>REF(A2,1),A2,DRAWNULL),COLOR00007D,LINETHICK1;IF(A1<REF(A1,1),A1,DRAWNULL),COLORCC0000,LINETHICK1;IF(A1>REF(A1,1),A1,DRAWNULL),COLOR00009B,LINETHICK1;STICKLINE(KX1,C,O,4,1),COLOR4440FF;STICKLINE(KX1,C,H,,1),COLOR4440FF;STICKLINE(KX1,O,L,,1),COLOR4440FF;STICKLINE(KX2,C,O,4,0),COLOR4440FF;STICKLINE(KX2,O,H,,0),COLOR4440FF;STICKLINE(KX2,C,L,,0),COLOR4440FF;STICKLINE(KX3,C,O,4,1),COLORFFFF33;STICKLINE(KX3,C,H,,1),COLORFFFF33;STICKLINE(KX3,O,L,,1),COLORFFFF33;STICKLINE(KX4,C,O,4,0),COLORFFFF33;STICKLINE(KX4,O,H,,0),COLORFFFF33;STICKLINE(KX4,C,L,,0),COLORFFFF33;【通达信】牛劲十足(副图)-指标公式源码VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));ZM:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CL OSE-LOW)),VOL/2)),COLORRED,POINTDOT;ZM1:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-V AR1*(HIGH-LOW),0-VOL/2)),COLOR00FF00,POINTDOT;MMB:=(SUM(ZM,30)+SUM(ZM1,30))/10,COLORYELLOW;SG:=MMB>0 AND REF(MMB,1)<MMB;上攻周期:COUNT(SG,5),LINESTICK,COLORWHITE;JSC:=上攻周期<1;DBQD:=FILTER(COUNT(JSC,5)>3 AND NOT(JSC),10);DRAWICON(DBQD,2,1);DRAWBAND(上攻周期,RGB(255,120,120),3,RGB(0,0,0));DRAWBAND(JSC,RGB(0,0,255),,RGB(0,0,0));STICKLINE(COUNT(上攻周期>3,5)>=3 AND SG,0,上攻周期,,0),COLORRED; XG: COUNT(COUNT(上攻周期>3,5)>=3 AND SG,20)>4;【通达信】魔鬼K线(副图)-指标公式源码VAR1:=REF(OPEN,1);VAR2:=SMA(MAX(OPEN-VAR1,0),6,1)/SMA(ABS(OPEN-VAR1),6,1)*100;VAR3:=REF(CLOSE,1);VAR4:=SMA(MAX(CLOSE-VAR3,0),6,1)/SMA(ABS(CLOSE-VAR3),6,1)*100;VAR5:=REF(HIGH,1);VAR6:=SMA(MAX(HIGH-VAR5,0),6,1)/SMA(ABS(HIGH-VAR5),6,1)*100;VAR7:=REF(LOW,1);VAR8:=SMA(MAX(LOW-VAR7,0),6,1)/SMA(ABS(LOW-VAR7),6,1)*100; STICKLINE(VAR4<VAR2,VAR2,VAR4,5,0),COLORGREEN , ;STICKLINE(VAR4>VAR2,VAR2,VAR4,5,0),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR8>VAR4,VAR4,VAR6,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR8<VAR4,VAR4,VAR6,,1),COLORRED ,;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR6<VAR2,VAR2,VAR8,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR6>VAR2,VAR2,VAR8,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR8<VAR2,VAR2,VAR6,,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR8>VAR2,VAR2,VAR6,,1),COLORRED , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR4,VAR8,,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8<VAR4,VAR4,VAR6,,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR2,VAR8,,1),COLORGREEN ,;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6>VAR4,VAR2,VAR8,,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 AND VAR8<VAR2,VAR2,VAR6,,1), COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8>VAR2,VAR2,VAR6,,1),COLORGREEN , ;【通达信】牛熊分界(立桩量、中线)-指标公式源码AAA:=(3*C+H+L+O)/6;VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3 )+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;VAR2:=(HHV(VA R1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LL V(VAR1,20))/3;VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;VAR5:=( LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;DRAWBAND(VAR1,RGB(155,50,50),VAR6,RGB(250,250,0));短线:VAR1,COLORWHITE;中线:VAR6,COLORYELLOW;金叉:短线>中线 AND REF(短线,1)=REF(中线,1),NODRAW;下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;TJ1:=VOL=HHV(VOL,10)AND VOL>2*REF(VOL,1)AND CLOSE>VAR1;立桩量:=FILTER(TJ1,5);TJ2:=IF(BARSLAST(立桩量)=1 ANDCLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));突破:TJ2=1,NODRAW;STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;STICKLINE(C>=O,C,O,3,0),COLOR000045;STICKLINE(C >=O,C,O,,0),COLOR000065;STICKLINE(C>=O,C,O,2,0),COLOR000085;STICKLINE (C>=O,C,O,,0),COLOR0000A5;STICKLINE(C>=O,C,O,1,0),COLOR0000C5;STICKLI NE(C>=O,C,O,,0),COLOR0000E5;STICKLINE(C>=O,H,L,0,0),COLOR0000F5;STICK LINE(C<O,C,O,3,0),COLOR353500;STICKLINE(C<O,C,O,,0),COLOR454500;STICK LINE(C<O,C,O,2,0),COLOR555500;STICKLINE(C<O,C,O,,0),COLOR656500;STICK LINE(C<O,C,O,1,0),COLOR757500;STICKLINE(C<O,C,O,,0),COLOR858500;STICK LINE(C<O,H,L,0,0),COLOR959500;ZRR:=(YEAR-1992)*365+INTPART((YEAR-1989 )/4)+IF(MONTH<=2,DAY+(MONTH-1)*31,DAY+INTPART(13*(MONTH+1)/5)-7+(MONT H-1)*28+IF(INTPART(YEAR/4)=YEAR/4,1,0)),NODRAW;T:=BARSLAST(ZRR-REF(ZR R,1)>WEEKDAY-REF(WEEKDAY,1))+1,NODRAW;T1:=REF(T,T)+T,NODRAW;T2:=REF(T ,T1)+T1,NODRAW;T3:=REF(T,T2)+T2,NODRAW;T4:=REF(T,T3)+T3,NODRAW;T5:=RE F(T,T4)+T4,NODRAW;T6:=REF(T,T5)+T5,NODRAW;T7:=REF(T,T6)+T6,NODRAW;T8:=REF(T,T7)+T7,NODRAW;周10:(REF(CLOSE,T)+REF(CLOSE,T1)+REF(CLOSE,T2)+REF(CLOSE,T3)+REF(CLOSE, T4)+REF(CLOSE,T5)+REF(CLOSE,T6)+REF(CLOSE,T7)+REF(CLOSE,T8)+CLOSE)/10 ,LINETHICK2;【通达信】牛准反弹(快线、慢线)-指标公式源码N:=9;M1:=3;M2:=3;P:=9;快线:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;慢线:=SMA(快线,M1,1);ELI空:=SMA(慢线,M2,1);ELI牛股:=IF(BARSLAST(CROSS(慢线,ELI空))<P AND CROSS(慢线,ELI空) AND 慢线<20,90,0);LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),,1)/SMA(ABS(CLOSE-LC),,1)*100;牛准反弹:=CROSS(RSI,11)*80;XG:牛准反弹 OR ELI牛股;【通达信】启动提示(平台线、启动线)-指标公式源码启动线:SUM(EMA((C+L)/2,2),5)/,COLORRED;平衡线:LLV(SUM( EMA((C+L)/2,2),5)/,4),COLORFF00FF;平台线:LLV(SUM( EMA((C+L)/2,2),5)/,10),COLORFFFFFF;强弱线:EMA(启动线,21),COLORYELLOW;STICKLINE(平台线<启动线,启动线,平台线,,0),COLORFFCCAA;STICKLINE(平衡线<启动线,启动线,平衡线,,0),COLORRED;VAR1:=2*MA(LLV((C+L)/2,8)*,13)-EMA((C+L)/2,3)-((C+L)/2)*;VAR2:=IF((EMA((C+L)/2,3)-VAR1)*5>0,POW((EMA((C+L)/2,3)-VAR1)*5,2)/10, -1*POW((EMA((C+L)/2,3)-VAR1)*5,2)/10);VAR3:=IF(VAR2>0,VAR2-0,0);STICKLINE(VAR3>0 AND REF(VAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),强弱线,强弱线+,4,0),COLORFFAACC;DRAWTEXT(VAR3>0 AND REF(VAR3,1)=0 AND (C+L)/2>MA((C+L)/2,8),强弱线+,'注意控制'),LINETHICK3,COLORFFAACC;【通达信】平台启动(主图)-指标公式源码圣:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;灵:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;石:=SMA(灵,13,8);仙:=CEILING(SMA(石,13,8));编著:=SMA(圣,21,8);AABB:=IF(L,CONST(L),DRAWNULL);平台启动:STICKLINE(仙-编著>75,AABB,AABB*,15,1),COLOR0000FF;VARZT:=BARSLAST(平台启动);DRAWTEXT(VARZT=1,*(AABB+AABB*/2,'平台启动'),COLORYELLOW;【通达信】牛熊线分水岭(中线强弱拐点)-指标公式源码JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);M1:=EMA(CLOSE,3);M2:EMA(CLOSE,8);分水岭:SMA(M2,,,LINETHICK2,COLORRED;牛线:3*M2-2*分水岭,LINETHICK2,COLORFF00FF ;熊线:4*分水岭-3*M2,LINETHICK2,COLORGREEN;IF (牛线<=熊线,牛线,熊线),COLORGREEN,LINETHICK2;IF (分水岭<=熊线,分水岭,熊线),COLORGREEN,LINETHICK2;IF(牛线>REF(熊线,1),熊线,DRAWNULL),COLORFF2200,LINETHICK2;M3:EMA(M2,13);M4:EMA(M2,55);VAR1:=EMA(M3,55);M5:EMA(M4,81), COLORRED,LINETHICK1;股道:=(1-C/SMA(C,13,1))*100;基础:=EMA(C,43);中线强弱拐点:EMA(股道*C/100+基础,3),COLORGRAY,LINETHICK1;炒股不亏钱(散户必看)炒股入门口诀一、赢家重在观念正确1 一年做一股!忠告,轻易不抛牛股,毕业。
通达信 庄家专用指标公式
通达信庄家专用指标公式通达信的庄家专用指标公式是一类用于判断股票庄家操盘意图的指标公式。
下面是几个常用的庄家专用指标公式以及其解释说明:1. 操盘提前量(ADTM)操盘提前量是股价波动的先行指标,用于衡量庄家操盘的力度,公式如下:ADTM = (H+L)/2 - C其中,H为当日最高价,L为当日最低价,C为当日收盘价。
当ADTM值大于0时,表示庄家有较大的操盘意图,股价可能上涨;当ADTM值小于0时,表示庄家有较大的出货意图,股价可能下跌。
2. 庄家操盘力度指数(ARD)庄家操盘力度指数是用于衡量庄家操盘的力度和意图,公式如下:ARD = (V1 - V2)/(V1 + V2)其中,V1为买盘成交量,V2为卖盘成交量。
当ARD值接近1时,表示庄家力度较大,股价可能上涨;当ARD值接近-1时,表示庄家力度较大,股价可能下跌。
3. 操盘热度指数(BSI)操盘热度指数是用于衡量庄家操盘的热度和氛围,公式如下:BSI = (ADV - DDV)/(ADV + DDV)其中,ADV为上涨成交量之和,DDV为下跌成交量之和。
当BSI值接近1时,表示操盘热度较高,股价可能上涨;当BSI值接近-1时,表示操盘热度较高,股价可能下跌。
4. 主力资金流向指标(CMF)主力资金流向指标是用于观察庄家资金流动情况,公式如下:CMF = SUM((H+L)/2 - C)(H-L))/(SUM(H-L)V)其中,H为当日最高价,L为当日最低价,C为当日收盘价,V为交易量。
CMF值越高,表示主力资金流入越大,股价可能上涨;CMF值越低,表示主力资金流出越大,股价可能下跌。
注意:以上公式仅为示例,具体应用时还需结合其他指标和实时市场情况进行综合分析。
5. 动力指标(DMI)动力指标用于判断庄家的动力和动能,公式如下:高点动力线(ADX)= (高点动力线+低点动力线)/2 * 100低点动力线(DI)= (高点动力线-低点动力线)/(高点动力线+低点动力线)* 100当高点动力线上升,低点动力线下降且高点动力线大于25,表示庄家操盘力度较大,股价可能上涨。
通达信_指标公式源码大全
通达信_指标公式源码大全通达信是国内最早的股票行情软件之一,其强大的技术分析指标系统是其最大的特点之一、通达信的指标公式源码可以帮助广大投资者深入理解和研究不同的技术指标,并且根据自己的需求进行二次开发。
以下是通达信中一些常用指标的简要介绍和其对应的指标公式源码:1.移动平均线(MA):MA(CLOSE,N)=SUM(CLOSE,N)/N2.指数平滑移动平均线(EMA):EMA(CLOSE,N)=(2*CLOSE+(N-1)*REF(EMA(CLOSE,N),1))/(N+1)3.相对强弱指数(RSI):RSI(CLOSE,N)=SMA(MAX(CLOSE-REF(CLOSE,1),0),N,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),N,1)*1004.动力指数(DMI):H1=MAX(HIGH-REF(HIGH,1),0)L1=ABS(LOW-REF(LOW,1),0)DMP=SUM(((H1>L1)AND(H1>0.00))?H1:0,N)DMM=SUM(((L1>H1)AND(L1>0.00))?L1:0,N)PDI=DMP/SUM(TR,N)*100MDI=DMM/SUM(TR,N)*1005.布林带(BOLL):MB=MA(CLOSE,N)UP=MB+P*STD(CLOSE,N)DN=MB-P*STD(CLOSE,N)6.相对强弱指标(RSI):LC:=REF(CLOSE,1)TRY:=CLOSE-LCUY:=SUM(MAX(MAX(CLOSE-LC,0),ABS(CLOSE-LC-LC1)),N)DY:=SUM(MAX(MAX(LC-CLOSE,0),ABS(CLOSE-LC-LC1)),N)需要注意的是,在使用这些源码时,要理解每个指标的具体计算过程和意义,以及与股票行情数据之间的关系。
同时,根据自身的需求进行适当的修改和优化,以满足个人的投资研究需求。
通达信有价值的经典指标公式
通达信有价值的经典指标公式以下是通达信有价值的经典指标公式(无源码的请下载附件导入)1 KDJ提前金叉N:=5;M1:=5;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; K:=SMA(RSV,5,1);D:=SMA(K,M1,5);J:=3*K-2*D;VARB2:=(RSV/2+22)*1;量:=EMA(VOL,13);资金:=EMA(AMOUNT,13);过滤:=((资金 /量) / 100);提纯:=(((CLOSE -过滤) / 过滤) * 100);黄金:=((提纯 < (0)) AND ZXNH);低买:=IF(黄金 AND RSV高卖:=IF(黄金 AND RSV>VARB2,80,120);上涨分界:=25;选股:(CROSS(上涨分界,低买));2 山沟涨停选股WA2:=(HHV(H,50)-L)/C>0.5;B2:=(HHV(H,8)-L)/C>0.25;A:=A2 AND B2;XG:COUNT(A,5)>=1 AND C/REF(C,1)>=1.095;3 抓牛启动点A:=LLV(HIGH,240);A2:=REF(LLV(CLOSE,480),1);A3:=REF(HHV(CLOSE,480),1);A4:=EMA(EMA(CLOSE,2)-EMA(CLOSE,150),100);A5:=2*(EMA(CLOSE,2)-EMA(CLOSE,150)-A4);A6:=POW(A5,3)*0.1+POW(A5,1);A7:=IF(A5>0.1,A6,0)*5;A8:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;CROSS(A8,A) AND CROSS(A8,A2) AND CROSS(A8,A3) AND CROSS(A7,A) AND CROSS(A7,A2) AND CROSS(A7,A3);4 低开长阳M:=4;N:=7;低开长阳:OPEN<= 1-M/100 AND CLOSE/OPEN>=1+N/100,COLORRED;DRAWICON(低开长阳,1.1,4);5 超级组合顶底N:=5;M1:=5;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,5,1);D:=SMA(K,M1,5);J:=3*K-2*D;VARB2:=(RSV/2+22)*1;量:=EMA(VOL,13);资金:=EMA(AMOUNT,13);过滤:=((资金 /量) / 100);提纯:=(((CLOSE -过滤) / 过滤) * 100);黄金:=((提纯 < (0)) AND ZXNH);低买:=IF(黄金 AND RSV高卖:=IF(黄金 AND RSV>VARB2,80,120);上涨分界:=25;选股:(CROSS(上涨分界,低买));VAR2:=LLV(LOW,10);VAR3:=HHV(HIGH,25);阶段卖: 3.2,COLORC6C600;3.5,COLOR0088FF;清仓: 3.5,COLORFF75FF;动力线:= EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4);STICKLINE(动力线>REF(动力线,1) ,动力线,REF(动力线,1),3 ,1),COLORRED;STICKLINE(动力线<=REF(动力线,1) ,动力线,REF(动力线,1),3 ,1),COLOR00FF00;底部:0.2,COLOR70DB93;关注:0.5,COLORYELLOW;DRAWICON( FILTER(CROSS(动力线,关注),20),动力线+0.02 ,1);DRAWICON( FILTER(CROSS(清仓,动力线),20),动力线+0.02,2);DRAWICON( FILTER(CROSS(动力线,底部),20),动力线+0.02 ,1);DRAWICON( FILTER(CROSS(阶段卖,动力线),20),动力线+0.02,2);界线:1.75,POINTDOT,LINETHICK2,COLOR70DB93;数值:=动力线,COLORA8A8A8;{希望之星买点}A3:=ABS(REF(C,2)-REF(O,2))/REF(O,2)<0.012;{前天星形}A2:=(REF(O,1)-REF(C,1))/REF(O,1)<0.008;{昨天星形}B1:=IF(REF(C,2)>REF(O,2),REF(O,2),REF(C,2));B2:=IF(REF(C,1)B3:=IF(C>O,O,C);B4:=B1>B2 AND B3>B2 AND REF(C,1)A1:=ABS(C-O)/O<0.012;{今天星形}星K:A3 AND A2 AND A1 AND B4;{准备上买点}VARO5:=LLV(LOW,27);VARO6:=HHV(HIGH,34);VARO7:=EMA((CLOSE-VARO5)/(VARO6-VARO5)*4,4)*25;建仓区:=VARO7<10;TJ:=COUNT(建仓区,3);VAR1:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);上升:=CROSS(VAR1,8);准备上:(建仓区 OR REF(建仓区,0.5)) AND 上升;{出手买点}出手:FILTER((CROSS((EMA(CLOSE,2)-EMA(CLOSE,10)),EMA((EMA(CLOSE,2)-EMA(CLOSE,10)),2))AND EMA((EMA(CLOSE,2)-EMA(CLOSE,10)),2)<0 AND CROSS(C,MA(C,20))),90);{强势买点}D1:="WR.WR1"<5;D2:=CROSS("KDJ.K","KDJ.D") AND "KDJ.K"<50;D3:=CROSS("MACD.DIF","MACD.DEA");D4:="I">-100 AND "I"<-90;D5:=CROSS("RSI.RSI1","RSI.RSI2")AND "RSI.RSI1"<50;S1:=20;M2:=40;L1:=60;AAA:=CLOSE>OPEN;BBB:=AAA&&CLOSE>MA(CLOSE,S1)&&CLOSE>MA(CLOSE, M2)&&CLOSE>MA(CLOSE,L1);CCC:=BBB&&OPENXG1:=CCC&&(CLOSE-OPEN)>0.0618*CLOSE;AA1:=D1 AND D2;AA2:=D2 AND D3;AA3:=D1 AND D3;XG2:=AA1 OR AA2 OR AA3;强势:IF(XG1 AND XG2,1,0),COLORRED;{底部买点}WW:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);MM:=DMA(CLOSE,WW);通道4:= (1-7/100)*MM;VAR4:=EXPMA(CLOSE,9);LDN:=EXPMA(VAR4*0.86,5);TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));TTRR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);HD :=HIGH-REF(HIGH,1);LD :=REF(LOW,1)-LOW;DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);PDI:=DMP*100/TTRR;MDI:=DMM*100/TTRR;ADX:= EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,6);买底: C<=通道4 AND C<=LDN AND CCI<-100AND ADX>=60 AND MDI >= PDI AND CLOSE>OPEN;6 侯氏私募选股A01:=DYNAINFO(7);A02:=MA(((AMOUNT / VOL) / 100),(VOL / CAPITAL));A03:=BARSCOUNT(CLOSE);A04:=(SMA((CLOSE / HHV(HIGH,120)),3,1) * 100);A05:=IF((A03 > 20),A04,0);A06:=IF((LOW > A01),0,IF((HIGH < A01),1,(((A01 - LOW) + 0.009) / ((HIGH - LOW) + 0.009))));A07:=(DMA(A06,(VOL / CAPITAL)) * 100);A08:=IF((A02 > A01),(100 - A07),A07);A09:=IF((((A07 > 0) AND (A07 > REF(A07,1))) AND (A05 <= 88)),A07,0);STICKLINE((A09 > 0),0,A09,5,0),COLORFF00FF;黄金线选股:IF(((CROSS(A09,0.009) AND (OPEN && LOW)) AND (CLOSE && LOW)),20,0),COLORFF00FF;私募黄金线:A09,LINETHICK2,COLOR00FFFF;RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);MSD:EMA (100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLORWHITE;风险区:80,COLORFF85FF;安全区:20,COLORYELLOW;天线:100,COLORFFFF00,LINETHICK2;地线:=0,LINETHICK2 COLOR6699FF;强弱线:50,COLORGREEN,POINTDOT;VAR1:=HHV(HIGH,9)-LLV(LOW,9);VAR2:=HHV(HIGH,9)-CLOSE;VAR3:=CLOSE-LLV(LOW,9);VAR4:=VAR2/VAR1*100-70;VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60));VAR6:=(2*CLOSE+HIGH+LOW)/4;VAR7:=SMA(VAR3/VAR1*100,3,1);VAR8:=LLV(LOW,34);VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);VAR10:=IF(VAR9>100,VAR9-100,0);VAR11:=HHV(HIGH,34);VAR12:=EMA((VAR6-VAR8)/(VAR11-VAR8)*100,13);VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,2);趋势值:VAR13,COLORRED;STICKLINE(VAR12-VAR13>0,VAR12,VAR13,8,0),COLORRED;STICKLINE(VAR12-VAR13<0,VAR12,VAR13,8,0),COLOR00FF0F;VARK1:=EMA(HHV(HIGH,500),21);VARK2:=EMA(HHV(HIGH,250),21);VARK3:=EMA(HHV(HIGH,90),21);VARK4:=EMA(LLV(LOW,500),21);VARK5:=EMA(LLV(LOW,250),21);VARK:=EMA(LLV(LOW,90),21);VARK7:=EMA((VARK4*0.96+VARK5*0.96+VARK*0.96+VARK 1*0.558+VARK2*0.558+VARK3*0.558)/6,21);VARK8:=EMA((VARK4*1.25+VARK5*1.23+VARK*1.2+VARK1* 0.55+VARK2*0.55+VARK3*0.65)/6,21);VARK9:=EMA((VARK4*1.3+VARK5*1.3+VARK*1.3+VARK1*0. 68+VARK2*0.68+VARK3*0.68)/6,21);VARKA:=EMA((VARK7*3+VARK8*2+VARK9)/6*1.738,21);VARKB:=REF(LOW,1);VARKC:=SMA(ABS(LOW-VARKB),3,1)/SMA(MAX(LOW-VARKB,0),3,1)*100;VARKD:=EMA(IF(CLOSE*1.35<=VARKA,VARKC*10,VARKC/10 ),3);VARKE:=LLV(LOW,30);VARKF:=HHV(VARKD,30);VARK10:=IF(MA(CLOSE,58),1,0);火焰山: EMA(IF(LOW<=VARKE,(VARKD+VARKF*2)/2,0),3)/618*VARK10;火焰: STICKLINE(火焰山>0,0,火焰山,4,1);今量: 火焰山;STICKLINE(火焰山>0,0,今量*1.2,8,0) COLOR0000FF; STICKLINE(火焰山>0,0,今量*0.8,8,0) COLOR0066FF; STICKLINE(火焰山>0,0,今量*0.6,8,0) COLOR0099FF; STICKLINE(火焰山>0,0,今量*0.4,8,0) COLOR00CCFF; STICKLINE(火焰山>0,0,今量*0.2,8,0) COLOR00FFFF;。
通达信神奇数字指标公式(一)
通达信神奇数字指标公式(一)通达信神奇数字指标公式简介通达信是一款常用于股票分析的软件,其中包含了许多神奇数字指标公式,这些公式可以帮助投资者进行技术分析和预测。
在本文中,我们将列举一些常用的通达信神奇数字指标公式,并通过举例进行解释说明。
1. MACD 指标公式MACD(Moving Average Convergence/Divergence)即移动平均收敛/背离指标,主要用于预测价格趋势和判断买卖信号。
公式:DIFF: EMA(12) - EMA(26)DEA: EMA(DIFF,9)MACD: (DIFF - DEA) * 2解释说明: - DIFF:短期EMA(Exponential Moving Average)与长期EMA的差值,用于衡量市场的短期变动力度。
- DEA:DIFF的9日EMA,用于平滑DIFF的变化。
- MACD:DIFF与DEA的差值,倍增后的结果,可用于判断价格的快速变化和拐点。
2. KDJ 指标公式KDJ 指标是一种反映价格波动和买卖信号的技术指标,常用于短期股票交易中。
公式:RSV: (CLOSE - MIN(LOW, N))/(MAX(HIGH, N) - MIN(LO W, N))* 100K: SMA(RSV, M1)D: SMA(K, M2)J: 3K - 2D解释说明: - RSV:未成熟随机指标,计算最近N天内收盘价相对于N天内的最低价和最高价的比例。
用于度量价格的强弱程度。
- K:RSV的M1日简单移动平均值,用于平滑RSV的变动。
- D:K的M2日简单移动平均值,用于平滑K的变动。
- J:K与D的差值的3倍,用来判断价格的超买和超卖情况。
3. RSI 指标公式RSI(Relative Strength Index)指标用于衡量市场的买卖力量,帮助判断价格的超买和超卖情况。
公式:RSI: EMA(MAX(CLOSE - PRE_CLOSE, 0),N) / EMA(ABS (CLOSE - PRE_CLOSE),N) * 100解释说明: - RSI:相对强弱指数,通过计算一段时间内上涨日的平均涨幅和下跌日的平均跌幅,来判断市场的超买和超卖情况。
通达信经典量柱主图指标公式
通达信经典量柱主图指标公式黄金柱:=V/REF(V,1)>=2.0;K1:=SUMBARS(黄金柱,1) ;K2:=SUMBARS(黄金柱,2);K3:=SUMBARS(黄金柱,3);K4:=SUMBARS(黄金柱,4);K5:=SUMBARS(黄金柱,5);K6:=SUMBARS(黄金柱,6);K7:=SUMBARS(黄金柱,7);K8:=SUMBARS(黄金柱,8);K9:=SUMBARS(黄金柱,9);K10:=SUMBARS(黄金柱,10);AA:STICKLINE(K1,REF(L,K1-1)*1.002,REF(L,K1-1),5,0),COLORYELLOW;{预定黄金柱}{预定黄金柱:=REF(V,2)>=REF(V,3)*1.99 AND REF(C,2)>REF(O,2)AND REF(V,2)=HHV(V,3) AND C/REF(C,2) >=1.0995 AND REF(L,2)=LLV(L,3);}{预定:STICKLINE(预定黄金柱,H,H,30,0),COLORRED;}{DRAWICON(预定黄金柱,H,19);}{将军柱中的五星上将黄金柱}T60:=V=HHV(V,60);T100:=V=HHV(V,100);T2:=V/REF(VOL,1)>=3;T3:=REF(C,1)/REF( O,1)<3;五星上将:=(T60 AND T2 AND T3) OR (T100 AND T2 AND T3);DRAWICON(五星上将,H,23);{量柱图}C2:=REF(C,1);涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);STICKLINE(涨停,OPEN,CLOSE,-1,0),COLORWHITE;STICKLINE(涨停,H,L,0,0),COLORWHITE;DRAWICON(涨停,L-0.2,11);DRAWTEXT(涨停,L-0.2,' --涨停');跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);STICKLINE(跌停,OPEN,CLOSE,-1,0),COLORBLUE;STICKLINE(跌停,H,L,0,1),COLORBLUE;DRAWICON(跌停,H+0.2,2);DRAWTEXT(跌停,H+0.2,' --跌停');{大阳线:=IF((C-C2)*100/C2>=5,1,0) AND IF((C-C2)*100/C2<(10-0.01*100/C2),1,0) OR IF((C-O)*100/O>=5,1,0) AND 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) AND IF((C2-C)*100/C2<(10-0.01*100/C2),1,0) OR IF((O-C)*100/O>=5,1,0) AND IF((C2-C)*100/C2<(10-0.01*100/C2),1,0);STICKLINE(大阴线,OPEN,CLOSE,-1,0),COLORGREEN;STICKLINE(大阴线,H,L,0,1),COLORGREEN;}{MA13:MA(CLOSE,13),COLORWHITE;MA34:MA(CLOSE,34),COLORYELLOW;MA55:MA(CLOSE,55),COLOR9933FF;}{MA4:MA(CLOSE,4),COLORWHITE;MA10:MA(CLOSE,10),COLORYELLOW;MA20:MA(CLOSE,20),COLOR9933FF;MA30:MA(CLOSE,30),COLORLIBLUE;MA60:MA(CLOSE,60),COLORWHITE;MA120:MA(CLOSE,120),COLORLIGREEN;}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,POINTDOT,LINETHICK3;前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,POINTDOT,LINETHICK3;{求位置坐标}PHD:=IF(LLV(L,3)>=REF(H,3),REF(H,3),IF((LLV(L,3)>=REF(C,3) AND REF(C,3)>REF(O,3)),REF(C,3),IF(LLV(L,3)>=REF(O,3) AND REF(C,3)>REF(O,3),REF(O,3),REF(L,3))));{自动画量能平台}{NN 1 300 21}{NN:=21;TTJ:=BARSLAST(REF(倍量黄金柱,NN-1));K0:=TTJ=0;K1:=SUMBARS(K0,1);K2:=SUMBARS(K0,2);K3:=SUMBARS(K0,3);K4:=SUMBARS(K0,4);K5:=SUMBARS(K0,5);K6:=SUMBARS(K0,6);K7:=SUMBARS(K0,7);K8:=SUMBARS(K0,8);K9:=SUMBARS(K0,9);K10:=SUMBARS(K0,10);CCCC1:=REF(C,K1-1);}{在K线图上标示量柱类型}倍量:=DRAWICON((VOL>REF(V,1)*2.0 OR VOL=REF(V,1)*2.0) AND C>REF(C,1),H+0.2,26);低量:=DRAWICON(VOL<REF(LLV(VOL,13),1),H+0.1,2);地量:=DRAWICON(VOL<REF(LLV(VOL,100),1),H+0.1,12);平量:=DRAWICON(ABS(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5)<=0.03 OR ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.03,H+0.1,16);倍缩:=DRAWICON(VOL<=REF(V,1)*0.5,H+0.1,27);{画量柱标识:}{1.画倍量黄金柱标识--红箭头图标}倍量黄金柱:=DRAWICON((LLV(L,3)>REF(L,3) OR LLV(L,3)=REF(L,3)) AND HHV(V,3)<REF(V,3) ANDREF(C,3)>REF(O,3) AND REF(V,3)>=2*REF(V,4),H+0.2,1);{2.画梯量黄金柱标识--橘子图标}梯量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) ANDREF(V,5)>REF(V,6) AND REF(V,4)>REF(V,5) AND REF(V,3)>REF(V,4),H,17);{3.画平量黄金柱标识--苹果图标}平量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) ANDREF(C,3)>REF(O,3) AND ABS(REF(V,3)-REF(V,4))/REF(V,4)<=0.03,H,19);{4.画立桩量标识--顶部红箭头图标}N:=25;立桩量:=REF(V,3)/REF(MA(V,5),4)>(N/10) ANDREF(V,3)/REF(HHV(V,60),4)>1.5 AND LLV(L,3)>REF(L,3);STICKLINE(倍量,OPEN,CLOSE,-1,0),COLORYELLOW;倍量黄金线:STICKLINE(倍量黄金柱,PHD,PHD,30,0),COLORWHITE;DRAWICON(倍量黄金柱,PHD*1.008,12);DRAWTEXT(倍量黄金柱,PHD*1.010,' 标准黄金柱精准线'),COLORFF00FF;DRAWTEXT(倍量黄金柱,PHD,'================='),COLORWHITE;{平量黄金线:STICKLINE(平量黄金柱,PHD*1.002,PHD,100,0),COLORYELLOW;DRAWTEXT(平量黄金柱,PHD*1.015,'平量黄金线'),COLORLIGREEN ;梯量黄金线:STICKLINE(梯量黄金柱,PHD*1.002,PHD,100,0),COLORYELLOW;DRAWTEXT(梯量黄金柱,PHD*1.015,'梯量黄金线'),COLORFF00FF ;}立桩量标识:DRAWICON(立桩量,H*1.002,1);DRAWTEXT(立桩量,H*1.06,'立'),COLORRED;DRAWTEXT(立桩量,H*1.04,'桩'),COLORRED;DRAWTEXT(立桩量,H*1.02,'量'),COLORRED;{DA:STICKLINE(K4<=30,REF(C,K4-1)*1.002,REF(C,K4-1),10,0),COLORBLUE;EA:STICKLINE(K5<=30,REF(C,K5-1)*1.002,REF(C,K5-1),10,0),COLORBLUE;FA:STICKLINE(K6<=30,REF(C,K6-1)*1.002,REF(C,K6-1),10,0),COLORBLUE;GA:STICKLINE(K7<=30,REF(C,K7-1)*1.002,REF(C,K7-1),10,0),COLORBLUE;HA:STICKLINE(K8<=30,REF(C,K8-1)*1.002,REF(C,K8-1),10,0),COLORBLUE;IA:STICKLINE(K9<=30,REF(C,K9-1)*1.002,REF(C,K9-1),10,0),COLORBLUE;JA:STICKLINE(K10<=30,REF(C,K10-1)*1.002,REF(C,K10-1),10,0),COLORBLUE;}AAA:=CONST(HHV(H,90));TS1:=0+0.03;TS2:=TS1+0.03;TS3:=TS2+0.03;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS1),'<一>.量柱的阶段性拐点标志--空间转化原则:'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS2),' 1.平台起柱:在K线整理平台上突然起柱;'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS3),' 2.凹口起柱:在K线逐步回调形成凹口时起柱.常见凹口倍量;'),COLORFF00FF ;TS4:=TS3+0.03;TS5:=TS4+0.03;TS6:=TS5+0.03;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS4),' 3.过顶起柱:过左峰起柱.常见过顶倍量;'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS5),' 4.触底起柱:触前期谷底起柱.常见触底倍量.'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS6),'<二>.量柱的集合定性--组合量柱:'),COLORFF00FF ;TS7:=TS6+0.03;TS8:=TS7+0.03;TS9:=TS8+0.03;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS7),' 1.低量柱+倍量柱:后市必大涨!'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS8),' 2.倍量柱+倍量柱:主庄控盘良好,急于拉升!'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS9),' 3.缩倍柱+倍量柱:机会就在眼前!'),COLORFF00FF ;{============================}BBB:=CONST(HHV(H,190));TT1:=0+0.03;TT2:=TT1+0.03;TT3:=TT2+0.03;DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT1),'<三>.量柱的三日定性--时间转化原则:'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT2),' 1.后三日价升量缩:转化为黄金柱;'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT3),' 2.后三日量柱先阴后阳:该量柱官升一级;'),COLORFF00FF ;TT4:=TT3+0.03;TT5:=TT4+0.03;DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT4),' 3.后三日量柱阴阳相间:量柱退化,走势面临调整;'),COLORFF00FF ;DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT5),' 4.后三日量柱实体逐步缩小:力量将衰退,面临调整.'),COLORFF00FF ;{底部趋势拐点}VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);VOLUME:=VOL;AAG:=VOL>=REF(V,1)*1.91 AND C>REF(C,1);AA1G:=VOL<REF(LLV(VOL,21),1);AA2G:=VOL<REF(LLV(VOL,55),1);AA3G:=ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.05;MAVOL5:=MA(VOLUME,5);MAVOL35:=MA(VOLUME,35);MAVOL135:=MA(VOLUME,135);VOLUME5:=MA(VOLUME,5);VOLUME35:=MA(VOLUME,35);VOLUME135:=MA(VOLUME,135);买入:=CROSS(VOLUME5,VOLUME135);DRAWICON(买入,L,9);买入1:=CROSS(VOLUME35,VOLUME135);DRAWICON(买入1,L,5);买入2:=CROSS(VOLUME5,VOLUME35);DRAWICON(买入2,L,1);{非常棒}EMA13:=EMA(C,13),COLORWHITE;EMA21:=EMA(C,21),COLORYELLOW;EMA34:=EMA(C,34),COLORFF00FF;EMA60:=MA(C,60),COLORFFCC66;VAR2:=(2*CLOSE+HIGH+LOW)/4;VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);VAR4:=LLV(LOW,5); VAR5:=HHV(HIGH,4);散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←低吸'),COLORLIRED;DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←高抛'),COLORGREEN;DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);VAR9:=CLOSE-REF(CLOSE,5);VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20 );卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);DRAWICON(卖出<0,H+0.05,2);买线:=EMA(CLOSE,2);卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LIN ETHICK3,COLORYELLOW;VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLO RGREEN;A0:=(L+H+C*2)/4;A1B:EMA(A0,14),COLORBLUE,LINETHICK2;A2B:=EMA(A0,25),COLORLIBLUE,LINETHICK2;A1X:=(A1B-REF(A1B,1))/REF(A1B,1)*100,NODRAW;A2X:=(A2B-REF(A2B,1))/REF(A2B,1)*100,NODRAW;看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1 X,0))),DRAWNULL),COLORMAGENTA{,LINETHICK2};逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A 1X))),DRAWNULL),COLORCYAN,{LINETHICK2};买入持股:IF(A1X>=0,A1B,DRAWNULL)COLORRED,LINETHICK3;卖出空仓:IF(A1X<0 AND A2X<0,A1B,DRAWNULL)COLORGREEN,LINETHICK3;{STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;};。
技术指标公式(通达信)
技术指标公式(通达信)1.技术指标公式-股王源码V AR2:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;V AR3:=SMA(V AR2,5,1);V AR4:=REF(V AR3,1);V AR5:=SMA(V AR3,10,1);V AR6:=(HHV(HIGH,52)-CLOSE)/(HHV(HIGH,52)-LLV(LOW,52))*100;V AR7:=MA(V AR6,5);V AR8:=LLV(LOW,5)=LLV(LOW,120);V AR9:=REF(CLOSE,1);V ARA:=SMA(MAX(CLOSE-V AR9,0),6,1)/SMA(ABS(CLOSE-V AR9),6,1)*100;V ARB:=SMA(MAX(CLOSE-V AR9,0),12,1)/SMA(ABS(CLOSE-V AR9),12,1)*100; V ARC:=(CLOSE+LOW+HIGH)/3;V ARD:=SUM((V ARC-REF(LOW,1)-(HIGH-V ARC))*VOL/100000/(HIGH-LOW),0) ;V ARE:=EMA(V ARD,1);V ARF:=V ARE;V AR10:=MA(V ARE,12);V AR11:=MA(V ARE,26);V AR12:=(V ARF-V AR10)*60;V AR13:=IF(V AR12>0.05,V AR12,0);V AR14:=IF(V AR13>50,50,V AR13);V AR15:=CAPITAL/EMA(VOL,5)/30*1.1;V AR16:=V AR15;V AR17:=EMA(COST(85),10);V AR18:=EMA(COST(1),10);V AR19:=EMA(CLOSE,10);V AR1A:=(V AR19-V AR18)*100/(V AR17-V AR18);V AR1B:=REF(V AR1A,1);V AR1C:=(CLOSE-REF(CLOSE,12))/REF(CLOSE,12)*100;V AR1D:=(INDEXC-REF(INDEXC,12))/REF(INDEXC,12)*100;V AR1E:=EMA(V AR1C-V AR1D,4);V AR1F:=EMA(V AR1D-V AR1C,4);STICKLINE(V AR1E>0,0,-5,6,0);STICKLINE(V AR8,-5,-10,6,0);V AR20:=MA(V AR1C,4);V AR21:=MA(V AR1C,8);V AR22:=REF(V AR20,1);V AR23:=MA((V AR1A-REF(V AR1A,12))/REF(V AR1A,12)*100,4);V AR24:=IF(V AR23<=-20,-20,V AR23);V AR25:=IF(V AR24>=20,20,V AR24);V AR26:=V AR25;V AR27:=REF(V AR26,1);V AR28:=REF(V AR26,5);V AR29:=IF(CROSS(V AR14,V AR16),1,0);V AR2A:=IF(V AR14<V AR16,-10,10);V AR2B:=IF(V AR1E>V AR1F,5,-5);V AR2C:=IF(V AR3>V AR5,5,-5);V AR2D:=IF(V AR20>V AR21,6,-6);V AR2E:=IF(V AR20>0 AND V AR20>V AR21,8,-8);V AR2F:=IF(V AR26<0,-10,10);V AR30:=IF(V AR20>V AR22,10,-10);V AR31:=IF(V AR26>V AR27,5,0);V AR32:=IF(V AR26<V AR27,-5,0);V AR33:=IF(CLOSE>OPEN,3,-3);走势: (V AR2A+V AR2B+V AR2C+V AR2D+V AR2E+V AR2F+V AR30+V AR31+V AR32+V A R33);V AR34:=REF(CLOSE,2)*0.865;V AR35:=REF(CLOSE,13)*0.772;V AR36:=MIN(V AR34,V AR35);V AR37:=100*VOL/CAPITAL;V AR38:=MA(CLOSE,13);V AR39:=CLOSE>0.899*REF(CLOSE,1) AND CLOSE<0.901*REF(CLOSE,1);V AR3A:=EMA(WINNER(CLOSE)*100,5);V AR3B:=EMA(WINNER(CLOSE)*100,30)-CAPITAL/EMA(VOL,30)/5;V AR3C:=CAPITAL/EMA(VOL,5)/5;V AR3D:=V AR3A;V AR3E:=IF(V AR3D>0,0-V AR3D,0-V AR3D);V AR3F:=REF(V AR3D,1);主力趋势: (V AR3B+50);V AR40:=V AR3B+50;V AR41:=REF(V AR40,1);V AR42:=MA(CLOSE,5);V AR43:=MA(CLOSE,10);V AR44:=MA(CLOSE,30);V AR45:=MA(CLOSE,12);V AR46:=MA(CLOSE,26);V AR47:=REF(V AR45,1);V AR48:=REF(V AR46,1);V AR49:=(V AR45-V AR46)/V AR45*100;V AR4A:=ABS(V AR45-V AR47)/V AR45*100;V AR4B:=REF(V AR46,1);V AR4C:=REF(V AR4A,1);V AR4D:=REF(V AR42,1);V AR4F:=COUNT(CLOSE>REF(CLOSE,1),5)/5*100;V AR50:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;V AR51:=SMA(V AR50,5,1);V AR52:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;V AR53:=SMA(V AR52,2,1);V AR54:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30)*8;V AR55:=REF(V AR51,1);V AR56:=REF(V AR53,1);V AR57:=REF(V AR54,1);V AR58:=MA(V AR53,5);V AR59:=MA(V AR53,12);V AR5A:=MA(V AR53,26);V AR5B:=REF(V AR4F,1);V AR5C:=(V AR54-V AR57)/V AR54*100;V AR5D:=SMA(V AR50,5,1);V AR5E:=REF(V AR5D,1);V AR5F:=SMA(V AR52,2,1);V AR60:=REF(V AR5F,1);V AR61:=IF(CLOSE>OPEN,1,0);V AR62:=IF(V AR42>V AR4D,1,0);V AR63:=IF(V AR43>V AR4E,1,0);V AR64:=IF(V AR4A>V AR4C,1,0);V AR65:=IF(V AR53>V AR56,5,0);V AR66:=IF(V AR55>V AR51,5,0);V AR67:=IF(V AR54>V AR57,2,0);V AR68:=IF(V AR49>2.25,10,0);V AR69:=IF(V AR53>60,6,0);V AR6A:=IF(V AR53>80,8,0);V AR6B:=IF(V AR53>V AR51,10,0);V AR6C:=IF(V AR53>V AR51,V AR59-V AR5A,0);V AR6D:=IF(V AR53>V AR51 AND V AR51<20,5,0);V AR6E:=IF(CLOSE>V AR45 AND V AR45>V AR46,5,0);V AR6F:=IF(V AR45>V AR46,5,0);V AR70:=IF(V AR46>V AR4B,5,0);V AR71:=IF(V AR51<18,V AR58-V AR51,0);V AR72:=IF(V AR51>V AR53 AND V AR51>50,8,0);V AR73:=(V AR61+V AR62+V AR63+V AR64+V AR65+V AR66+V AR67+V AR68+V AR 69+V AR6A+V AR6B+V AR6C+V AR6D+V AR6E+V AR6F+V AR70+V AR71-V AR72); V AR74:=REF(V AR73,1);多头: MA(V AR73,5);V AR75:=MA(V AR73,8);V AR76:=MA(V AR73,12);V AR77:=MA(V AR73,26);V AR79:=REF(V AR76,1);V AR7A:=REF(V AR76,2);V AR7B:=IF(CROSS(V AR3,V AR5) AND V AR4<35 AND V AR7>50 AND V AR1A<25 AND V AR1A>V AR1B AND V AR41<V AR40 AND (V ARA>V ARB AND V ARB>V AR3 OR V ARA>V AR3 AND V AR8),100,0);V AR7C:=IF((CLOSE-V AR36)/CLOSE<0.1 AND V AR41<V AR40 AND SUM(V AR37,5)/5<1.8,100,0);V AR7D:=IF(CROSS(V AR3,V AR5) AND V AR8 AND V AR3<25 AND V AR1A<20 OR CROSS(V AR3,V AR5) AND V AR8 AND V AR3<40 AND V AR1A<10,100,0);信号: IF(V AR7B=100 OR V AR7C=100 OR V AR7D=100,20,-50);STICKLINE(走势<0,0,走势,1,0);STICKLINE(走势>0,走势,0,1,0);2 技术指标公式-大盘神针V AR1:=INDEXA/100000000;V AR2:=INDEXADV;V AR3:=INDEXDEC;V AR4:=V AR2/(V AR2+V AR3);V AR5:=V AR3/(V AR2+V AR3);V AR6:=EMA(V AR4,3);V AR7:=EMA(VAR5,3);V AR8:=EMA(V AR6,5);V AR9:=EMA(V AR7,5);进场资金: EMA(V AR8,10)/150 ,CIRCLEDOT,COLORRED;资金: EMA(V AR9,10)/150, CIRCLEDOT,COLORGREEN;大盘神针:=(SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE, 3)),7,1)*100<20ANDSMA(MAX(CLOSE-REF(CLOSE,3),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,3)),1 3,1)*100<25AND MA((LLV(LOW,45)-CLOSE)/(HHV(HIGH,45)-LLV(LOW,45))*100,5)>-19 AND (LOW>LLV(LOW,5) AND (CLOSE-HHV(CLOSE,8))/HHV(CLOSE,8)<-0.05 ANDMA(AMOUNT,125)/MA(VOL,125)/(MA(AMOUNT,5)/MA(VOL,5))>1.12))*0.75; 买:=BARSLAST(大盘神针)<15 AND CROSS(MACD.DIF,MACD.DEA);底:=BARSLAST(LLV(L,4)=LLV(L,120))<5 ;均线买:=CROSS(MA(C,5),MA(C,20));介入:=(底AND 均线买AND (进场资金>资金) OR 买);STICKLINE(介入,资金-0.5,资金+0.1,2,0),COLORRED;DRAWTEXT(介入,资金-0.15,'介入'),COLORWHITE;STICKLINE(大盘神针,资金-0.2,资金+0.6,2,0),COLORFFFF00;DRAWTEXT(大盘神针,资金+0.5,'神针'),COLORFFFF00;安全区:STICKLINE(底,资金-0.1,资金,3,0),COLORRED;3 技术指标公式-KDJ短线short(2,100,12)long(2,100,26)mid(2,100,9)V AR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;V AR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;V AR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;V AR6:=(V AR3+V AR4+V AR5)/3;V AR7:=EMA(V AR6,5);V AR8:=IF(V AR6<=-20,10,0);V AR9:=HHV(V AR8,10);STICKLINE(V AR8=10,20,10,5,0),COLOR6666FF;V ARA:=IF(V AR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);K:EMA(V AR7,5)*2,COLORWHITE;D:EMA(K,5), COLORYELLOW;J:K*3-D*2, COLORFF00FF;MACD: EMA(EMA(V AR3,5),5)*3, COLORSTICK;V ARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10; DRAWTEXT(V AR8=10 AND FILTER(V AR8=10,5),-10{15},'近底部'),LINETHICK1,COLORYELLOW;STICKLINE(V AR8=10 AND FILTER(V AR8=10,5),-1.6{20},-10,5,0),COLORYELLOW;DRAWTEXT(V ARA=20,15,'底部'),LINETHICK1,COLORWHITE;STICKLINE((V ARA=20),0,10,5,0),COLORWHITE;V ARC:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3));V ARD:=(ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3));STICKLINE((V ARC=1),(-14),0,4,0),COLOR0000FF;DRAWTEXT((V ARC=1),(-14),'买'),COLORFF00FF;STICKLINE((V ARD=1),14,0,4,0),COLOR00FF00;DRAWTEXT((V ARD=1),18,'卖'),COLORYELLOW;V ARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-2 0;V ARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*10 0,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*1 00,20,1),15,1);V AR10:=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);V AR11:=V ARF<REF(V AR10,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);DRAWTEXT(V AR11 AND COUNT(V AR11,30)=1,15,'大资金活动'),LINETHICK1,COLORFF00FF;4 技术指标公式-短炒公式V AR1:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/ MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;持币区域:V AR1,COLORFEDCBA;持股区域:IF(V AR1>0,V AR1,0),COLORRED;短顶:STICKLINE(V AR1>9 AND FILTER(V AR1<REF(V AR1,1),5),V AR1+2,0,3,0),COLORGREEN;大顶:STICKLINE(V AR1>20 AND FILTER(V AR1<REF(V AR1,1),5),V AR1+5,0,7,0),COLOR00FF00;V AR2:=HHV(V AR1>20,10);危险: STICKLINE(V AR2 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),V A R1+10,0,4,0);注意止损:STICKLINE(V AR2 AND FILTER(V AR1< REF(V AR1,1),6)AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),V AR1+6,0,3,0);短底:STICKLINE(V AR1<-9 AND V AR1> REF(V AR1,1),V AR1-2,0,3,0),COLORRED;大底:STICKLINE(V AR1<-20 AND FILTER(V AR1> REF(V AR1,1),5),V AR1-5,0,7,0),COLORYELLOW;买入准备:V AR1<-9 AND V AR1>REF(V AR1,1),COLORWHITE;DRAWTEXT(V AR1>9 AND FILTER(V AR1<REF(V AR1,1),5),V AR1+2,'短顶'),COLOR00FF00;DRAWTEXT(V AR1>20 AND FILTER(V AR1<REF(V AR1,1),5),V AR1+5,'大顶'),COLORFFFF00;DRAWTEXT(V AR2 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),V A R1+10,'危险'),COLOR00FFFF;DRAWTEXT(V AR2 AND FILTER(V AR1< REF(V AR1,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),V AR1+6,'注意止损'),COLORFF00FF; DRAWTEXT(FILTER(V AR1<-9 AND V AR1>REF(V AR1,1),18),V AR1-2,'短底'),,COLOR0000FF;DRAWTEXT(V AR1<-20 AND FILTER(V AR1> REF(V AR1,1),5),V AR1-5,'大底'),; DRAWTEXT(FILTER(V AR1<-9 AND V AR1>REF(V AR1,1),18),1,'买入准备');5 技术公式—macdDIFF:EMA(CLOSE,12)-EMA(CLOSE,27);DEA:EMA(DIFF,9);MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;DRAWICON(二次金叉,DEA*0.9,1) ;DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4; DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4; DRAWTEXT(低位金叉AND 二次金叉AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2;。
通达信系统指标公式
通达信系统指标公式并非闲人编辑整理2016 年4 月目录 (2)第一章技术指标公式 (1)第一节大势型 (1)第二节超买超卖型 (3)第三节趋势型 (9)第四节能量型 (14)第五节成交量型 (16)第六节均线型 (19)第七节图表型 (22)第八节路径型 (23)第九节停损型 (24)第十节策略型 (25)第十一节神系 (28)第十二节龙系 (29)第十三节鬼系 (31)第十四节其他系 (32)第十五节特色型 (37)第二章条件选股公式 (43)第一节指标条件选股 (43)第二节基本面选股 (48)第三节即时盘中选股 (49)第四节走势特征选股 (50)第五节形态特征选股 (56)第三章专家系统公式 (61)第四章五彩K 线公式 (65)通达信系统指标公式第一章技术指标公式第一节大势型ABI 绝对广量指标ABI:100*ABS(ADV ANCE-DECLINE)/(ADV ANCE+DECLINE);MAABI:EMA(ABI,M);ADL 腾落指标ADL:SUM(ADV ANCE-DECLINE,0);MAADL:MA(ADL,M);ADR 涨跌比率ADR:SUM(ADV ANCE,N)/SUM(DECLINE,N);MAADR:MA(ADR,M);ARMS 阿姆氏指标ARMS:EMA(ADV ANCE/DECLINE,N); MAARMS:MA(ARMS,M);BTI 广量冲力指标BTI:EMA(100*ADV ANCE/(ADV ANCE+DECLINE),N); MABTI:MA(BTI,M);MCL 麦克连指标DIF:=ADV ANCE-DECLINE; EMA1:=EMA(DIF,N1); EMA2:=EMA(DIF,N2); MCL:EMA1-EMA2; MAMCL1:EMA1; MAMCL2:EMA2;MSI 麦氏综合指标(加密)OBOS 超买超卖指标OBOS:EMA(ADV ANCE-DECLINE,N); MAOBOS:MA(OBOS,M);STIX 指数平滑广量TBR:100*ADV ANCE/(ADV ANCE+DECLINE);MATBR:EMA(TBR,M);第二节超买超卖型CCI 商品路径指标TYP:=(HIGH+LOW+CLOSE)/3;CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));KDJ 随机指标KDJRSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:SMA(RSV ,M1,1);D:SMA(K,M2,1);J:3*K-2*D;MFI 资金流量指标TYP := (HIGH + LOW + CLOSE)/3;V1:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP<REF(TYP,1),TYP*VOL,0),N); MFI:100-(100/(1+V1));MTM 动量线MTM:CLOSE-REF(CLOSE,N); MTMMA:MA(MTM,M);OSC 变动速率线OSC:100*(CLOSE-MA(CLOSE,N)); MAOSC:EXPMEMA(OSC,M);RSI 相对强弱指标LC:=REF(CLOSE,1);RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100; RSI2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100; RSI3:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;MARSI 相对强弱平均线 DIF:=CLOSE-REF(CLOSE,1);VU:=IF(DIF>=0,DIF,0); VD:=IF(DIF<0,-DIF,0); MAU1:=MEMA(VU,M1); MAD1:=MEMA(VD,M1);MAU2:=MEMA(VU,M2); MAD2:=MEMA(VD,M2);RSI10:MA(100*MAU1/(MAU1+MAD1),M1); RSI6:MA(100*MAU2/(MAU2+MAD2),M2);KD 随机指标 KDRSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; K:SMA(RSV ,M1,1); D:SMA(K,M2,1);SKDJ 慢速随机指标LOWV:=LLV(LOW,N); HIGHV:=HHV(HIGH,N);RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,M); K:EMA(RSV ,M); D:MA(K,M);UDL 引力线UDL:(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4; MAUDL:MA(UDL,M);WR 威廉指标WR1:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)); WR2:100*(HHV(HIGH,N1)-CLOSE)/(HHV(HIGH,N1)-LLV(LOW,N1));LWR 慢速威廉指标RSV:= (HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))*100; LWR1:SMA(RSV,M1,1);LWR2:SMA(LWR1,M2,1);BIAS-QL 乖离率-传统版BIAS :(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100;BIASMA :MA(BIAS,M);BIAS 乖离率BIAS1 :(CLOSE-MA(CLOSE,N1))/MA(CLOSE,N1)*100;BIAS2 :(CLOSE-MA(CLOSE,N2))/MA(CLOSE,N2)*100;BIAS3 :(CLOSE-MA(CLOSE,N3))/MA(CLOSE,N3)*100;BIAS36 三六乖离BIAS36:MA(CLOSE,3)-MA(CLOSE,6);BIAS612:MA(CLOSE,6)-MA(CLOSE,12);MABIAS:MA(BIAS36,M);ACCER 幅度涨速CYD 承接因子CYDS:WINNER(CLOSE)/(VOL/CAPITAL);CYDN:WINNER(CLOSE)/MA(VOL/CAPITAL,N);CYF 市场能量CYF:100-100/(1+EMA(HSL,N));FSL 分水岭SWL:(EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;SWS:DMA(EMA(CLOSE,12),MAX(1,100*(SUM(VOL,5)/(3*CAPITAL))));ADTM 动态买卖气指标DTM:=IF(OPEN<=REF(OPEN,1),0,MAX((HIGH-OPEN),(OPEN-REF(OPEN,1)))); DBM:=IF(OPEN>=REF(OPEN,1),0,MAX((OPEN-LOW),(OPEN-REF(OPEN,1)))); STM:=SUM(DTM,N); SBM:=SUM(DBM,N);ACCER:SLOPE(CLOSE,N)/CLOSE;ADTM:IF(STM>SBM,(STM-SBM)/STM,IF(STM=SBM,0,(STM-SBM)/SBM)); MAADTM:MA(ADTM,M);ATR真实波幅MTR:MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW)); ATR:MA(MTR,N);DKX 多空线MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;DKX:(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;MADKX:MA(DKX,M);TAPI 加权指数成交值(需下载日线)TAPI:AMOUNT/INDEXC;MATAIP:MA(TAPI,M);第三节 趋势型ASI 振动升降指标(加密)CHO 佳庆指标MID:=SUM(VOL*(2*CLOSE-HIGH-LOW)/(HIGH+LOW),0);CHO:MA(MID,N1)-MA(MID,N2);MACHO:MA(CHO,M);DMA 平均差DIF:MA(CLOSE,N1)-MA(CLOSE,N2);DIFMA:MA(DIF,M);DMI 趋向指标MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N) HD :=HIGH-REF(HIGH,1);LD :=REF(LOW,1)-LOW;DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);PDI: DMP*100/MTR;MDI: DMM*100/MTR;ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM);ADXR:EXPMEMA(ADX,MM);DPO 区间震荡线DPO:CLOSE-REF(MA(CLOSE,N),N/2+1);MADPO:MA(DPO,M);EMV 简易波动指标VOLUME:=MA(VOL,N)/VOL;MID:=100*(HIGH+LOW-REF(HIGH+LOW,1))/(HIGH+LOW); EMV:MA(MID*VOLUME*(HIGH-LOW)/MA(HIGH-LOW,N),N); MAEMV:MA(EMV ,M);MACD 平滑异同平均DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG); DEA:EMA(DIF,MID);MACD:(DIF-DEA)*2,COLORSTICK;VMACD 量平滑异同平均DIF:EMA(VOL,SHORT)-EMA(VOL,LONG); DEA:EMA(DIF,MID);MACD:DIF-DEA,COLORSTICK;QACD 快速异同平均DIF:EMA(CLOSE,N1)-EMA(CLOSE,N2); MACD:EMA(DIF,M);DDIF:DIF-MACD;TRIX 三重指数平均线MTR:=EMA(EMA(EMA(CLOSE,N),N),N);TRIX:(MTR-REF(MTR,1))/REF(MTR,1)*100;MATRIX:MA(TRIX,M) ;UOS 终极指标TH:=MAX(HIGH,REF(CLOSE,1));TL:=MIN(LOW,REF(CLOSE,1));ACC1:=SUM(CLOSE-TL,N1)/SUM(TH-TL,N1);ACC2:=SUM(CLOSE-TL,N2)/SUM(TH-TL,N2);ACC3:=SUM(CLOSE-TL,N3)/SUM(TH-TL,N3);UOS:(ACC1*N2*N3+ACC2*N1*N3+ACC3*N1*N2)*100/(N1*N2+N1*N3+N2*N3); MAUOS:EXPMEMA(UOS,M);VPT 量价曲线VPT:SUM(VOL*(CLOSE-REF(CLOSE,1))/REF(CLOSE,1),N);MA VPT:MA(VPT,M);WVAD 威廉变异离散量WVAD:SUM((CLOSE-OPEN)/(HIGH-LOW)*VOL,N)/10000; MAWV AD:MA(WV AD,M);PAV 筹码引力(加密)DBQR 对比强弱ZS:(INDEXC-REF(INDEXC,N))/REF(INDEXC,N);GG:(CLOSE-REF(CLOSE,N))/REF(CLOSE,N); MADBQR1:MA(GG,M1);MADBQR2:MA(GG,M2);MADBQR3:MA(GG,M3);JS 加速线JS:100*(CLOSE-REF(CLOSE,N))/(N*REF(CLOSE,N)); MAJS1:MA(JS,M1);MAJS2:MA(JS,M2);MAJS3:MA(JS,M3);PAVE 强筹码引力(加密)CYE 市场趋势MAL:=MA(CLOSE,5);MAS:=MA(MA(CLOSE,20),5);CYEL:(MAL-REF(MAL,1))/REF(MAL,1)*100;CYES:(MAS-REF(MAS,1))/REF(MAS,1)*100;QR 强弱个股: (CLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100; 大盘: (INDEXC-REF(INDEXC,N))/REF(INDEXC,N)*100; 强弱值:EMA( 个股-大盘,2),COLORSTICK;GDX 鬼道线AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,N))/MA(CLOSE,N); JAX:DMA(CLOSE,AA);压力线:(1+M/100)*JAX;支撑线:(1-M/100)*JAX;JLHB 绝路航标VAR1:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80; B:SMA(V AR1,N,1);VAR2:SMA(B,M,1);绝路航标:IF(CROSS(B,V AR2) AND B<40,50,0);第四节能量型BRAR 情绪指标BR:SUM(MAX(0,HIGH-REF(CLOSE,1)),N)/SUM(MAX(0,REF(CLOSE,1)-LOW),N)*100; AR:SUM(HIGH-OPEN,N)/SUM(OPEN-LOW,N)*100;CR 带状能量线MID:=REF(HIGH+LOW,1)/2;CR:SUM(MAX(0,HIGH-MID),N)/SUM(MAX(0,MID-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);MASS 梅斯线MASS:SUM(MA(HIGH-LOW,N1)/MA(MA(HIGH-LOW,N1),N1),N2);MAMASS:MA(MASS,M);PSY 心理线PSY:COUNT(CLOSE>REF(CLOSE,1),N)/N*100;PSYMA:MA(PSY,M);VR 成交量变异率TH:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,0),N);TL:=SUM(IF(CLOSE<REF(CLOSE,1),VOL,0),N);TQ:=SUM(IF(CLOSE=REF(CLOSE,1),VOL,0),N);VR:100*(TH*2+TQ)/(TL*2+TQ);MA VR:MA(VR,M);WAD 威廉多空力度线MIDA:=CLOSE-MIN(REF(CLOSE,1),LOW);MIDB:=IF(CLOSE<REF(CLOSE,1),CLOSE-MAX(REF(CLOSE,1),HIGH),0); WAD:SUM(IF(CLOSE>REF(CLOSE,1),MIDA,MIDB),0);MAW AD:MA(W AD,M);PCNT 幅度比PCNT:(CLOSE-REF(CLOSE,1))/CLOSE*100;MAPCNT:EXPMEMA(PCNT,M);CYR 市场强弱DIVE:=0.01*EMA(AMOUNT,N)/EMA(VOL,N);CYR:(DIVE/REF(DIVE,1)-1)*100;VOL 成交量VOLUME:VOL,VOLSTICK;MA VOL1:MA(VOLUME,M1);MA VOL2:MA(VOLUME,M2);MACYR:MA(CYR,M);NVI 负成交量(加密)PVI 正成交量(加密)第五节 成交量型AMO 成交金额AMO:AMOUNT,VOLSTICK;MAAMO1:MA(AMO,M1);MAAMO2:MA(AMO,M2);MAAMO3:MA(AMO,M3);OBV 累积能量线VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,V A),0);MAOBV:MA(OBV,M);VOL-TDX成交量(盘中虚拟)TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZN UM,1)))));MTIME:=MOD(FROMOPEN,TOTAL);CTIME:=IF(MTIME<0.5,TOTAL,MTIME);VVOL:IF((CURRBARSCOUNT=1DYNAINFO(8)>1),VOL*TOTAL/CTIME,DRAWNULL),NODRAW;STICKLINE((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VVOL,0,-1,-1),COLOR00C0C0; VOLUME:VOL,VOLSTICK;MA VOL1:MA(VOLUME,M1);MA VOL2:MA(VOLUME,M2);SHORTVOL 抛空量(适用于港股) 抛空量:HKSHORTVOL,VOLSTICK; MACCL:MA( 抛空量,M);ANDCCL 持仓量(适用于期货)持仓量:VOLINSTK; MACCL:MA(持仓量,M);VRSI 相对强弱量LC:=REF(VOL,1);RSI1:SMA(MAX(VOL-LC,0),N1,1)/SMA(ABS(VOL-LC),N1,1)*100; RSI2:SMA(MAX(VOL-LC,0),N2,1)/SMA(ABS(VOL-LC),N2,1)*100; RSI3:SMA(MAX(VOL-LC,0),N3,1)/SMA(ABS(VOL-LC),N3,1)*100;HSL 换手线HSL:100*VOL/(FINANCE(7)/100);MAHSL:MA(HSL,N);HSCOL 换手柱HSCOL:100*VOL/(FINANCE(7)/100),VOLSTICK;MAHSL:MA(HSCOL,N);DBQRV 对比强弱量ZS:(INDEXV-REF(INDEXV ,N))/REF(INDEXV ,N); GG:(VOL-REF(VOL,N))/REF(VOL,N);DBLB 对比量比GG:=VOL/SUM(REF(VOL,1),N);ZS:=INDEXV/SUM(REF(INDEXV ,1),N);DBLB:GG/ZS; MADBLB:MA(DBLB,M);第六节均线型MA 均线MA1:MA(CLOSE,M1); MA2:MA(CLOSE,M2); MA3:MA(CLOSE,M3); MA4:MA(CLOSE,M4);MA2 均线MA1:MA(CLOSE,M1); MA2:MA(CLOSE,M2); MA3:MA(CLOSE,M3); MA4:MA(CLOSE,M4); MA5:MA(CLOSE,M5); MA6:MA(CLOSE,M6); MA7:MA(CLOSE,M7); MA8:MA(CLOSE,M8); MA9:MA(CLOSE,M9); MA10:MA(CLOSE,M10);ACD 升降线LC:=REF(CLOSE,1);DIF:=CLOSE-IF(CLOSE>LC,MIN(LOW,LC),MAX(HIGH,LC));ACD:SUM(IF(CLOSE=LC,0,DIF),0);MAACD:EXPMEMA(ACD,M);BBI 多空指标BBI:(MA(CLOSE,M1)+MA(CLOSE,M2)+MA(CLOSE,M3)+MA(CLOSE,M4))/4;EXPMA 指数平均线EXP1:EMA(CLOSE,M1);EXP2:EMA(CLOSE,M2);EXPMA-S 指数平均线-副图EXP1:EMA(CLOSE,M1);EXP2:EMA(CLOSE,M2);HMA 高价平均线HMA1:MA(HIGH,M1);HMA2:MA(HIGH,M2);HMA3:MA(HIGH,M3);HMA4:MA(HIGH,M4);HMA5:MA(HIGH,M5);VMA 变异平均线VV:=(HIGH+OPEN+LOW+CLOSE)/4; VMA1:MA(VV ,M1);VMA2:MA(VV ,M2);VMA3:MA(VV ,M3);VMA4:MA(VV ,M4);VMA5:MA(VV ,M5);AMA 成本价均线AMOV:=VOL*(OPEN+CLOSE)/2; AMV1:SUM(AMOV,M1)/SUM(VOL,M1); AMV2:SUM(AMOV,M2)/SUM(VOL,M2); AMV3:SUM(AMOV,M3)/SUM(VOL,M3); AMV4:SUM(AMOV,M4)/SUM(VOL,M4); LMA 低价平均线LMA1:MA(LOW,M1);LMA2:MA(LOW,M2);LMA3:MA(LOW,M3);LMA4:MA(LOW,M4);LMA5:MA(LOW,M5);MCST 市场成本BBIBOLL 多空布林线CV:=CLOSE;BBIBOLL:(MA(CV,3)+MA(CV ,6)+MA(CV ,12)+MA(CV ,24))/4; UPR:BBIBOLL+M*STD(BBIBOLL,N);DWN:BBIBOLL-M*STD(BBIBOLL,N);第七节图表型ZXNH 直线拟合(加密)ZX 重心线AV:0.01*AMOUNT/VOL;PUCU 逆时钟曲线PU:MA(CLOSE,N);CU:MA(VOL,N);第八节 路径型BOLL-M 布林线 -主图叠加 BOLL 布林线BOLL:MA(CLOSE,N); UB:BOLL+2*STD(CLOSE,N); LB:BOLL-2*STD(CLOSE,N);PXB 瀑布线PBX1:(EMA(CLOSE,M1)+MA(CLOSE,M1*2)+MA(CLOSE,M1*4))/3; PBX2:(EMA(CLOSE,M2)+MA(CLOSE,M2*2)+MA(CLOSE,M2*4))/3; PBX3:(EMA(CLOSE,M3)+MA(CLOSE,M3*2)+MA(CLOSE,M3*4))/3; PBX4:(EMA(CLOSE,M4)+MA(CLOSE,M4*2)+MA(CLOSE,M4*4))/3; PBX5:(EMA(CLOSE,M5)+MA(CLOSE,M5*2)+MA(CLOSE,M5*4))/3; PBX6:(EMA(CLOSE,M6)+MA(CLOSE,M6*2)+MA(CLOSE,M6*4))/3;EXE 轨道线UPPER:(1+M1/100)*MA(CLOSE,N); LOWER:(1-M2/100)*MA(CLOSE,N); ENE:(UPPER+LOWER)/2;MIKE 麦克支撑压力HLC:=REF(MA((HIGH+LOW+CLOSE)/3,N),1); HV:=EMA(HHV(HIGH,N),3); LV:=EMA(LLV(LOW,N),3);STOR:EMA(2*HV-LV,3);MIDR:EMA(HLC+HV-LV ,3);WEKR:EMA(HLC*2-LV ,3);WEKS:EMA(HLC*2-HV ,3);SSRP 筹码峰(加密)XS 薛斯通道(加密)XS2 薛斯通道ⅡAA:=MA((2*CLOSE+HIGH+LOW)/4,5);通道1:AA*N/100;通道2:AA*(200-N)/100;CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);DD:=DMA(CLOSE,CC);通道3:(1+M/100)*DD;通道4:(1-M/100)*DD;第九节停损型SAR 抛物线指标(加密)TDXWA VE 通达信趋势浪(加密)VTY 价格变异率(加密)第十节策略型MA 策略MA 交易策略{ 该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} MIDS:EMA(HLC-HV+LV ,3);STOS:EMA(2*LV-HV,3);{ 变量赋值}MA1:=MA(CLOSE,SHORT);MA2:=MA(CLOSE,LONG);{ 交易条件}平空开多:=CROSS(MA1,MA2);平多开空:=CROSS(MA2,MA1);{ 交易系统}BUYSHORT_BUY( 平空开多,LOW);SELL_SELLSHORT( 平多开空,HIGH);{ 交易信号过滤}AUTOFILTER;MACD 策略MACD 交易策略{ 该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} DIFF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:=EMA(DIFF,MID);MACD:=2*(DIFF-DEA);平空开多:=CROSS(MACD,0);平多开空:=CROSS(0,MACD);BUYSHORT_BUY( 平空开多,LOW);SELL_SELLSHORT( 平多开空,HIGH);AUTOFILTER;KDJ 策略KDJ 交易策略{ 该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV ,M1,1);D:=SMA(K,M1,1);J:=3*K-2*D;平空开多 :=CROSS(J,0); 平多开空 :=CROSS(100,J);BUYSHORT_BUY( 平空开多 ,LOW); SELL_SELLSHORT( 平多开空 ,HIGH); AUTOFILTER;肯特纳 肯特纳通道交易策略{ 该模型为示范模型 ,仅用于说明算法语法 ,用户需根据自己交易经验修改后再实际应用}MA1:=REF(MA((HIGH+LOW+CLOSE)/3,A VGLENGTH),1);UPPERBAND:=MA1+REF(MA(TR,ATRLENGTH),1); LOWERBAND:=MA1-REF(MA(TR,ATRLENGTH),1);开多条件 :=MA1>REF(MA1,1) AND HIGH>=UPPERBAND; 平多条件 :=LOW<=MA1; 开空条件 :=MA1<REF(MA1,1) AND LOW<=LOWERBAND; 平空条件 :=HIGH>=MA1; GL1:=NOT( 开多条件 =1 AND 平多条件 =1); GL2:=NOT( 开空条件 =1 AND 平空条件 =1); SELL( 平多条件 ,HIGH); BUYSHORT( 平空条件 ,LOW); BUY( 开多条件 AND GL1,LOW);SELLSHORT( 开空条件 AND GL2,HIGH); AUTOFILTER;唐奇安 唐奇安通道交易策略{ 该模型为示范模型 ,仅用于说明算法语法 ,用户需根据自己交易经验修改后再实际应用 } 周期高点 :=REF(HHV(H,X1),1); 周期低点 :=REF(LLV(L,X2),1);平空开多 :=HIGH>= 周期高点 ; 平多开空 :=LOW<= 周期低点 ;BUYSHORT_BUY( 平空开多 ,LOW); SELL_SELLSHORT( 平多开空 ,HIGH); AUTOFILTER;日内突破日内突破交易策略{ 该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} { 变量赋值}NBAR:=BARSLAST(DA TE<>REF(DA TE,1))+1;HHN:REF(HHV(H,N),1);LLN:REF(LLV(L,N),1);MID:(HHN+LLN)/2;T1:=TIME>900 AND TIME <1455;{ 根据品种的交易时间和选择的周期做相应调整} T2:=TIME>=1455;{ 根据品种的交易时间和选择的周期做相应调整}{ 交易条件}开多条件:=H>HHN AND (HHN-MID)/MID<M/1000 AND NBAR>=30 AND T1;开空条件:=L<LLN AND (MID-LLN)/MID<M/1000 AND NBAR>=30 AND T1;{ 交易系统}BUY( 开多条件,LOW);SELLSHORT( 开空条件,HIGH);SELL(T2,HIGH);BUYSHORT(T2,LOW);AUTOFILTER;HANS123 日内HANS 交易策略{ 该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} { 变量赋值}N:=BARSLAST(DATE<>REF(DATE,1))+1;HHH:=V ALUEWHEN(TIME<=900+NMIN1,HHV(H,N));LLL:=V ALUEWHEN(TIME<=900+NMIN1,LLV(L,N));上轨:HHH+M*MINDIFF;下轨:LLL-M*MINDIFF;{ 交易条件}开多条件:=C>上轨;开空条件:=C<下轨;交易时间:=TIME>900+NMIN1 AND TIME<1450;平仓时间:=TIME>=1500-NMIN2; { 交易系统}BUY( 开多条件AND 交易时间,LOW); SELLSHORT( 开空条件AND 交易时间,HIGH); SELL( 平仓时间,HIGH);BUYSHORT( 平仓时间,LOW);AUTOFILTER;第十一节神系SG-XDT 心电图(需下载日线)QR:CLOSE/INDEXC*1000;MQR1:MA(QR,5);MQR2:MA(QR,10);SG-NDB 脑电波HH:=IF(C/REF(C,1)>1.093 AND L>REF(H,1),2*C-REF(C,1)-H,2*C-H-L);V1:=BARSCOUNT(C);V2:=2*REF(C,V1)-REF(H,V1)-REF(L,V1);DK:SUM(HH,0)+V2;MDK5:MA(DK,P1);MDK10:MA(DK,P2);SG-SMX 生命线(需下载日线)H1:=HHV(HIGH,N);L1:=LLV(LOW,N);H2:=HHV(INDEXH,N);L2:=LLV(INDEXL,N); ZY:=CLOSE/INDEXC*2000; ZY1:EMA(ZY,3);ZY2:EMA(ZY,17);ZY3:EMA(ZY,34);SG-LB 量比(需下载日线)ZY2:=VOL/INDEXV*1000; 量比:ZY2; MA5:MA(ZY2,5);MA10:MA(ZY2,10);SG-PF 强势股评分(需下载日线)ZY1:=CLOSE/INDEXC*1000;A1:=IF(ZY1>HHV(ZY1,3),10,0);A2:=IF(ZY1>HHV(ZY1,5),15,0);A3:=IF(ZY1>HHV(ZY1,10),20,0);A4:=IF(ZY1>HHV(ZY1,2),10,0);A5:=COUNT(ZY1>REF(ZY1,1) ,9)*5; 强势股评分:A1+A2+A3+A4+A5;第十二节龙系RAD 威力雷达SM:=(OPEN+HIGH+CLOSE+LOW)/4;SMID:=MA(SM,D);IM:=(INDEXO+INDEXH+INDEXL+INDEXC)/4; IMID:=MA(IM,D);SI1:=(SMID-REF(SMID,1))/SMID;II:=(IMID-REF(IMID,1))/IMID;RADER1:SUM((SI1-II)*2,S)*1000;RADERMA:SMA(RADER1,M,1);LON 龙系长线LC := REF(CLOSE,1);VID := SUM(VOL,2)/(((HHV(HIGH,2)-LLV(LOW,2)))*100);RC := (CLOSE-LC)*VID;LONG := SUM(RC,0);DIFF := SMA(LONG,10,1);DEA := SMA(LONG,20,1);LON : DIFF-DEA;LONMA : MA(LON,10);LONT : LON, COLORSTICK;SHT 龙系短线VAR1:=MA((VOL-REF(VOL,1))/REF(VOL,1),5);VAR2:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;MY: V AR2*(1+V AR1);SHT: MY, COLORSTICK;SHTMA: MA(SHT,N);ZLJC 主力进出VAR1:=(CLOSE+LOW+HIGH)/3;VAR2:=SUM(((V AR1-REF(LOW,1))-(HIGH-V AR1))*VOL/100000/(HIGH-LOW),0);VAR3:=EMA(VAR2,1);JCS:VAR3;JCM:MA(V AR3,12);JCL:MA(V AR3,26);ZLMM 主力买卖LC :=REF(CLOSE,1);RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;RSI3:=SMA(MAX(CLOSE-LC,0),18,1)/SMA(ABS(CLOSE-LC),18,1)*100;MMS:MA(3*RSI2-2*SMA(MAX(CLOSE-LC,0),16,1)/SMA(ABS(CLOSE-LC),16,1)*100,3);MMM:EMA(MMS,8);MML:MA(3*RSI3-2*SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,5);SLZT 神龙在天白龙: MA(CLOSE,125); 黄龙 : 白龙 +2*STD(CLOSE,170); 紫龙 : 白龙 -2*STD(CLOSE,145); 青龙:SAR(125,1,7), LINESTICK; VAR2:=HHV(HIGH,70);VAR3:=HHV(HIGH,20);红龙: VAR2*0.83;蓝龙: VAR3*0.91;ADVOL 龙系离散量A:=SUM(((CLOSE-LOW)-(HIGH-CLOSE))*VOL/10000/(HIGH-LOW),0); ADVOL:A;MA1:MA(A,30);MA2:MA(MA1,100);第十三节鬼系CYC 成本均线JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));DDD:=(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01);JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01) && JJJ>(DYNAINFO(6)-0.01)));CYC1:IF(JJJT,0.01*EMA(AMOUNT,P1)/EMA(VOL,P1),EMA((HIGH+LOW+CLOSE)/3,P1));CYC2:IF(JJJT,0.01*EMA(AMOUNT,P2)/EMA(VOL,P2),EMA((HIGH+LOW+CLOSE)/3,P2));CYC3:IF(JJJT,0.01*EMA(AMOUNT,P3)/EMA(VOL,P3),EMA((HIGH+LOW+CLOSE)/3,P3));CYC∞:IF(JJJT,DMA(AMOUNT/(100*VOL),100*VOL/FINANCE(7)),EMA((HIGH+LOW+CLOSE)/3,120));CYS 市场盈亏CYC13:=0.01*EMA(AMOUNT,13)/EMA(VOL,13);CYS:(CLOSE-CYC13)/CYC13*100;CYQKL 博弈K 线长度KL:100*(WINNER(CLOSE)-WINNER(OPEN));CYW 主力控盘VAR1:=CLOSE-LOW;VAR2:=HIGH-LOW;VAR3:=CLOSE-HIGH;VAR4:=IF(HIGH>LOW,(V AR1/V AR2+V AR3/VAR2)*VOL,0);CYW: SUM(V AR4,10)/10000, COLORSTICK;第十四节其他系XT 箱体【箱顶】:PEAK(CLOSE,N,1)*0.98; 【箱底】:TROUGH(CLOSE,N,1)*1.02;【箱高】:100*( 【箱顶】-【箱底】)/【箱底】,NODRAW;JAX 济安线AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,N))/MA(CLOSE,N); 济安线:DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK3,COLORMAGENTA; CC:=(CLOSE/ 济安线);MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);MAAA:=((MA1- 济安线)/ 济安线)/3;TMP:=MA1-MAAA*MA1;J:IF(TMP<= 济安线,济安线,DRAWNULL),LINETHICK3,COLORCYAN;A:TMP,LINETHICK2,COLORYELLOW;X:IF(TMP<= 济安线,TMP,DRAWNULL),LINETHICK2,COLORGREEN;CJDX 超级短线VAR1:=(2*CLOSE+HIGH+LOW)/4;VAR2:=EMA(EMA(EMA(V AR1,4),4),4);J: (VAR2-REF(V AR2,1))/REF(V AR2,1)*100, COLORSTICK;D: MA(J,3);K: MA(J,1);ZJTJ 庄家抬轿VAR1:=EMA(EMA(CLOSE,9),9);控盘:=(V AR1-REF(VAR1,1))/REF(V AR1,1)*1000;STICKLINE( 控盘<0,控盘,0,1,0),COLORWHITE;A10:=CROSS( 控盘,0);无庄控盘:IF(控盘<0,控盘,0),COLORWHITE,NODRAW;开始控盘:IF(A10,5,0),LINETHICK1,COLORYELLOW;STICKLINE( 控盘>REF(控盘,1) AND 控盘>0,控盘,0,1,0),COLORRED; 有庄控盘:IF(控盘>REF(控盘,1) AND 控盘>0,控盘,0),COLORRED,NODRAW;VAR2:=100*WINNER(CLOSE*0.95);STICKLINE(V AR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,1,0),COLORFF00FF; 高度控盘:IF(V AR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0),COLORFF00FF,NODRAW; STICKLINE( 控盘<REF(控盘,1) AND 控盘>0,控盘,0,1,0),COLOR00FF00;主力出货:IF(控盘<REF(控盘,1) AND 控盘>0,控盘,0),COLOR00FF00,NODRAW;ZBCD 准备抄底VAR1:=AMOUNT/VOL/7;VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;VAR3:=SUM(AMOUNT,N)/V AR1/7;VAR4:=DMA(V AR2,VOL/V AR3);抄底:(CLOSE-V AR4)/V AR4*100,COLORLIMAGENTA;DRAWICON(CROSS(-7.0, 抄底),抄底,1);BDZX 波段之星VAR2:=(HIGH+LOW+CLOSE*2)/4;VAR3:=EMA(VAR2,21);VAR4:=STD(V AR2,21);VAR5:=((V AR2-VAR3)/V AR4*100+200)/4;VAR6:=(EMA(V AR5,5)-25)*1.56;AK: EMA(V AR6,2)*1.22;AD1: EMA(AK,2);AJ: 3*AK-2*AD1;AA:100;BB:0;CC:80;买进: IF(CROSS(AK,AD1),58,20);卖出: IF(CROSS(AD1,AK),58,20);LHXJ 猎狐先觉VAR1:=(CLOSE*2+HIGH+LOW)/4;VAR2:=EMA(VAR1,13)-EMA(V AR1,34);VAR3:=EMA(VAR2,5);主力弃盘: (-2)*(VAR2-V AR3)*3.8;主力控盘: 2*(VAR2-V AR3)*3.8;LYJH 猎鹰歼狐VAR1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100; 机构做空能量线: SMA(V AR1,2,1); VAR2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; 机构做多能量线: SMA(V AR2,5,1)-8; LH: M;LH1: M1;JFZN 飓风智能中线VAR2:=SUM(IF(CLOSE>OPEN,VOL,0),N)/SUM(VOL,N)*100; VAR3:=100-SUM(IF(CLOSE>OPEN,VOL,0),N)/SUM(VOL,N)*100; 多头力量: VAR2;空头力量: VAR3;多空平衡: 50;CYHT 财运亨通VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5; 高抛: 80;VAR2:=LLV(LOW,34);VAR3:=HHV(HIGH,34);SK: EMA((V AR1-V AR2)/(V AR3-V AR2)*100,13); SD: EMA(SK,3);低吸: 20;强弱分界: 50;VAR4:=IF(CROSS(SK,SD),40,22);VAR5:=IF(CROSS(SD,SK),60,78);卖出: VAR5;买进: VAR4;SCR 筹码集中度A:=P1+(100-P1)/2;B:=(100-P1)/2;CC:=COST(A);DD:=COST(B);SCR:(CC-DD)/(CC+DD)*100/2;ASR 浮筹比例ASR:(WINNER(C*1.1)-WINNER(C*0.9))/WINNER(HHV(H,0))*100;BSQJ 买卖区间买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);STICKLINE( 买线>=卖线,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),6,0),COLOR001050; STICKLINE( 买线<卖线,REFDATE(HHV(H,0),DA TE),REFDATE(LLV(L,0),DATE),6,0),COLOR404050; DRAWKLINE(H,O,L,C);指导:=EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4,2); 界:=MA(CLOSE,27);B 买:IF(CROSS( 指导,界) OR CROSS(买线,卖线),C,DRAWNULL),COLORMAGENTA,NODRAW; 持仓:IF(买线>=卖线,C,DRAWNULL),COLORRED,NODRAW;S卖:IF(CROSS(界,指导) OR CROSS(卖线,买线),C,DRAWNULL),COLORLIGRAY,NODRAW; 空仓:IF(买线<卖线,C,DRAWNULL),COLORGREEN,NODRAW;DRAWICON(CROSS( 买线,卖线),L,1);DRAWICON(CROSS( 卖线,买线),H,2);ZJL 折价率用于排序折价率:IF(FINANCE(34)>0.001,(FINANCE(34)-CLOSE)*100.0/FINANCE(34),0);CDP-STD 逆势操作CH:=REF(H,1);CL:=REF(L,1);CC:=REF(C,1);CDP:(CH+CL+CC)/3;AH:CDP+CH-CL;NH:CDP+CDP-CL;NL:CDP+CDP-CH;AL:CDP-CH+CL;TBP-STD 趋势平衡点APX:=(H+L+C)/3;TR0:=MAX(H-L,MAX(ABS(H-REF(C,1)),ABS(L-REF(C,1))));MF0:=C-REF(C,2);MF1:=REF(MF0,1);MF2:=REF(MF0,2);DIRECT1:=BARSLAST(MF0>MF1 AND MF0>MF2);DIRECT2:=BARSLAST(MF0<MF1 AND MF0<MF2);DIRECT0:=IF(DIRECT1<DIRECT2,100,-100);TBP:REF(REF(C,1)+IF(DIRECT0>50,MIN(MF0,MF1),MAX(MF0,MF1)),1); 多头获利:REF(IF(DIRECT0>50,APX*2-L,DRAWNULL),1),NODRAW; 多头停损:REF(IF(DIRECT0>50,APX-TR0,DRAWNULL),1),NODRAW; 空头回补:REF(IF(DIRECT0<-50,APX*2-H,DRAWNULL),1),NODRAW; 空头停损:REF(IF(DIRECT0<-50,APX+TR0,DRAWNULL),1),NODRAW;SC 三叉(加密)NDB 脑电波(加密)JYJL 交易参考均量单位时间总量: SUM(VOL,N)*100,NODRAW; 单位时间内均量: 单位时间总量/(N/M);JSJG 参考结算价(适用于金融期货)FIRST:=IF(PERIOD=0,HOUR=14 AND MINUTE=16,DRAWNULL); TOTAL:=IF(PERIOD=0,60,0);MAMIN:=BARSLAST(FIRST)+1;COUNTFLAG:=(PERIOD=0 AND ( (HOUR=14 AND MINUTE>=16) OR HOUR=15 )); 逼近结算价格:IF(COUNTFLAG,SUM(C*V ,MAMIN)/SUM(V ,MAMIN),DRAWNULL); LASTP:=C;LASTM:=MAMIN;LASTV:=MA(V,MAMIN); 参考结算价格:IF(COUNTFLAG,(SUM(C*V ,MAMIN)+ LASTP*LASTV*(TOTAL-LASTM))/(LASTV*TOTAL),DRAWNULL);VOLATILITY 波动率SQRT(250)*STD(C/REF(C,1)-1,N);第十五节特色型CPBS 操盘BS 点BU:=CROSS(HIGH,SAR(3,1,20));SEL:=CROSS(SAR(3,1,20),LOW);DRAWTEXT(BU,LOW,'B'),COLORYELLOW,LINETHICK2;DRAWTEXT(SEL,1.01*HIGH,'S'),COLORGREEN,LINETHICK2;CYX 撑压线Z1:=STRCAT(HYBLOCK,' ');Z2:=STRCAT(Z1,DYBLOCK);Z3:=STRCAT(Z2,' ');DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCA T(Z3,GNBLOCK)),COLOR00C0C0;A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1:=(D2 AND NOT(D1 AND E1<E2));H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);NOTEXT1:DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORRED;NOTEXT2:DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORGREEN;WAVE 波浪分析ZIG (3,因子 );SKSD 时空隧道STICKLINE(CURRBARSCOUNT<=N,H,L,-1,0),COLORBLACK;DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCA T(CON2STR(N,0),' 周期前 K 线 选中主图后按 ALT+T 键调 节回退的周期 ')),COLORLIMAGENTA;NOTEXT1:IF(CURRBARSCOUNT>=N+1,MA(C,M),DRAWNULL),COLORWHITE;NOTEXT2:IF(CURRBARSCOUNT<=N,MA(C,M),DRAWNULL),COLORBLACK;XLPL 吸拉派落(加密)GSTQ 股市天气(加密)AROON 阿隆指标上轨 :(N-HHVBARS(H,N))/N*100,COLORRED; 下轨 :(N-LLVBARS(H,N))/N*100,COLORGREEN;CFJT 财富阶梯突破 :=REF(EMA(C,14),1);A1X:=(EMA(C,10)- 突破 )/突破 *100;多方 :=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL); 空方 :=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);STICKLINE(A1X>=0, 多方 ,突破 ,10,0),COLOR000099;STICKLINE(A1X<0, 空方,突破 ,10,0),COLOR00CC66;TJCJL 太极成交量总手 :VOL,NODRAW;DRAWTEXT_FIX(ISLASTBAR,0,0,0,' 说明 : 红色柱为吸货量 ,绿色为出货量 , 黄色为天量 ,蓝色为地量 '),COLORGRAY;ZZ:=IF(REF(C,1)>REF(O,1) AND O>REF(C,1)*1.014 AND C<O*1.02,1,3);V5:=MA(V ,5);V12:=MA(V ,12);V34:=MA(V ,34);C6:=MA(C,6);STICKLINE(VOL,0,VOL,1,0),COLORLIGRAY;STICKLINE(CROSS(C,C6) AND V>V5*1.2 AND V>V12*1.2 AND ZZ>2 AND C>H*0.975,0,VOL,1,0),COLORRED; STICKLINE(CROSS(C6,C) AND V>V5*1.2 AND V>V12*1.2,0,VOL,1,0),COLORGREEN;STICKLINE(VOL>MA(VOL,5)*2 AND V>V34*3 AND C<REF(C,1)*1.05,0,VOL,1,0),COLORYELLOW; STICKLINE(VOL<MA(VOL,5)/2 AND V<V12/2,0,VOL,1,0),COLORBLUE;STICKLINE(VOL>MA(VOL,5)*2AND V>V34*3 AND C<REF(C,1)*1.05 AND CROSS(C,C6) AND V>V5*1.2 AND V>V12*1.2 AND ZZ>2 AND C>H*0.975,VOL*0.5,0,1,0),COLORRED; STICKLINE(VOL>MA(VOL,5)*2 AND V>V34*3 AND C<REF(C,1)*1.05 AND CROSS(C6,C) AND V>V5*1.2 AND V>V12*1.2,VOL*0.5,0,1,0),COLORRED;ZJFZ 追击反转VAR2:=REF(LOW,1);VAR3:=SMA(ABS(LOW-V AR2),3,1)/SMA(MAX(LOW-V AR2,0),3,1)*100;VAR4:=EMA(VAR3*10,3);VAR5:=LLV(LOW,13);VAR6:=HHV(V AR4,13);VAR7:=EMA(IF(LOW<=V AR5,(V AR4+V AR6*2)/2,0),3)/618;VAR8:=IF(V AR7>500,500,V AR7);ZSDB 指数对比A:=REF(INDEXC,1);指数涨幅 :IF(A>0,(INDEXC-A)*100/A,0),NODRAW;HYDB:DRAWKLINE(INDEXH,INDEXO,INDEXL,INDEXC);STICKLINE(V AR8>-120,0,V AR8,3,1),COLORGRAY;STICKLINE(V AR8>1REF("KDJ.J",1)<REF("KDJ.J",2),0,V STICKLINE(V AR8>0.1 ANDREF("KDJ.J",1)<REF("KDJ.J",2),0,V"KDJ.J">REF("KDJ.J",1) AR8,3,0),COLORRED; VAR8<1 AND AR8,3,0),COLOR00FFFF; AND"KDJ.J">REF("KDJ.J",1) AND ANDHYDB 行业对比A:=REF(HY_INDEXC,1);行业涨幅:IF(A>0,(HY_INDEXC-A)*100/A,0),NODRAW;DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK),COLOR00C0C0;HYDB:DRAWKLINE(HY_INDEXH,HY_INDEXO,HY_INDEXL,HY_INDEXC);FKX 反K 线DRAWKLINE(-LOW, -OPEN, -HIGH, -CLOSE);ZJLX 资金流向超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;资金流向:(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW; STICKLINE( 资金流向>0,0,资金流向,2,0),COLORRED;STICKLINE( 资金流向<0,0, 资金流向,2,0),COLORCY AN;近 5 日流向:SUM( 资金流向,5),NODRAW;近10 日流向:SUM( 资金流向,10),NODRAW;ZJQDL 资金驱动力超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;净流入:(超B+大B+中B+小B)-(超S+大S+中S+小S);大宗净流入:(超B+大B)-( 超S+大S);ZJBY 资金博弈超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=-L2_AMO(0,3)/10000.0;大S:=-L2_AMO(1,3)/10000.0;中S:=-L2_AMO(2,3)/10000.0;小S:=-L2_AMO(3,3)/10000.0; 净流入:(超B+大B+中B+小B)+(超S+大S+中S+小S),NODRAW; 超大单:(超B)+(超S);大单:(大B)+(大S);中单:(中B)+(中S);小单:(小B)+(小S);DDX 大单动向大单动向:(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7),NODRAW; NOTEXT1:MA(大单动向,N)*3;STICKLINE(大单动向>0,0, 大单动向,2,0),COLORRED;STICKLINE(大单动向<0,0, 大单动向,2,0),COLORCY AN;DDY 涨跌动因涨跌动因:IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0),NODRAW; NOTEXT1:MA(涨跌动因,N)*3;STICKLINE(涨跌动因>0,0, 涨跌动因,2,0),COLORRED;STICKLINE(涨跌动因<0,0, 涨跌动因,2,0),COLORCY AN;DDZ 大单差分大单差分:IF(TRADENUM>0, (LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0),NODRAW;DDZ1:= 大单差分*7;DDZ2:= 大单差分*3;DRAWBAND(DDZ1,RGB(255,32,32),DDZ2,RGB(0,224,224));DDF 大单频率大单频率:IF(TRADENUM>0,LARGETRDINNUM*100/TRADENUM,0),NODRAW; NOTEXT1:MA(大单频率,N)*2;STICKLINE(1,0, 大单频率,2,0);SUPL 主力集散线主力集散线:SUM((LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7),0),LINETHICK2; MA1:MA(主力集散线,N),COLORBROWN;。
通达信公式教程大全(公式+指标+实例)
通达信公式教程大全(公式+指标+实例)本文介绍了通达信中常用的公式和指标,并给出了相应的实例说明。
希望能帮助读者更好地使用通达信软件。
一、公式1. 移动平均线 (Moving Average, MA)移动平均线是分析股票价格走势的常用工具之一,用于平滑价格曲线,使趋势更加明显。
通达信中的移动平均线公式为:MA(n) = (C + C1 + C2 + ... + C(n-1) + C(n)) / n其中,MA(n) 表示第 n 日的移动平均线值,C 表示当日的收盘价。
2. 相对强弱指数 (Relative Strength Index, RSI)相对强弱指数是用来测量股票价格走势强度的指标,其数值介于0和100之间。
通达信中的相对强弱指数公式为:RSI(n) = 100 - [100 / (1 + RS)]RS = GainAverage(n) / LossAverage(n)其中,RSI(n) 表示第n 日的相对强弱指数,RS表示相对强度,GainAverage(n) 表示涨幅平均值,LossAverage(n) 表示跌幅平均值。
3. 布林带指标 (Bollinger Bands, BOLL)布林带指标用于判断股票价格的波动情况,由上、中、下三条线组成。
通达信中的布林带指标公式为:UP(n) = MA(n) + 2 * Std(n)DN(n) = MA(n) - 2 * Std(n)其中,UP(n) 表示上轨线,DN(n) 表示下轨线,Std(n) 表示标准差。
二、指标1. 成交量 (Volume)成交量指标用于衡量股票交易的活跃度。
通达信中可以通过画柱状图的方式显示成交量。
2. 相对强弱指数 (Relative Strength Index, RSI)相对强弱指数在公式部分已经进行了介绍,这里重点说明其在通达信中的显示形式。
通达信以0和100作为区间,通过画线的方式显示相对强弱指数。
3. 动量指标 (Momentum)动量指标用来测量股票价格的变动速度,可以判断价格的超买超卖情况。
通达信三个公式源码准确率90%以上超级指标精准买卖绝世指标
通达信三个公式源码准确率90%以上超级指标精准买卖绝世指标1 超级指标指标公式:买卖提示非常明显(适合通达信)指标源码如下:M:3 100 60N 3 100 30散户线: 100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M));RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,5,1);D:=SMA(K,3,1);J:=3*K-2*D;主力线:EMA(J,6),COLORYELLOW;VAR2:=REF(LOW,1);VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);VAR5:=LLV(LOW,30);VAR6:=HHV(VAR4,30);VAR7:=IF(MA(CLOSE,58),1,0);VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VA R7;VAR9:=IF(VAR8>100,100,VAR8);吸筹:STICKLINE(VAR9>-120,0,VAR9,2,5),COLORMAGENTA;AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;AA5:=SMA(AA4,13,8);走势:CEILING(SMA(AA5,13,8)),COLORRED,LINETHICK2;AA6:=SMA(AA3,21,8);买观注: STICKLINE(走势-AA6<-65,0,7,15,1);DRAWICON(FILTER(J>REF(J,1)AND 走势>=REF(走势,1)AND 走势<25 ,5),走势,4);卖观注: STICKLINE(走势-AA6>85,98,90,15,1),COLORFFFF00;DRAWICON(FILTER(J<REF(J,1)AND 走势<=REF(走势,1)AND J>85 ,5),J,5);DIF1:=EMA(CLOSE,7)-EMA(CLOSE,19),COLORWHITE;DEA1:=EMA(DIF1,9);MACD1:=(DIF1-DEA1)*100,COLORSTICK;STICKLINE(MACD1>REF(MACD1,1) AND MACD1>0,0,MACD1,0,0),COLORRED;STICKLINE(MACD1<=REF(MACD1,1) AND MACD1>0,0,MACD1,0,0),COLORYELLOW;STICKLINE(MACD1<REF(MACD1,1) AND MACD1<0,0,MACD1,0,0),COLOR00FF00;STICKLINE(MACD1>=REF(MACD1,1) AND MACD1<0,0,MACD1,0,0),COLORMAGENTA;STICKLINE(C>0,0,0,50,1),COLORBLUE;RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K日:SMA(RSV1,3,1),COLORWHITE;D日:SMA(K日,3,1),COLORYELLOW;J日:3*K日-2*D日,COLORFF00FF;底部:0,COLORF00FF0,LINETHICK2;DRAWICON(CROSS(J日,底部),底部,1);2 精准买卖支撑价:LLV(LOW,19),LINETHICK2 , COLOR00FF00;阻力价:HHV(HIGH,19),COLORBLUE, LINETHICK2;VAR1:=EMA(CLOSE,12)-EMA(CLOSE,26);VAR2:=EMA(VAR1,9);VAR3:=(CLOSE*2.5/100+CLOSE);VAR4:EMA(C,3);VAR5:=LLV(HIGH,240);VAR6:=100*(CLOSE-VAR5)/VAR5;VAR7:=REF(LLV(CLOSE,480),1);VAR8:=REF(HHV(CLOSE,480),1);VAR9:=100*(CLOSE-VAR7)/(VAR8-VAR7);VARA:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100;VARB:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100;VARC:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100;VARD:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100;VARE:=VARC>98.5 OR VARD>98.5;VARF:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4;VAR13:=VARA=0 AND VARC=0 AND VAR6<0;VAR14:=VARA=100 AND VARC=100;VAR15:=VARB=0 OR VARD=0 AND VAR9<0;VAR16:=VARB=100 AND VARD=100;VAR17:=VAR6<0 AND VAR9<0;VAR18:=VAR13 AND VAR15;VAR19:=VAR14 AND VAR16;VAR1B:=SMA(MAX(CLOSE-REF(CLOSE,1),0),49,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;VAR1C:=SMA(MAX(CLOSE-REF(CLOSE,1),0),14,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),14,1)*100;VAR1D:=BARSCOUNT(CLOSE);VAR1E:=VAR1B<20 AND VAR1C<23 AND VAR1D>35;VAR1F:=VAR1E AND COUNT(VAR1E,1)=1;VAR20:=REF(CLOSE,1);VAR21:=SMA(MAX(CLOSE-VAR20,0),34,1)/SMA(ABS(CLOSE-VAR20),7,1)*100;VAR22:=SMA(MAX(CLOSE-VAR20,0),13,1)/SMA(ABS(CLOSE-VAR20),13,1)*100;VAR23:=BARSCOUNT(CLOSE);VAR24:=VAR21<20 AND VAR22<23 AND VAR23>35;VAR25:=VARA=0 AND VARF<1.2 AND VAR17;VAR27:=VAR18 AND VARF<1.2 AND VAR17;VAR29:=SUM(HIGH-OPEN,77)/SUM(OPEN-LOW,77)*100;VAR2A:=SUM(MAX(0,HIGH-REF(CLOSE,1)),77)/SUM(MAX(0,REF(CLOSE,1)-LOW),77)*100;VAR2B:=CROSS(VAR29,69) AND CROSS(VAR2A,80)<150;VAR2C:=VAR24 AND VAR1F AND COUNT(VAR24,30)=1;买点:=VAR25 AND VAR2B;绝对卖点:=(VAR19 OR VARA)AND VARF>23 OR VARE ;VAR2D:=VAR1F AND VAR2C AND VAR25;股海万元户:=(CLOSE/REF(CLOSE,1)>1.04 AND (CLOSE>10.8 AND CLOSE<10.83 OR CLOSE>6.86 AND CLOSE<6.88 OR CLOSE>13.82 AND CLOSE<13.84 OR CLOSE>7.28 AND CLOSE<7.3 OR CLOSE>12.4 AND CLOSE<12.42 OR CLOSE>22.33 AND CLOSE<22.35 OR CLOSE>4.68 AND CLOSE<4.7 OR CLOSE>26.29 AND CLOSE<26.31 OR CLOSE>7.65 AND CLOSE<7.67 OR CLOSE>13.4 AND CLOSE<13.42 OR CLOSE>7.58 AND CLOSE<7.6 OR CLOSE>20.43 AND CLOSE<20.45 ORCLOSE>19.57 AND CLOSE<19.59 OR CLOSE>6.26 AND CLOSE<6.28 OR CLOSE>7.14 AND CLOSE<7.16 OR CLOSE>6.61 AND CLOSE<6.63 OR CLOSE>11.9 AND VOL<11.92 OR CLOSE>6.7 AND CLOSE<6.72 OR CLOSE>8.19 AND CLOSE<8.21));DRAWTEXT(FILTER(绝对卖点>0,3),H,'别贪'), COLOR00FF00;DRAWTEXT(股海万元户>0,L,'☆追涨'),COLORYELLOW ;DRAWICON(买点>0,L,4);DRAWTEXT(买点>0,L,'扫描神针'),COLORF00FF0;DRAWTEXT(VARF<0.7 AND VAR27 AND VAR25>0,L,'万元'),COLORYELLOW;STICKLINE(VAR2D>0,O,C,10,0), COLORRED;DRAWTEXT(VAR2D>0,L,'大方神针'),COLORRED;DRAWICON(COUNT(REF(VAR4,1)<REF(VAR4,2),5)=5 AND VAR4>REF(VAR4,1),L*0.98,5);DRAWICON(FILTER(COUNT(VAR6<0,5)ANDCROSS(VAR6,0)AND VARF>REF(VARF,1)AND C>O,3),L,1);DRAWICON(FILTER(REF(VAR4,1)>REF(VAR4,2)ANDVAR4<REF(VAR4,1)AND VARF>17 AND VAR1>VAR2,5),H,2);DRAWICON(阻力价>REF(阻力价,1)AND CROSS(阻力价,VAR3)AND C<O,H*1.02,15);DIF1:=EMA(CLOSE,7)-EMA(CLOSE,19),COLORWHITE;DEA1:=EMA(DIF1,9);MACD1:=(DIF1-DEA1)*100,COLORSTICK;STICKLINE(MACD1>REF(MACD1,1) AND MACD1>0,0,MACD1,0,0),COLORRED;STICKLINE(MACD1<=REF(MACD1,1) AND MACD1>0,0,MACD1,0,0),COLORYELLOW;STICKLINE(MACD1<REF(MACD1,1) AND MACD1<0,0,MACD1,0,0),COLOR00FF00;STICKLINE(MACD1>=REF(MACD1,1) ANDMACD1<0,0,MACD1,0,0),COLORMAGENTA;STICKLINE(C>0,0,0,50,1),COLORBLUE;RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K日:SMA(RSV1,3,1),COLORWHITE;D日:SMA(K日,3,1),COLORYELLOW;J日:3*K日-2*D日,COLORFF00FF;底部:0,COLORF00FF0,LINETHICK2;DRAWICON(CROSS(J日,底部),底部,1);3 绝世指标GLL:-4;顶: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),COLORYELLOW;底: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;。
基础指标公式源码(通达信版)
基础指标公式源码(通达信版)
介绍
本文档将提供一些通达信版基础指标的公式源码,帮助用户更好地理解和使用这些指标。
移动平均线指标公式源码
简单移动平均线(MA)
MA(CLOSE,N)
公式中,CLOSE 表示收盘价,N 表示计算的周期数。
加权移动平均线(WMA)
WMA(CLOSE,N)
公式中的参数意义与简单移动平均线相同。
指数移动平均线(EMA)
EMA(CLOSE,N)
公式中的参数意义与简单移动平均线相同。
平滑异同平均线(MACD)
MACD(SHORT, LONG, M)
公式中,SHORT 表示较短的移动平均线周期数,LONG 表示
较长的移动平均线周期数,M 表示计算离差值的移动平均线周期数。
相对强弱指标公式源码
相对强弱指标(RSI)
RSI(CLOSE,N1)
公式中,CLOSE 表示收盘价,N1 表示计算 RS1 的周期数。
平均动向指标(ADX)
ADX(N)
公式中,N 表示计算 ADX 的周期数。
总结
本文档提供了通达信版的基础指标公式源码,供用户使用和参考。
这些指标可以帮助用户分析市场走势和判断交易信号。
用户可
以根据自己的需求和实际情况,选择适合的指标进行使用。
通达信系统指标公式
通达信系统指标公式并非闲人编辑整理2016年4月目录目录 (2)第一章技术指标公式 (1)第一节大势型 (1)第二节超买超卖型 (3)第三节趋势型 (9)第四节能量型 (14)第五节成交量型 (16)第六节均线型 (19)第七节图表型 (22)第八节路径型 (23)第九节停损型 (25)第十节策略型 (25)第十一节神系 (28)第十二节龙系 (30)第十三节鬼系 (32)第十四节其他系 (32)第十五节特色型 (37)第二章条件选股公式 (44)第一节指标条件选股 (44)第二节基本面选股 (49)第三节即时盘中选股 (50)第四节走势特征选股 (51)第五节形态特征选股 (57)第三章专家系统公式 (62)第四章五彩K线公式 (66)通达信系统指标公式第一章技术指标公式第一节大势型ABI 绝对广量指标ABI:100*ABS(ADV ANCE-DECLINE)/(ADV ANCE+DECLINE);MAABI:EMA(ABI,M);ADL 腾落指标ADL:SUM(ADV ANCE-DECLINE,0);MAADL:MA(ADL,M);ADR 涨跌比率ADR:SUM(ADV ANCE,N)/SUM(DECLINE,N);MAADR:MA(ADR,M);ARMS 阿姆氏指标ARMS:EMA(ADV ANCE/DECLINE,N);MAARMS:MA(ARMS,M);BTI 广量冲力指标BTI:EMA(100*ADV ANCE/(ADV ANCE+DECLINE),N); MABTI:MA(BTI,M);MCL 麦克连指标DIF:=ADV ANCE-DECLINE;EMA1:=EMA(DIF,N1);EMA2:=EMA(DIF,N2);MCL:EMA1-EMA2;MAMCL1:EMA1;MAMCL2:EMA2;MSI 麦氏综合指标(加密)OBOS 超买超卖指标OBOS:EMA(ADV ANCE-DECLINE,N);MAOBOS:MA(OBOS,M);STIX 指数平滑广量TBR:100*ADV ANCE/(ADV ANCE+DECLINE);MATBR:EMA(TBR,M);第二节超买超卖型CCI 商品路径指标TYP:=(HIGH+LOW+CLOSE)/3;CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));KDJ 随机指标KDJRSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:SMA(RSV,M1,1);D:SMA(K,M2,1);J:3*K-2*D;MFI 资金流量指标TYP := (HIGH + LOW + CLOSE)/3;V1:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP<REF(TYP,1),TYP*VOL,0),N);MFI:100-(100/(1+V1));MTM 动量线MTM:CLOSE-REF(CLOSE,N);MTMMA:MA(MTM,M);OSC 变动速率线OSC:100*(CLOSE-MA(CLOSE,N));MAOSC:EXPMEMA(OSC,M);RSI 相对强弱指标LC:=REF(CLOSE,1);RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100; RSI2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100; RSI3:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;MARSI 相对强弱平均线DIF:=CLOSE-REF(CLOSE,1);VU:=IF(DIF>=0,DIF,0);VD:=IF(DIF<0,-DIF,0);MAU1:=MEMA(VU,M1);MAD1:=MEMA(VD,M1);MAU2:=MEMA(VU,M2);MAD2:=MEMA(VD,M2);RSI10:MA(100*MAU1/(MAU1+MAD1),M1);RSI6:MA(100*MAU2/(MAU2+MAD2),M2);KD 随机指标KDRSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:SMA(RSV,M1,1);D:SMA(K,M2,1);SKDJ 慢速随机指标LOWV:=LLV(LOW,N);HIGHV:=HHV(HIGH,N);RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,M);K:EMA(RSV,M);D:MA(K,M);UDL 引力线UDL:(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4; MAUDL:MA(UDL,M);WR 威廉指标WR1:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)); WR2:100*(HHV(HIGH,N1)-CLOSE)/(HHV(HIGH,N1)-LLV(LOW,N1));LWR 慢速威廉指标RSV:= (HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))*100; LWR1:SMA(RSV,M1,1);LWR2:SMA(LWR1,M2,1);BIAS-QL 乖离率-传统版BIAS :(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100;BIASMA :MA(BIAS,M);BIAS 乖离率BIAS1 :(CLOSE-MA(CLOSE,N1))/MA(CLOSE,N1)*100;BIAS2 :(CLOSE-MA(CLOSE,N2))/MA(CLOSE,N2)*100;BIAS3 :(CLOSE-MA(CLOSE,N3))/MA(CLOSE,N3)*100;BIAS36 三六乖离BIAS36:MA(CLOSE,3)-MA(CLOSE,6);BIAS612:MA(CLOSE,6)-MA(CLOSE,12); MABIAS:MA(BIAS36,M);ACCER 幅度涨速ACCER:SLOPE(CLOSE,N)/CLOSE;CYD 承接因子CYDS:WINNER(CLOSE)/(VOL/CAPITAL); CYDN:WINNER(CLOSE)/MA(VOL/CAPITAL,N);CYF 市场能量CYF:100-100/(1+EMA(HSL,N));FSL 分水岭SWL:(EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;SWS:DMA(EMA(CLOSE,12),MAX(1,100*(SUM(VOL,5)/(3*CAPITAL))));ADTM 动态买卖气指标DTM:=IF(OPEN<=REF(OPEN,1),0,MAX((HIGH-OPEN),(OPEN-REF(OPEN,1))));DBM:=IF(OPEN>=REF(OPEN,1),0,MAX((OPEN-LOW),(OPEN-REF(OPEN,1))));STM:=SUM(DTM,N);SBM:=SUM(DBM,N);ADTM:IF(STM>SBM,(STM-SBM)/STM,IF(STM=SBM,0,(STM-SBM)/SBM)); MAADTM:MA(ADTM,M);ATR 真实波幅MTR:MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW)); ATR:MA(MTR,N);DKX多空线MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;DKX:(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;MADKX:MA(DKX,M);TAPI 加权指数成交值(需下载日线)TAPI:AMOUNT/INDEXC;MATAIP:MA(TAPI,M);第三节趋势型ASI 振动升降指标(加密)CHO 佳庆指标MID:=SUM(VOL*(2*CLOSE-HIGH-LOW)/(HIGH+LOW),0); CHO:MA(MID,N1)-MA(MID,N2);MACHO:MA(CHO,M);DMA 平均差DIF:MA(CLOSE,N1)-MA(CLOSE,N2);DIFMA:MA(DIF,M);DMI 趋向指标MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N) ;HD :=HIGH-REF(HIGH,1);LD :=REF(LOW,1)-LOW;DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);PDI: DMP*100/MTR;MDI: DMM*100/MTR;ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM);ADXR:EXPMEMA(ADX,MM);DPO 区间震荡线DPO:CLOSE-REF(MA(CLOSE,N),N/2+1);MADPO:MA(DPO,M);EMV 简易波动指标VOLUME:=MA(VOL,N)/VOL;MID:=100*(HIGH+LOW-REF(HIGH+LOW,1))/(HIGH+LOW);EMV:MA(MID*VOLUME*(HIGH-LOW)/MA(HIGH-LOW,N),N);MAEMV:MA(EMV,M);MACD 平滑异同平均DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:EMA(DIF,MID);MACD:(DIF-DEA)*2,COLORSTICK;VMACD 量平滑异同平均DIF:EMA(VOL,SHORT)-EMA(VOL,LONG); DEA:EMA(DIF,MID);MACD:DIF-DEA,COLORSTICK;QACD 快速异同平均DIF:EMA(CLOSE,N1)-EMA(CLOSE,N2); MACD:EMA(DIF,M);DDIF:DIF-MACD;TRIX 三重指数平均线MTR:=EMA(EMA(EMA(CLOSE,N),N),N); TRIX:(MTR-REF(MTR,1))/REF(MTR,1)*100; MATRIX:MA(TRIX,M) ;UOS 终极指标TH:=MAX(HIGH,REF(CLOSE,1));TL:=MIN(LOW,REF(CLOSE,1));ACC1:=SUM(CLOSE-TL,N1)/SUM(TH-TL,N1);ACC2:=SUM(CLOSE-TL,N2)/SUM(TH-TL,N2);ACC3:=SUM(CLOSE-TL,N3)/SUM(TH-TL,N3);UOS:(ACC1*N2*N3+ACC2*N1*N3+ACC3*N1*N2)*100/(N1*N2+N1*N3+N2*N3); MAUOS:EXPMEMA(UOS,M);VPT 量价曲线VPT:SUM(VOL*(CLOSE-REF(CLOSE,1))/REF(CLOSE,1),N);MA VPT:MA(VPT,M);WV AD 威廉变异离散量WV AD:SUM((CLOSE-OPEN)/(HIGH-LOW)*VOL,N)/10000;MAWV AD:MA(WV AD,M);PA V 筹码引力(加密)DBQR 对比强弱ZS:(INDEXC-REF(INDEXC,N))/REF(INDEXC,N);GG:(CLOSE-REF(CLOSE,N))/REF(CLOSE,N);MADBQR1:MA(GG,M1);MADBQR2:MA(GG,M2);MADBQR3:MA(GG,M3);JS 加速线JS:100*(CLOSE-REF(CLOSE,N))/(N*REF(CLOSE,N));MAJS1:MA(JS,M1);MAJS2:MA(JS,M2);MAJS3:MA(JS,M3);PA VE 强筹码引力(加密)CYE 市场趋势MAL:=MA(CLOSE,5);MAS:=MA(MA(CLOSE,20),5);CYEL:(MAL-REF(MAL,1))/REF(MAL,1)*100;CYES:(MAS-REF(MAS,1))/REF(MAS,1)*100;QR 强弱个股: (CLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100;大盘: (INDEXC-REF(INDEXC,N))/REF(INDEXC,N)*100;强弱值:EMA(个股-大盘,2),COLORSTICK;GDX 鬼道线AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,N))/MA(CLOSE,N); JAX:DMA(CLOSE,AA);压力线:(1+M/100)*JAX;支撑线:(1-M/100)*JAX;JLHB 绝路航标V AR1:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80;B:SMA(V AR1,N,1);V AR2:SMA(B,M,1);绝路航标:IF(CROSS(B,V AR2) AND B<40,50,0);第四节能量型BRAR 情绪指标BR:SUM(MAX(0,HIGH-REF(CLOSE,1)),N)/SUM(MAX(0,REF(CLOSE,1)-LOW),N)*100; AR:SUM(HIGH-OPEN,N)/SUM(OPEN-LOW,N)*100;CR 带状能量线MID:=REF(HIGH+LOW,1)/2;CR:SUM(MAX(0,HIGH-MID),N)/SUM(MAX(0,MID-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);MASS 梅斯线MASS:SUM(MA(HIGH-LOW,N1)/MA(MA(HIGH-LOW,N1),N1),N2); MAMASS:MA(MASS,M);PSY 心理线PSY:COUNT(CLOSE>REF(CLOSE,1),N)/N*100;PSYMA:MA(PSY,M);VR 成交量变异率TH:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,0),N);TL:=SUM(IF(CLOSE<REF(CLOSE,1),VOL,0),N);TQ:=SUM(IF(CLOSE=REF(CLOSE,1),VOL,0),N);VR:100*(TH*2+TQ)/(TL*2+TQ);MA VR:MA(VR,M);WAD 威廉多空力度线MIDA:=CLOSE-MIN(REF(CLOSE,1),LOW);MIDB:=IF(CLOSE<REF(CLOSE,1),CLOSE-MAX(REF(CLOSE,1),HIGH),0); WAD:SUM(IF(CLOSE>REF(CLOSE,1),MIDA,MIDB),0);MAW AD:MA(W AD,M);PCNT 幅度比PCNT:(CLOSE-REF(CLOSE,1))/CLOSE*100; MAPCNT:EXPMEMA(PCNT,M);CYR 市场强弱DIVE:=0.01*EMA(AMOUNT,N)/EMA(VOL,N); CYR:(DIVE/REF(DIVE,1)-1)*100;MACYR:MA(CYR,M);NVI 负成交量(加密)PVI 正成交量(加密)第五节成交量型AMO 成交金额AMO:AMOUNT,VOLSTICK;MAAMO1:MA(AMO,M1);MAAMO2:MA(AMO,M2);MAAMO3:MA(AMO,M3);OBV 累积能量线V A:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,V A),0);MAOBV:MA(OBV,M);VOL 成交量VOLUME:VOL,VOLSTICK;MA VOL1:MA(VOLUME,M1);MA VOL2:MA(VOLUME,M2);VOL-TDX 成交量(盘中虚拟)TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZN UM,1)))));MTIME:=MOD(FROMOPEN,TOTAL);CTIME:=IF(MTIME<0.5,TOTAL,MTIME);VVOL:IF((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VOL*TOTAL/CTIME,DRAWNULL),NODRAW;STICKLINE((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VVOL,0,-1,-1),COLOR00C0C0; VOLUME:VOL,VOLSTICK;MA VOL1:MA(VOLUME,M1);MA VOL2:MA(VOLUME,M2);CCL 持仓量(适用于期货)持仓量:VOLINSTK;MACCL:MA(持仓量,M);SHORTVOL 抛空量(适用于港股)抛空量:HKSHORTVOL,VOLSTICK;MACCL:MA(抛空量,M);VRSI 相对强弱量LC:=REF(VOL,1);RSI1:SMA(MAX(VOL-LC,0),N1,1)/SMA(ABS(VOL-LC),N1,1)*100; RSI2:SMA(MAX(VOL-LC,0),N2,1)/SMA(ABS(VOL-LC),N2,1)*100; RSI3:SMA(MAX(VOL-LC,0),N3,1)/SMA(ABS(VOL-LC),N3,1)*100;HSL 换手线HSL:100*VOL/(FINANCE(7)/100);MAHSL:MA(HSL,N);HSCOL 换手柱HSCOL:100*VOL/(FINANCE(7)/100),VOLSTICK;MAHSL:MA(HSCOL,N);DBQRV 对比强弱量ZS:(INDEXV-REF(INDEXV,N))/REF(INDEXV,N); GG:(VOL-REF(VOL,N))/REF(VOL,N);DBLB 对比量比GG:=VOL/SUM(REF(VOL,1),N);ZS:=INDEXV/SUM(REF(INDEXV,1),N); DBLB:GG/ZS;MADBLB:MA(DBLB,M);第六节均线型MA 均线MA1:MA(CLOSE,M1);MA2:MA(CLOSE,M2);MA3:MA(CLOSE,M3);MA4:MA(CLOSE,M4);MA2 均线MA1:MA(CLOSE,M1);MA2:MA(CLOSE,M2);MA3:MA(CLOSE,M3);MA4:MA(CLOSE,M4);MA5:MA(CLOSE,M5);MA6:MA(CLOSE,M6);MA7:MA(CLOSE,M7);MA8:MA(CLOSE,M8);MA9:MA(CLOSE,M9);MA10:MA(CLOSE,M10);ACD 升降线LC:=REF(CLOSE,1);DIF:=CLOSE-IF(CLOSE>LC,MIN(LOW,LC),MAX(HIGH,LC));ACD:SUM(IF(CLOSE=LC,0,DIF),0);MAACD:EXPMEMA(ACD,M);BBI 多空指标BBI:(MA(CLOSE,M1)+MA(CLOSE,M2)+MA(CLOSE,M3)+MA(CLOSE,M4))/4;EXPMA 指数平均线EXP1:EMA(CLOSE,M1);EXP2:EMA(CLOSE,M2);EXPMA-S 指数平均线-副图EXP1:EMA(CLOSE,M1);EXP2:EMA(CLOSE,M2);HMA 高价平均线HMA1:MA(HIGH,M1);HMA2:MA(HIGH,M2);HMA3:MA(HIGH,M3);HMA4:MA(HIGH,M4);HMA5:MA(HIGH,M5);LMA 低价平均线LMA1:MA(LOW,M1);LMA2:MA(LOW,M2);LMA3:MA(LOW,M3);LMA4:MA(LOW,M4);LMA5:MA(LOW,M5);VMA 变异平均线VV:=(HIGH+OPEN+LOW+CLOSE)/4; VMA1:MA(VV,M1);VMA2:MA(VV,M2);VMA3:MA(VV,M3);VMA4:MA(VV,M4);VMA5:MA(VV,M5);AMA 成本价均线AMOV:=VOL*(OPEN+CLOSE)/2;AMV1:SUM(AMOV,M1)/SUM(VOL,M1);AMV2:SUM(AMOV,M2)/SUM(VOL,M2);AMV3:SUM(AMOV,M3)/SUM(VOL,M3);AMV4:SUM(AMOV,M4)/SUM(VOL,M4);MCST 市场成本BBIBOLL 多空布林线CV:=CLOSE;BBIBOLL:(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4; UPR:BBIBOLL+M*STD(BBIBOLL,N);DWN:BBIBOLL-M*STD(BBIBOLL,N);第七节图表型ZXNH 直线拟合(加密)ZX 重心线A V:0.01*AMOUNT/VOL;PUCU 逆时钟曲线PU:MA(CLOSE,N);CU:MA(VOL,N);第八节路径型BOLL-M 布林线-主图叠加BOLL 布林线BOLL:MA(CLOSE,N);UB:BOLL+2*STD(CLOSE,N);LB:BOLL-2*STD(CLOSE,N);PXB 瀑布线PBX1:(EMA(CLOSE,M1)+MA(CLOSE,M1*2)+MA(CLOSE,M1*4))/3; PBX2:(EMA(CLOSE,M2)+MA(CLOSE,M2*2)+MA(CLOSE,M2*4))/3; PBX3:(EMA(CLOSE,M3)+MA(CLOSE,M3*2)+MA(CLOSE,M3*4))/3; PBX4:(EMA(CLOSE,M4)+MA(CLOSE,M4*2)+MA(CLOSE,M4*4))/3; PBX5:(EMA(CLOSE,M5)+MA(CLOSE,M5*2)+MA(CLOSE,M5*4))/3; PBX6:(EMA(CLOSE,M6)+MA(CLOSE,M6*2)+MA(CLOSE,M6*4))/3;EXE 轨道线UPPER:(1+M1/100)*MA(CLOSE,N);LOWER:(1-M2/100)*MA(CLOSE,N);ENE:(UPPER+LOWER)/2;MIKE 麦克支撑压力HLC:=REF(MA((HIGH+LOW+CLOSE)/3,N),1);HV:=EMA(HHV(HIGH,N),3);LV:=EMA(LLV(LOW,N),3);STOR:EMA(2*HV-LV,3);MIDR:EMA(HLC+HV-LV,3);WEKR:EMA(HLC*2-LV,3);WEKS:EMA(HLC*2-HV,3);MIDS:EMA(HLC-HV+LV,3);STOS:EMA(2*LV-HV,3);SSRP 筹码峰(加密)XS 薛斯通道(加密)XS2 薛斯通道ⅡAA:=MA((2*CLOSE+HIGH+LOW)/4,5);通道1:AA*N/100;通道2:AA*(200-N)/100;CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20); DD:=DMA(CLOSE,CC);通道3:(1+M/100)*DD;通道4:(1-M/100)*DD;第九节停损型SAR 抛物线指标(加密)TDXWA VE 通达信趋势浪(加密)VTY 价格变异率(加密)第十节策略型MA策略MA交易策略{该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} {变量赋值}MA1:=MA(CLOSE,SHORT);MA2:=MA(CLOSE,LONG);{交易条件}平空开多:=CROSS(MA1,MA2);平多开空:=CROSS(MA2,MA1);{交易系统}BUYSHORT_BUY(平空开多,LOW);SELL_SELLSHORT(平多开空,HIGH);{交易信号过滤}AUTOFILTER;MACD策略MACD交易策略{该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} DIFF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:=EMA(DIFF,MID);MACD:=2*(DIFF-DEA);平空开多:=CROSS(MACD,0);平多开空:=CROSS(0,MACD);BUYSHORT_BUY(平空开多,LOW);SELL_SELLSHORT(平多开空,HIGH);AUTOFILTER;KDJ策略KDJ交易策略{该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,M1,1);D:=SMA(K,M1,1);J:=3*K-2*D;平空开多:=CROSS(J,0);平多开空:=CROSS(100,J);BUYSHORT_BUY(平空开多,LOW);SELL_SELLSHORT(平多开空,HIGH);AUTOFILTER;肯特纳肯特纳通道交易策略{该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} MA1:=REF(MA((HIGH+LOW+CLOSE)/3,A VGLENGTH),1);UPPERBAND:=MA1+REF(MA(TR,ATRLENGTH),1);LOWERBAND:=MA1-REF(MA(TR,ATRLENGTH),1);开多条件:=MA1>REF(MA1,1) AND HIGH>=UPPERBAND;平多条件:=LOW<=MA1;开空条件:=MA1<REF(MA1,1) AND LOW<=LOWERBAND;平空条件:=HIGH>=MA1;GL1:=NOT(开多条件=1 AND 平多条件=1);GL2:=NOT(开空条件=1 AND 平空条件=1);SELL(平多条件,HIGH);BUYSHORT(平空条件,LOW);BUY(开多条件AND GL1,LOW);SELLSHORT(开空条件AND GL2,HIGH);AUTOFILTER;唐奇安唐奇安通道交易策略{该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} 周期高点:=REF(HHV(H,X1),1);周期低点:=REF(LLV(L,X2),1);平空开多:=HIGH>=周期高点;平多开空:=LOW<=周期低点;BUYSHORT_BUY(平空开多,LOW);SELL_SELLSHORT(平多开空,HIGH);AUTOFILTER;日内突破日内突破交易策略{该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} {变量赋值}NBAR:=BARSLAST(DA TE<>REF(DA TE,1))+1;HHN:REF(HHV(H,N),1);LLN:REF(LLV(L,N),1);MID:(HHN+LLN)/2;T1:=TIME>900 AND TIME <1455;{根据品种的交易时间和选择的周期做相应调整}T2:=TIME>=1455;{根据品种的交易时间和选择的周期做相应调整}{交易条件}开多条件:=H>HHN AND (HHN-MID)/MID<M/1000 AND NBAR>=30 AND T1;开空条件:=L<LLN AND (MID-LLN)/MID<M/1000 AND NBAR>=30 AND T1;{交易系统}BUY(开多条件,LOW);SELLSHORT(开空条件,HIGH);SELL(T2,HIGH);BUYSHORT(T2,LOW);AUTOFILTER;HANS123 日内HANS交易策略{该模型为示范模型,仅用于说明算法语法,用户需根据自己交易经验修改后再实际应用} {变量赋值}N:=BARSLAST(DATE<>REF(DATE,1))+1;HHH:=V ALUEWHEN(TIME<=900+NMIN1,HHV(H,N));LLL:=V ALUEWHEN(TIME<=900+NMIN1,LLV(L,N));上轨:HHH+M*MINDIFF;下轨:LLL-M*MINDIFF;{交易条件}开多条件:=C>上轨;开空条件:=C<下轨;交易时间:=TIME>900+NMIN1 AND TIME<1450;平仓时间:=TIME>=1500-NMIN2;{交易系统}BUY(开多条件AND 交易时间,LOW);SELLSHORT(开空条件AND 交易时间,HIGH);SELL(平仓时间,HIGH);BUYSHORT(平仓时间,LOW);AUTOFILTER;第十一节神系SG-XDT 心电图(需下载日线)QR:CLOSE/INDEXC*1000;MQR1:MA(QR,5);MQR2:MA(QR,10);SG-NDB 脑电波HH:=IF(C/REF(C,1)>1.093 AND L>REF(H,1),2*C-REF(C,1)-H,2*C-H-L); V1:=BARSCOUNT(C);V2:=2*REF(C,V1)-REF(H,V1)-REF(L,V1);DK:SUM(HH,0)+V2;MDK5:MA(DK,P1);MDK10:MA(DK,P2);SG-SMX 生命线(需下载日线)H1:=HHV(HIGH,N);L1:=LLV(LOW,N);H2:=HHV(INDEXH,N);L2:=LLV(INDEXL,N);ZY:=CLOSE/INDEXC*2000;ZY1:EMA(ZY,3);ZY2:EMA(ZY,17);ZY3:EMA(ZY,34);SG-LB 量比(需下载日线)ZY2:=VOL/INDEXV*1000;量比:ZY2;MA5:MA(ZY2,5);MA10:MA(ZY2,10);SG-PF 强势股评分(需下载日线)ZY1:=CLOSE/INDEXC*1000;A1:=IF(ZY1>HHV(ZY1,3),10,0);A2:=IF(ZY1>HHV(ZY1,5),15,0);A3:=IF(ZY1>HHV(ZY1,10),20,0);A4:=IF(ZY1>HHV(ZY1,2),10,0);A5:=COUNT(ZY1>REF(ZY1,1) ,9)*5;强势股评分:A1+A2+A3+A4+A5;第十二节龙系RAD 威力雷达SM:=(OPEN+HIGH+CLOSE+LOW)/4;SMID:=MA(SM,D);IM:=(INDEXO+INDEXH+INDEXL+INDEXC)/4;IMID:=MA(IM,D);SI1:=(SMID-REF(SMID,1))/SMID;II:=(IMID-REF(IMID,1))/IMID;RADER1:SUM((SI1-II)*2,S)*1000;RADERMA:SMA(RADER1,M,1);LON 龙系长线LC := REF(CLOSE,1);VID := SUM(VOL,2)/(((HHV(HIGH,2)-LLV(LOW,2)))*100); RC := (CLOSE-LC)*VID;LONG := SUM(RC,0);DIFF := SMA(LONG,10,1);DEA := SMA(LONG,20,1);LON : DIFF-DEA;LONMA : MA(LON,10);LONT : LON, COLORSTICK;SHT 龙系短线V AR1:=MA((VOL-REF(VOL,1))/REF(VOL,1),5);V AR2:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;MY: V AR2*(1+V AR1);SHT: MY, COLORSTICK;SHTMA: MA(SHT,N);ZLJC 主力进出V AR1:=(CLOSE+LOW+HIGH)/3;V AR2:=SUM(((V AR1-REF(LOW,1))-(HIGH-V AR1))*VOL/100000/(HIGH-LOW),0);V AR3:=EMA(VAR2,1);JCS:VAR3;JCM:MA(V AR3,12);JCL:MA(V AR3,26);ZLMM 主力买卖LC :=REF(CLOSE,1);RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;RSI3:=SMA(MAX(CLOSE-LC,0),18,1)/SMA(ABS(CLOSE-LC),18,1)*100;MMS:MA(3*RSI2-2*SMA(MAX(CLOSE-LC,0),16,1)/SMA(ABS(CLOSE-LC),16,1)*100,3); MMM:EMA(MMS,8);MML:MA(3*RSI3-2*SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,5); SLZT 神龙在天白龙: MA(CLOSE,125);黄龙: 白龙+2*STD(CLOSE,170);紫龙: 白龙-2*STD(CLOSE,145);青龙: SAR(125,1,7), LINESTICK;V AR2:=HHV(HIGH,70);V AR3:=HHV(HIGH,20);红龙: V AR2*0.83;蓝龙: V AR3*0.91;ADVOL 龙系离散量A:=SUM(((CLOSE-LOW)-(HIGH-CLOSE))*VOL/10000/(HIGH-LOW),0);ADVOL:A;MA1:MA(A,30);MA2:MA(MA1,100);第十三节鬼系CYC 成本均线JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));DDD:=(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01);JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01) && JJJ>(DYNAINFO(6)-0.01)));CYC1:IF(JJJT,0.01*EMA(AMOUNT,P1)/EMA(VOL,P1),EMA((HIGH+LOW+CLOSE)/3,P1));CYC2:IF(JJJT,0.01*EMA(AMOUNT,P2)/EMA(VOL,P2),EMA((HIGH+LOW+CLOSE)/3,P2));CYC3:IF(JJJT,0.01*EMA(AMOUNT,P3)/EMA(VOL,P3),EMA((HIGH+LOW+CLOSE)/3,P3));CYC∞:IF(JJJT,DMA(AMOUNT/(100*VOL),100*VOL/FINANCE(7)),EMA((HIGH+LOW+CLOSE)/3,120));CYS 市场盈亏CYC13:=0.01*EMA(AMOUNT,13)/EMA(VOL,13);CYS:(CLOSE-CYC13)/CYC13*100;CYQKL 博弈K线长度KL:100*(WINNER(CLOSE)-WINNER(OPEN));CYW 主力控盘V AR1:=CLOSE-LOW;V AR2:=HIGH-LOW;V AR3:=CLOSE-HIGH;V AR4:=IF(HIGH>LOW,(V AR1/V AR2+V AR3/VAR2)*VOL,0);CYW: SUM(V AR4,10)/10000, COLORSTICK;第十四节其他系XT 箱体【箱顶】:PEAK(CLOSE,N,1)*0.98;【箱底】:TROUGH(CLOSE,N,1)*1.02;【箱高】:100*(【箱顶】-【箱底】)/【箱底】,NODRAW;JAX 济安线AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,N))/MA(CLOSE,N);济安线:DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK3,COLORMAGENTA;CC:=(CLOSE/济安线);MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);MAAA:=((MA1-济安线)/济安线)/3;TMP:=MA1-MAAA*MA1;J:IF(TMP<=济安线,济安线,DRAWNULL),LINETHICK3,COLORCYAN;A:TMP,LINETHICK2,COLORYELLOW;X:IF(TMP<=济安线,TMP,DRAWNULL),LINETHICK2,COLORGREEN;CJDX 超级短线V AR1:=(2*CLOSE+HIGH+LOW)/4;V AR2:=EMA(EMA(EMA(V AR1,4),4),4);J: (V AR2-REF(V AR2,1))/REF(V AR2,1)*100, COLORSTICK;D: MA(J,3);K: MA(J,1);ZJTJ 庄家抬轿V AR1:=EMA(EMA(CLOSE,9),9);控盘:=(V AR1-REF(VAR1,1))/REF(V AR1,1)*1000;STICKLINE(控盘<0,控盘,0,1,0),COLORWHITE;A10:=CROSS(控盘,0);无庄控盘:IF(控盘<0,控盘,0),COLORWHITE,NODRAW;开始控盘:IF(A10,5,0),LINETHICK1,COLORYELLOW;STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,1,0),COLORRED;有庄控盘:IF(控盘>REF(控盘,1) AND 控盘>0,控盘,0),COLORRED,NODRAW;V AR2:=100*WINNER(CLOSE*0.95);STICKLINE(V AR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,1,0),COLORFF00FF;高度控盘:IF(V AR2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0),COLORFF00FF,NODRAW; STICKLINE(控盘<REF(控盘,1) AND 控盘>0,控盘,0,1,0),COLOR00FF00;主力出货:IF(控盘<REF(控盘,1) AND 控盘>0,控盘,0),COLOR00FF00,NODRAW;ZBCD 准备抄底V AR1:=AMOUNT/VOL/7;V AR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;V AR3:=SUM(AMOUNT,N)/V AR1/7;V AR4:=DMA(V AR2,VOL/V AR3);抄底:(CLOSE-V AR4)/V AR4*100,COLORLIMAGENTA;DRAWICON(CROSS(-7.0,抄底),抄底,1);BDZX 波段之星V AR2:=(HIGH+LOW+CLOSE*2)/4;V AR3:=EMA(VAR2,21);V AR4:=STD(V AR2,21);V AR5:=((V AR2-VAR3)/V AR4*100+200)/4;V AR6:=(EMA(V AR5,5)-25)*1.56;AK: EMA(V AR6,2)*1.22;AD1: EMA(AK,2);AJ: 3*AK-2*AD1;AA:100;BB:0;CC:80;买进: IF(CROSS(AK,AD1),58,20);卖出: IF(CROSS(AD1,AK),58,20);LHXJ 猎狐先觉V AR1:=(CLOSE*2+HIGH+LOW)/4;V AR2:=EMA(VAR1,13)-EMA(V AR1,34);V AR3:=EMA(VAR2,5);主力弃盘: (-2)*(VAR2-V AR3)*3.8;主力控盘: 2*(VAR2-V AR3)*3.8;LYJH 猎鹰歼狐V AR1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;机构做空能量线: SMA(V AR1,2,1);V AR2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;机构做多能量线: SMA(V AR2,5,1)-8;LH: M;LH1: M1;JFZN 飓风智能中线V AR2:=SUM(IF(CLOSE>OPEN,VOL,0),N)/SUM(VOL,N)*100;V AR3:=100-SUM(IF(CLOSE>OPEN,VOL,0),N)/SUM(VOL,N)*100; 多头力量: V AR2;空头力量: V AR3;多空平衡: 50;CYHT 财运亨通V AR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;高抛: 80;V AR2:=LLV(LOW,34);V AR3:=HHV(HIGH,34);SK: EMA((V AR1-V AR2)/(V AR3-V AR2)*100,13);SD: EMA(SK,3);低吸: 20;强弱分界: 50;V AR4:=IF(CROSS(SK,SD),40,22);V AR5:=IF(CROSS(SD,SK),60,78);卖出: V AR5;买进: V AR4;SCR 筹码集中度A:=P1+(100-P1)/2;B:=(100-P1)/2;CC:=COST(A);DD:=COST(B);SCR:(CC-DD)/(CC+DD)*100/2;ASR 浮筹比例ASR:(WINNER(C*1.1)-WINNER(C*0.9))/WINNER(HHV(H,0))*100;BSQJ 买卖区间买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);STICKLINE(买线>=卖线,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),6,0),COLOR001050; STICKLINE(买线<卖线,REFDATE(HHV(H,0),DA TE),REFDATE(LLV(L,0),DATE),6,0),COLOR404050; DRAWKLINE(H,O,L,C);指导:=EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4,2);界:=MA(CLOSE,27);B买:IF(CROSS(指导,界) OR CROSS(买线,卖线),C,DRAWNULL),COLORMAGENTA,NODRAW;持仓:IF(买线>=卖线,C,DRAWNULL),COLORRED,NODRAW;S卖:IF(CROSS(界,指导) OR CROSS(卖线,买线),C,DRAWNULL),COLORLIGRAY,NODRAW;空仓:IF(买线<卖线,C,DRAWNULL),COLORGREEN,NODRAW;DRAWICON(CROSS(买线,卖线),L,1);DRAWICON(CROSS(卖线,买线),H,2);ZJL 折价率用于排序折价率:IF(FINANCE(34)>0.001,(FINANCE(34)-CLOSE)*100.0/FINANCE(34),0);CDP-STD 逆势操作CH:=REF(H,1);CL:=REF(L,1);CC:=REF(C,1);CDP:(CH+CL+CC)/3;AH:CDP+CH-CL;NH:CDP+CDP-CL;NL:CDP+CDP-CH;AL:CDP-CH+CL;TBP-STD 趋势平衡点APX:=(H+L+C)/3;TR0:=MAX(H-L,MAX(ABS(H-REF(C,1)),ABS(L-REF(C,1))));MF0:=C-REF(C,2);MF1:=REF(MF0,1);MF2:=REF(MF0,2);DIRECT1:=BARSLAST(MF0>MF1 AND MF0>MF2);DIRECT2:=BARSLAST(MF0<MF1 AND MF0<MF2);DIRECT0:=IF(DIRECT1<DIRECT2,100,-100);TBP:REF(REF(C,1)+IF(DIRECT0>50,MIN(MF0,MF1),MAX(MF0,MF1)),1);多头获利:REF(IF(DIRECT0>50,APX*2-L,DRAWNULL),1),NODRAW;多头停损:REF(IF(DIRECT0>50,APX-TR0,DRAWNULL),1),NODRAW;空头回补:REF(IF(DIRECT0<-50,APX*2-H,DRAWNULL),1),NODRAW;空头停损:REF(IF(DIRECT0<-50,APX+TR0,DRAWNULL),1),NODRAW;SC 三叉(加密)NDB 脑电波(加密)JYJL 交易参考均量单位时间总量: SUM(VOL,N)*100,NODRAW;单位时间内均量: 单位时间总量/(N/M);JSJG 参考结算价(适用于金融期货)FIRST:=IF(PERIOD=0,HOUR=14 AND MINUTE=16,DRAWNULL);TOTAL:=IF(PERIOD=0,60,0);MAMIN:=BARSLAST(FIRST)+1;COUNTFLAG:=(PERIOD=0 AND ( (HOUR=14 AND MINUTE>=16) OR HOUR=15 )); 逼近结算价格:IF(COUNTFLAG,SUM(C*V,MAMIN)/SUM(V,MAMIN),DRAWNULL); LASTP:=C;LASTM:=MAMIN;LASTV:=MA(V,MAMIN);参考结算价格:IF(COUNTFLAG,(SUM(C*V,MAMIN)+LASTP*LASTV*(TOTAL-LASTM))/(LASTV*TOTAL),DRAWNULL); VOLATILITY 波动率SQRT(250)*STD(C/REF(C,1)-1,N);第十五节特色型CPBS 操盘BS点BU:=CROSS(HIGH,SAR(3,1,20));SEL:=CROSS(SAR(3,1,20),LOW);DRAWTEXT(BU,LOW,'B'),COLORYELLOW,LINETHICK2;DRAWTEXT(SEL,1.01*HIGH,'S'),COLORGREEN,LINETHICK2;CYX 撑压线Z1:=STRCAT(HYBLOCK,' ');Z2:=STRCAT(Z1,DYBLOCK);Z3:=STRCAT(Z2,' ');DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLOR00C0C0; A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1:=(D2 AND NOT(D1 AND E1<E2));H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);NOTEXT1:DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORRED;NOTEXT2:DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORGREEN;WA VE 波浪分析ZIG(3,因子);SKSD 时空隧道STICKLINE(CURRBARSCOUNT<=N,H,L,-1,0),COLORBLACK;DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCA T(CON2STR(N,0),'周期前K线选中主图后按ALT+T键调节回退的周期')),COLORLIMAGENTA;NOTEXT1:IF(CURRBARSCOUNT>=N+1,MA(C,M),DRAWNULL),COLORWHITE;NOTEXT2:IF(CURRBARSCOUNT<=N,MA(C,M),DRAWNULL),COLORBLACK;XLPL 吸拉派落(加密)GSTQ 股市天气(加密)AROON 阿隆指标上轨:(N-HHVBARS(H,N))/N*100,COLORRED;下轨:(N-LLVBARS(H,N))/N*100,COLORGREEN;CFJT 财富阶梯突破:=REF(EMA(C,14),1);A1X:=(EMA(C,10)-突破)/突破*100;多方:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);空方:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);STICKLINE(A1X>=0,多方,突破,10,0),COLOR000099;STICKLINE(A1X<0,空方,突破,10,0),COLOR00CC66;TJCJL 太极成交量总手:VOL,NODRAW;DRAWTEXT_FIX(ISLASTBAR,0,0,0,'说明: 红色柱为吸货量,绿色为出货量,黄色为天量,蓝色为地量'),COLORGRAY;ZZ:=IF(REF(C,1)>REF(O,1) AND O>REF(C,1)*1.014 AND C<O*1.02,1,3);V5:=MA(V,5);V12:=MA(V,12);V34:=MA(V,34);C6:=MA(C,6);STICKLINE(VOL,0,VOL,1,0),COLORLIGRAY;STICKLINE(CROSS(C,C6) AND V>V5*1.2 AND V>V12*1.2 AND ZZ>2 AND C>H*0.975,0,VOL,1,0),COLORRED;STICKLINE(CROSS(C6,C) AND V>V5*1.2 AND V>V12*1.2,0,VOL,1,0),COLORGREEN;STICKLINE(VOL>MA(VOL,5)*2 AND V>V34*3 AND C<REF(C,1)*1.05,0,VOL,1,0),COLORYELLOW; STICKLINE(VOL<MA(VOL,5)/2 AND V<V12/2,0,VOL,1,0),COLORBLUE;STICKLINE(VOL>MA(VOL,5)*2 AND V>V34*3 AND C<REF(C,1)*1.05 AND CROSS(C,C6) AND V>V5*1.2 AND V>V12*1.2 AND ZZ>2 AND C>H*0.975,VOL*0.5,0,1,0),COLORRED;STICKLINE(VOL>MA(VOL,5)*2 AND V>V34*3 AND C<REF(C,1)*1.05 AND CROSS(C6,C) AND V>V5*1.2 AND V>V12*1.2,VOL*0.5,0,1,0),COLORRED;ZJFZ 追击反转V AR2:=REF(LOW,1);V AR3:=SMA(ABS(LOW-V AR2),3,1)/SMA(MAX(LOW-V AR2,0),3,1)*100;V AR4:=EMA(VAR3*10,3);V AR5:=LLV(LOW,13);V AR6:=HHV(V AR4,13);V AR7:=EMA(IF(LOW<=V AR5,(V AR4+V AR6*2)/2,0),3)/618;V AR8:=IF(V AR7>500,500,V AR7);STICKLINE(V AR8>-120,0,V AR8,3,1),COLORGRAY;STICKLINE(V AR8>1 AND "KDJ.J">REF("KDJ.J",1) AND REF("KDJ.J",1)<REF("KDJ.J",2),0,V AR8,3,0),COLORRED;STICKLINE(V AR8>0.1 AND V AR8<1 AND "KDJ.J">REF("KDJ.J",1) AND REF("KDJ.J",1)<REF("KDJ.J",2),0,V AR8,3,0),COLOR00FFFF;ZSDB 指数对比A:=REF(INDEXC,1);指数涨幅:IF(A>0,(INDEXC-A)*100/A,0),NODRAW;HYDB:DRAWKLINE(INDEXH,INDEXO,INDEXL,INDEXC);HYDB 行业对比A:=REF(HY_INDEXC,1);行业涨幅:IF(A>0,(HY_INDEXC-A)*100/A,0),NODRAW;DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK),COLOR00C0C0;HYDB:DRAWKLINE(HY_INDEXH,HY_INDEXO,HY_INDEXL,HY_INDEXC);FKX 反K线DRAWKLINE(-LOW, -OPEN, -HIGH, -CLOSE);ZJLX 资金流向超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;资金流向:(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW; STICKLINE(资金流向>0,0,资金流向,2,0),COLORRED; STICKLINE(资金流向<0,0,资金流向,2,0),COLORCY AN;近5日流向:SUM(资金流向,5),NODRAW;近10日流向:SUM(资金流向,10),NODRAW;ZJQDL 资金驱动力超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;净流入:(超B+大B+中B+小B)-(超S+大S+中S+小S);大宗净流入:(超B+大B)-(超S+大S);ZJBY 资金博弈超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=-L2_AMO(0,3)/10000.0;大S:=-L2_AMO(1,3)/10000.0;中S:=-L2_AMO(2,3)/10000.0;小S:=-L2_AMO(3,3)/10000.0;净流入:(超B+大B+中B+小B)+(超S+大S+中S+小S),NODRAW; 超大单:(超B)+(超S);大单:(大B)+(大S);中单:(中B)+(中S);。
通达信指标公式源码K线形态
通达信指标公式源码K线形态通达信是国内一款常用的股票分析软件,其拥有丰富的指标库。
下面是我随机选取的一些通达信指标公式源码,主要涉及K线形态的指标:1. 三重顶(ThreeTop)公式源码如下:```C:=REF(CLOSE,1);AVGMA:=(MAX(HIGH,C)+MIN(LOW,C))/2;XG:=AVGMA>REF(AVGMA,1)ANDAVGMA>REF(AVGMA,2)ANDREF(AVGMA,1)>R EF(AVGMA,2);COUNT1:=SUM(IF(XG,1,0),30);DST:=(C-LOW)/(HIGH-LOW)>IF(HIGH>REF(HIGH,1),0.75,1);COUNT2:=SUM(DST,30);THREETOP:CROSS(COUNT1,COUNT2)ANDCOUNT1>15ANDCOUNT2<5;```此公式计算了三重顶的形态,利用三个条件来判断:前一天的平均价大于前两天,前一天的收盘价高于前两天,且最近30天中出现三重顶的数量大于15个,且没有出现破位的情况。
2. 三重底(ThreeBottom)公式源码如下:```C:=REF(CLOSE,1);AVGMA:=(MAX(HIGH,C)+MIN(LOW,C))/2;XG:=AVGMA<REF(AVGMA,1)ANDAVGMA<REF(AVGMA,2)ANDREF(AVGMA,1)<R EF(AVGMA,2);COUNT1:=SUM(IF(XG,1,0),30);DST:=(C-LOW)/(HIGH-LOW)<IF(LOW<REF(LOW,1),0.25,0);COUNT2:=SUM(DST,30);THREEBTM:CROSS(COUNT1,COUNT2)ANDCOUNT1>15ANDCOUNT2<5;```此公式计算了三重底的形态,利用三个条件来判断:前一天的平均价小于前两天,前一天的收盘价低于前两天,且最近30天中出现三重底的数量大于15个,且没有出现破位的情况。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
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;
MADKX:MA(DKX,M);
K:EMA(RSபைடு நூலகம்,M);
D:MA(K,M);
UDL 引力线
UDL:(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4;
MAUDL:MA(UDL,M);
WR 威廉指标
WR1:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N));
MCL:EMA1-EMA2;
MAMCL1:EMA1;
MAMCL2:EMA2;
MSI 麦氏综合指标
OBOS 超买超卖指标
OBOS:EMA(ADVANCE-DECLINE,N);
MAOBOS:MA(OBOS,M);
STIX 指数平滑广量
TBR:100*ADVANCE/(ADVANCE+DECLINE);
通达信系统指标公式
并非闲人编辑整理
2016年4月
目录2
第一章技术指标公式1
第一节大势型1
第二节超买超卖型3
第三节趋势型9
第四节能量型14
第五节成交量型16
第六节均线型19
第七节图表型22
第八节路径型23
第九节停损型25
第十节策略型25
第十一节神系28
第十二节龙系30
第十三节鬼系32
第十四节其他系32
KD 随机指标KD
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
SKDJ 慢速随机指标
LOWV:=LLV(LOW,N);
HIGHV:=HHV(HIGH,N);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,M);
EMV:MA(MID*VOLUME*(HIGH-LOW)/MA(HIGH-LOW,N),N);
MAEMV:MA(EMV,M);
MACD 平滑异同平均
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
DMA 平均差
DIF:MA(CLOSE,N1)-MA(CLOSE,N2);
DIFMA:MA(DIF,M);
DMI 趋向指标
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
ATR:MA(MTR,N);
DKX多空线
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
DKX:(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)+
MFI:100-(100/(1+V1));
MTM 动量线
MTM:CLOSE-REF(CLOSE,N);
MTMMA:MA(MTM,M);
OSC
OSC:100*(CLOSE-MA(CLOSE,N));
MAOSC:EXPMEMA(OSC,M);
RSI 相对强弱指标
LC:=REF(CLOSE,1);
RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
WR2:100*(HHV(HIGH,N1)-CLOSE)/(HHV(HIGH,N1)-LLV(LOW,N1));
LWR 慢速威廉指标
RSV:= (HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))*100;
LWR1:SMA(RSV,M1,1);
LWR2:SMA(LWR1,M2,1);
VU:=IF(DIF>=0,DIF,0);
VD:=IF(DIF<0,-DIF,0);
MAU1:=MEMA(VU,M1);
MAD1:=MEMA(VD,M1);
MAU2:=MEMA(VU,M2);
MAD2:=MEMA(VD,M2);
RSI10:MA(100*MAU1/(MAU1+MAD1),M1);
RSI6:MA(100*MAU2/(MAU2+MAD2),M2);
VMACD 量平滑异同平均
DIF:EMA(VOL,SHORT)-EMA(VOL,LONG);
DEA:EMA(DIF,MID);
MACD:DIF-DEA,COLORSTICK;
QACD 快速异同平均
DIF:EMA(CLOSE,N1)-EMA(CLOSE,N2);
MACD:EMA(DIF,M);
DDIF:DIF-MACD;
MAWVAD:MA(WVAD,M);
PAV 筹码引力
DBQR 对比强弱
ZS:(INDEXC-REF(INDEXC,N))/REF(INDEXC,N);
GG:(CLOSE-REF(CLOSE,N))/REF(CLOSE,N);
MADBQR1:MA(GG,M1);
MADBQR2:MA(GG,M2);
MADBQR3:MA(GG,M3);
MAABI:EMA(ABI,M);
ADL
ADL:SUM(ADVANCE-DECLINE,0);
MAADL:MA(ADL,M);
ADR
ADR:SUM(ADVANCE,N)/SUM(DECLINE,N);
MAADR:MA(ADR,M);
ARMS 阿姆氏指标
ARMS:EMA(ADVANCE/DECLINE,N);
TRIX 三重指数平均线
MTR:=EMA(EMA(EMA(CLOSE,N),N),N);
TRIX:(MTR-REF(MTR,1))/REF(MTR,1)*100;
MATRIX:MA(TRIX,M) ;
UOS 终极指标
TH:=MAX(HIGH,REF(CLOSE,1));
TL:=MIN(LOW,REF(CLOSE,1));
ADXR:EXPMEMA(ADX,MM);
DPO 区间震荡线
DPO:CLOSE-REF(MA(CLOSE,N),N/2+1);
MADPO:MA(DPO,M);
EMV 简易波动指标
VOLUME:=MA(VOL,N)/VOL;
MID:=100*(HIGH+LOW-REF(HIGH+LOW,1))/(HIGH+LOW);
BIAS3 :(CLOSE-MA(CLOSE,N3))/MA(CLOSE,N3)*100;
BIAS36 三六乖离
BIAS36:MA(CLOSE,3)-MA(CLOSE,6);
BIAS612:MA(CLOSE,6)-MA(CLOSE,12);
MABIAS:MA(BIAS36,M);
ACCER 幅度涨速
TAPI 加权指数成交值(需下载日线)
TAPI:AMOUNT/INDEXC;
MATAIP:MA(TAPI,M);
第三节
ASI 振动升降指标
CHO
MID:=SUM(VOL*(2*CLOSE-HIGH-LOW)/(HIGH+LOW),0);
CHO:MA(MID,N1)-MA(MID,N2);
MACHO:MA(CHO,M);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/MTR;
MDI: DMM*100/MTR;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM);
BIAS-QL 乖离率-传统版
BIAS :(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100;
BIASMA :MA(BIAS,M);
BIAS 乖离率
BIAS1 :(CLOSE-MA(CLOSE,N1))/MA(CLOSE,N1)*100;
BIAS2 :(CLOSE-MA(CLOSE,N2))/MA(CLOSE,N2)*100;
MAARMS:MA(ARMS,M);
BTI 广量冲力指标
BTI:EMA(100*ADVANCE/(ADVANCE+DECLINE),N);
MABTI:MA(BTI,M);
MCL 麦克连指标
DIF:=ADVANCE-DECLINE;
EMA1:=EMA(DIF,N1);
EMA2:=EMA(DIF,N2);
RSI2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
RSI3:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;