通达信画线指标公式
通达信自动趋势划线主图指标公式
通达信自动趋势划线主图指标公式通达信自动趋势划线主图指标公式通达信自动趋势划线主图股票软件源码如下:A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);B1:=FILTER(A1,3);C1:=BACKSET(B1,3+1);D1:=FILTER(C1,3);{高点}A2:=REF(LOW,3)=LLV(LOW,2*3+1);B2:=FILTER(A2,3);C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);{低点}E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1ANDNOT(D2ANDE1=E2))ORISLASTBARORBARSCO UNT(CLOSE)=1;H2:=D1ANDNOT(D2ANDE1=E2);L1:=D2ANDNOT(D1ANDE1=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1ANDCOUNT(L1,X1)0,LLVBARS(IF(L1,LOW,10 000),X1));G1:=F1REF(F1,1);I1:=BACKSET(G1,2);LD:=I1REF(I1,1);{过滤后低点}L2:=LDORISLASTBARORBARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;{_通达信股票指标公式}F2:=BACKSET(L2ANDCOUNT(H2,X2)0,HHVBARS(IF(H2,HIGH ,0),X2));G2:=F2REF(F2,1);I2:=BACKSET(G2,2);HD:=I2REF(I2,1);{过滤后高点}J1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HD),BARSLAST(LD ))+1);J2:=J1REF(J1,1);A3:=H;B3:=REF(H,REF(BARSLAST(HD),1)+1)REF(H,REF(BARS LAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));D3:=A3ANDB3ANDHD;E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);HH:=E3REF(E3,1);{找出全部长期高点}A4:=LREF(L,REF(BARSLAST(LD),1)+1);B4:=REF(L,REF(BARSLAST(LD),1)+1);D4:=A4ANDB4ANDLD;E 4:=BACKSET(D4,REF(BARSLAST(LD),1)+2);LL:=E4REF(E4,1);{找出全部长期低点}DRAWICON(HH,H*1.01,8);DRAWICON(LL,L*0.999,7);H3:=HHORISLASTBARORBARSCOUNT(C)=1;{后面进行过滤,方法同前。
通达信指标公式源码顶底趋势主图画线指标
顶底趋势主图画线指标N:=3;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;{高低点出现在同一K线上时可作取舍}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),LINETHICK0;{过滤后低点}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),LINETHICK0;{过滤后高点}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);{前二低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3>REF(T3,1);{前三低}T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);U4:=T4>REF(T4,1);{前四低}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3>REF(R3,1);{前三高}R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);S4:=R4>REF(R4,1);{前四高}★压力1:DRAWLINE(S2,H,S1,H,1),COLORMAGENTA,LINETHICK1; ★支撑1:DRAWLINE(U2,L,U1,L,1),COLOR8FBC8F,LINETHICK1;★压力2:DRAWLINE(S3,H,S2,H,1),COLORFF8000;★支撑2:DRAWLINE(U3,L,U2,L,1),COLOR99CC32;★压力3:DRAWLINE(S4,H,S3,H,1),COLOR0000FF;★支撑3:DRAWLINE(U4,L,U3,L,1),COLOR00FF7F; DRAWICON(S2,H*1.01,10);DRAWICON(S3,H*1.01,10);DRAWNUMBER(S2,H*1.02,H),COLORCFB53B; DRAWNUMBER(S1,H*1.02,H),COLORCFB53B; DRAWNUMBER(S3,H*1.02,H),COLORCFB53B;DRAWICON(U1,L*0.99,11);DRAWICON(U2,L*0.99,11);DRAWICON(U3,L*0.99,11);DRAWICON(U4,L*0.99,11);DRAWNUMBER(U1,L*0.98,L),COLORCYAN;DRAWNUMBER(U2,L*0.98,L),COLORCYAN;DRAWNUMBER(U3,L*0.98,L),COLORCYAN;DRAWNUMBER(U4,L*0.98,L),COLORCYAN;。
通达信 画线公式
通达信画线公式
通达信画线公式是一种使用通达信炒股软件绘制股票趋势线的
方法,可以帮助投资者更好地了解股票市场的趋势。
下面是一个简单的通达信画线公式:
1. 长期趋势线:= 30 日移动平均线;
2. 中期趋势线:= 20 日移动平均线;
3. 短期趋势线:= 5 日移动平均线;
4. 股价上穿长期趋势线:=(Close >长期趋势线);
5. 股价下穿长期趋势线:=(Close <长期趋势线);
6. 股价上穿中期趋势线:=(Close >中期趋势线);
7. 股价下穿中期趋势线:=(Close <中期趋势线);
8. 股价上穿短期趋势线:=(Close >短期趋势线);
9. 股价下穿短期趋势线:=(Close <短期趋势线);
通过以上公式,投资者可以在通达信软件中使用趋势线画法功能,轻松绘制出股票的长期、中期和短期趋势线,从而更好地判断股票市场的趋势。
不过,这只是一个简单的通达信画线公式,投资者可以根据自己的需求和技巧,设计更加复杂的画线公式,更好地分析市场趋势。
通达信指标公式源码均线画线黄金分割指标
自动C:=INDEXC;自动H:=INDEXH;自动L:=INDEXL;自动O:=INDEXO;大盘低:=CONST(LLV(自动L,叠加行指));大盘高:=CONST(HHV(自动H,叠加行指));大盘差:=大盘高-大盘低;当前低:=CONST(LLV(L,叠加行指));当前高:=CONST(HHV(H,叠加行指));当前差:=当前高-当前低;比:=当前差/大盘差;大盘:当前低+(自动C-大盘低)*比,NODRAW; 变H:=当前低+(自动H-大盘低)*比;变L:=当前低+(自动L-大盘低)*比;变O:=当前低+(自动O-大盘低)*比;自动HYC:=HY_INDEXC;自动HYH:=HY_INDEXH;自动HYL:=HY_INDEXL;自动HYO:=HY_INDEXO;大盘低HY:=CONST(LLV(自动HYL,叠加行指)); 大盘高HY:=CONST(HHV(自动HYH,叠加行指)); 大盘差HY:=大盘高HY-大盘低HY;当前低HY:=CONST(LLV(L,叠加行指));当前高HY:=CONST(HHV(H,叠加行指));当前差HY:=当前高HY-当前低HY;比HY:=当前差HY/大盘差HY;行业:当前低HY+(自动HYC-大盘低HY)*比HY,NODRAW;变HYH:=当前低HY+(自动HYH-大盘低HY)*比HY;变HYL:=当前低HY+(自动HYL-大盘低HY)*比HY;变HYO:=当前低HY+(自动HYO-大盘低HY)*比HY;STICKLINE(CURRBARSCOUNT<=叠加行指,变H,变L,0,0),COLOR888888;STICKLINE(CURRBARSCOUNT<=叠加行指,变O,大盘,2,0),COLOR888888;STICKLINE(CURRBARSCOUNT<=叠加行指AND 大盘>=变O,变O,大盘,2,1),COLORAAAAAA; STICKLINE(CURRBARSCOUNT<=叠加行指,变HYH,变HYL,0,0),COLORYELLOW;STICKLINE(CURRBARSCOUNT<=叠加行指,变HYO,行业,2,0),COLORYELLOW;STICKLINE(CURRBARSCOUNT<=叠加行指AND 行业>=变HYO,变HYO,行业,2,1),COLORYELLOW; MA1:MA(CLOSE,M1)COLORWHITE;MA2:MA(CLOSE,M2)COLORYELLOW;MA3:MA(CLOSE,M3)COLORMAGENTA;MA4:MA(CLOSE,M4)COLORLIBLUE;MA5:MA(CLOSE,M5)COLORCYAN;昨天MA1:=REF(MA1,1);昨天MA2:=REF(MA2,1);昨天MA3:=REF(MA3,1);昨天MA4:=REF(MA4,1);昨天MA5:=REF(MA5,1);M1向上:=BARSLASTCOUNT(MA1>REF(MA1,1));M2向上:=BARSLASTCOUNT(MA2>REF(MA2,1));M3向上:=BARSLASTCOUNT(MA3>REF(MA3,1));M4向上:=BARSLASTCOUNT(MA4>REF(MA4,1));M5向上:=BARSLASTCOUNT(MA5>REF(MA5,1));SA:=MAX(MAX(MA1,MA2),MAX(MA3,MA4));SB:=MIN(MIN(MA1,MA2),MIN(MA3,MA4));JD1:=MAX(MAX(MA(C,M1),MA(C,M2)),MA(C,M3));JX1:=MIN(MIN(MA(C,M1),MA(C,M2)),MA(C,M3));多头N:=(昨天MA1>=昨天MA2 AND 昨天MA2>=昨天MA3 AND 昨天MA3>=昨天MA4 AND 昨天MA4>=昨天MA5);向上N:=(MA1>昨天MA1 AND MA2>昨天MA2 AND MA3>昨天MA3 AND MA4>昨天MA4 AND MA5>昨天MA5);多头:BARSLASTCOUNT(多头N>0)COLORWHITE,NODRAW;向上:BARSLASTCOUNT(向上N>0)COLORWHITE,NODRAW;五线顺上N:=多头>0 AND 向上>0;一阳三线:(JX1/JD1*100>98.5 AND C>JD1 AND O<JX1 AND REF(MA(C,M3),1)/MA(C,M3)<1 AND C>MA(C,M5))COLORLIRED,NODRAW;四线粘合:100*(SA-SB)/SB,COLORYELLOW,NODRAW;N线顺上:BARSLASTCOUNT(五线顺上N>0)COLORMAGENTA,NODRAW;DRAWTEXT(一阳三线=1,L,' 一阳'),COLORLIRED;显示:=黄金分割*1000-1000;DRAWRECTREL(显示, 1,1000,1,RGB(94,38,18));{顶} DRAWRECTREL(显示,189,1000,189,RGB(94,38,18));{八零九} DRAWRECTREL(显示,374,1000,374,RGB(94,38,18));{六一八} DRAWRECTREL(显示,495,1000,495,RGB(94,0,0));{半分位} DRAWRECTREL(显示,610,1000,610,RGB(94,38,18));{三八二} DRAWRECTREL(显示,807,1000,807,RGB(94,38,18));{一九一} DRAWRECTREL(显示,999,1000,1000,RGB(94,38,18));{底}{上轨趋势线}WA1:=(REF(H,上轨+1)=HHV(H,上轨+1+1))*趋势开关;WB1:=FILTER(WA1,上轨+1);WC1:=BACKSET(WB1,上轨+1+1); {高}WD1:=FILTER(WC1,上轨+1);{高点}WT0:=BACKSET(ISLASTBAR,BARSLAST(WC1)+1);WU0:=WT0>REF(WT0,1); {前高}WR1:=BACKSET(ISLASTBAR,BARSLAST(WD1)+1);WS1:=WR1>REF(WR1,1); {前一高}WR2:=BACKSET(WS1,REF(BARSLAST(WD1),1)+2);WS2:=WR2>REF(WR2,1); {前二高}WR3:=BACKSET(WS2,REF(BARSLAST(WD1),1)+2);WS3:=WR3>REF(WR3,1); {前三高}压力1:DRAWLINE(WS1,H,WC1,H,1)COLOR004000;压力2:DRAWLINE(WS2,H,WS1,H,1)COLOR004000;压力3:DRAWLINE(WS3,H,WS2,H,1)COLOR004000,LINETHICK2; 高:=REF(L,BARSLAST(WU0))COLOR808080,DOTLINE;高1:REF(H,BARSLAST(WS1))COLOR808080,DOTLINE;高2:REF(H,BARSLAST(WS2))COLOR808080,DOTLINE;高3:=REF(H,BARSLAST(WS3))COLOR808080,DOTLINE;{下轨趋势线}WA2:=(REF(L,下轨+1)=LLV(L,下轨+1+1))*趋势开关;WB2:=FILTER(WA2,下轨+1);WC2:=BACKSET(WB2,下轨+1+1);{低}WD2:=FILTER(WC2,下轨+1);{低点}WT:=BACKSET(ISLASTBAR,BARSLAST(WC2)+1);WU:=WT>REF(WT,1); {前低}WT1:=BACKSET(ISLASTBAR,BARSLAST(WD2)+1);WU1:=WT1>REF(WT1,1); {前一低}WT2:=BACKSET(WU1,REF(BARSLAST(WD2),1)+2);WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WD2),1)+3);WU3:=WT3>REF(WT3,1); {前三低}下轨3:DRAWLINE(WU1,L,WC2,L,1)COLORLIRED,LINETHICK2; 下轨2:DRAWLINE(WU2,L,WU1,L,1)COLOR0080FF,LINETHICK2;下轨1:DRAWLINE(WU3,L,WU2,L,1)COLOR0080FF,LINETHICK2;低:=REF(L,BARSLAST(WU))COLOR808080,DOTLINE;低1:REF(L,BARSLAST(WU1))COLOR808080,DOTLINE;低2:REF(L,BARSLAST(WU2))COLOR808080,DOTLINE;低3:=REF(L,BARSLAST(WU3))COLOR808080,DOTLINE;{上轨信号}向下:=BARSLASTCOUNT(高3>高2);向上K:=BARSLASTCOUNT(高3<高2);DRAWTEXT(向下=1,H,'向下'),COLORLIGREEN;DRAWTEXT(向上K=1,H,'向上'),COLORLIGREEN;下跌:=BARSLASTCOUNT(高3>高2 AND 高2>高1 AND 低2>低1);DRAWTEXT(下跌=1,H,'下跌'),COLORLIGREEN;回落:=BARSLASTCOUNT(高3<高2 AND 高2>高1 AND 低2>低1);DRAWTEXT(回落=1,H,'回落'),COLORLIGREEN;加速跌:=BARSLASTCOUNT(高3>高2 AND 高2>高1 AND 高1>高AND 压力1<压力2);{正轨信号}上升:=BARSLASTCOUNT(低2>低3);下降:=BARSLASTCOUNT(低2<低3);DRAWTEXT(上升=1,L,'上升'),COLORMAGENTA;DRAWTEXT(下降=1,L,'下降'),COLORGREEN;转强:=BARSLASTCOUNT(低2<低1);转弱:=BARSLASTCOUNT(低2>低1);DRAWTEXT(转强=1,L,'转强'),COLORMAGENTA;DRAWTEXT(转弱=1,L,'转弱'),COLORGREEN;KQW:=CONST(C);加速上:=BARSLASTCOUNT(低>低1);加速涨:BARSLAST(加速上=1 AND KQW>下轨3 AND 下轨3>下轨2 AND 下轨2>REF(下轨2,1) AND 高1<高2),COLORYELLOW,NODRAW;反弹:=BARSLASTCOUNT(低3>低2 AND 低2>低1 AND 低1<低);STICKLINE(CLOSE>=OPEN,CLOSE,HIGH,0,0), COLORRED;STICKLINE(CLOSE>=OPEN,OPEN,LOW,0,0), COLORRED;STICKLINE(CLOSE<OPEN,OPEN,HIGH,0,0), COLOR00EC00;STICKLINE(CLOSE<OPEN,CLOSE,LOW,0,0), COLOR00EC00;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2.9.2,0),COLOR0000A1;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.9.2,0),COLOR0000B5;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.9.8,0),COLOR0000C5;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.4,0),COLOR0000D4;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.2,0),COLOR0000FF;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,2.9.2,0),COLOR009000;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,1.9.2,0),COLOR00B400;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.9.8,0),COLOR00C100;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.4,0),COLOR00DB00;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.2,0),COLOR00EC00;涨停:=(CLOSE/REF(C,1)>=1.09)AND C=H;STICKLINE(涨停,L,H,0,0),COLORYELLOW;STICKLINE(涨停,CLOSE,OPEN,2.9.2,0),COLOR00AAFF;STICKLINE(涨停,CLOSE,OPEN,1.9.2,0),COLOR00CCFF;STICKLINE(涨停,CLOSE,OPEN,0.9.8,0),COLOR00FFFF;跌停:=(C/REF(C,1)<=0.91)AND C=L;STICKLINE(跌停,L,H,0,0),COLORGREEN;STICKLINE(跌停,CLOSE,OPEN,2.9.2,0),COLOR009000;STICKLINE(跌停,CLOSE,OPEN,1.9.2,0),COLOR00B400;STICKLINE(跌停,CLOSE,OPEN,0.9.8,0),COLOR00C100;DRAWTEXT(加速涨,L,'加速涨')COLORYELLOW;DRAWTEXT(反弹=1,L,'反弹'),COLORYELLOW;DRAWTEXT(加速跌=1,H,'加速跌'),COLORLIGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.160,0,'80.9%')COLOR0000F7; DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.345,0,'61.8%')COLOR0000F7; DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.465,0,' 50%')COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.580,0,'38.2%')COLOR0000F7; DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.780,0,'19.1%')COLOR0000F7;。
通达信公式教程大全(公式+指标+实例)
通达信公式教程大全(公式+指标+实例)本文介绍了通达信中常用的公式和指标,并给出了相应的实例说明。
希望能帮助读者更好地使用通达信软件。
一、公式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)动量指标用来测量股票价格的变动速度,可以判断价格的超买超卖情况。
通达信指标公式源码精准画线公式
N1:=20;N2:=10;N3:=5;AA:=REF(H,N1)=HHV(H,2*N1+1);QY:=BACKSET(AA,N1+1);CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),CO LOR0055FF,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COL ORYELLOW,POINTDOT,LINETHICK2;}AA1:=REF(L,N1)=LLV(L,2*N1+1);QY1:=BACKSET(AA1,N1+1);CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);{DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLOR0055FF,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COL ORYELLOW,POINTDOT,LINETHICK2;}LAA:=REF(H,N2)=HHV(H,2*N2+1);LQY:=BACKSET(LAA,N2+1);LCC:=FILTER(LQY,N2) AND H=HHV(H,N2+1);LDDD:=BARSLAST(LCC);LGDTS:=IF(LCC,CURRBARSCOUNT,0);LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);LDINGBU1:=REF(LDINGBU,LDDD+1);LGDCS1:=CONST(LDINGBUTS);LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);LGDCS2:=CONST(LDINGBUTS1);LDINGBU2:=REF(LDINGBU1,LDDD+1);LMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H,LGDCS2-1),1), COLOR0055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H,LGDCS1-1),1),C OLORYELLOW,POINTDOT;}LAA1:=REF(L,N2)=LLV(L,2*N2+1);LQY1:=BACKSET(LAA1,N2+1);LCC1:=FILTER(LQY1,N2) AND L=LLV(L,N2+1);LDD1:=BARSLAST(LCC1);LDDTS:=IF(LCC1,CURRBARSCOUNT,0);LYDB:=IF(LDD1,REF(L,LDD1),L);LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);LDDCS1:=CONST(LDDTS1);LZDB:=REF(LYDB,LDD1+1);LDDTS2:=REF(LDDTS1,DD1+1);LDDCS2:=CONST(LDDTS2);DDYL2:=DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDC S1,H,1) COLORWHITE;DDZC2:=DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDC S1,L,1) COLORWHITE;ZGSTAR:=(DDYL2+DDZC2)/2;ZGEND:=CONST((DDYL2+DDZC2)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);LLAA:=REF(H,N3)=HHV(H,2*N3+1);LLQY:=BACKSET(LLAA,N3+1);LLCC:=FILTER(LLQY,N3) AND H=HHV(H,N3+1);LLDDD:=BARSLAST(LLCC);LLGDTS:=IF(LLCC,CURRBARSCOUNT,0);LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{顶部}LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);LLDINGBU1:=REF(LLDINGBU,LLDDD+1);LLGDCS1:=CONST(LLDINGBUTS);LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);LLGDCS2:=CONST(LLDINGBUTS1);LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);LLMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF(H,LLGDCS2-1),1 ),COLOR0055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF(H,LLGDCS1-1),1) ,COLORYELLOW,POINTDOT;}LLAA1:=REF(L,N3)=LLV(L,2*N3+1);LLQY1:=BACKSET(LLAA1,N3+1);LLCC1:=FILTER(LLQY1,N3) AND L=LLV(L,N3+1);LLDD1:=BARSLAST(LCC1);LLDDTS:=IF(LLCC1,CURRBARSCOUNT,0);LLYDB:=IF(LLDD1,REF(L,LLDD1),L);LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);LLDDCS1:=CONST(LLDDTS1);LLZDB:=REF(LLYDB,LLDD1+1);LLDDTS2:=REF(LLDDTS1,DD1+1);LLDDCS2:=CONST(LLDDTS2);GDYL3:=DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLG DCS1,H,1) COLORYELLOW;DDZC3:=DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDD CS1,L,1) COLORYELLOW;LZGSTAR:=(GDYL3+DDZC3)/2;LZGEND:=CONST((GDYL3+DDZC3)/2);LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);GDYL1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1 ,H,1) COLORRED;DDZC1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1, L,1) COLORRED;长线压力:DDZC1+(GDYL1-DDZC1)*0.809,COLORRED;长线支撑:DDZC1+(GDYL1-DDZC1)*0.191,COLORRED;中线压力:DDZC2+(DDYL2-DDZC2)*0.809,COLORGREEN;中线支撑:DDZC2+(DDYL2-DDZC2)*0.191,COLORGREEN;短线压力:DDZC3+(GDYL3-DDZC3)*0.809,COLORBLUE;短线支撑:DDZC3+(GDYL3-DDZC3)*0.191,COLORBLUE;L中轨:DRAWLINE(CURRBARSCOUNT=LSTARDAY,LZGSTAR,ISLASTBAR,LZGEND,1 ),COLORYELLOW;中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORWHITE;长GDYL:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H, 1) COLORRED,POINTDOT;长DDZC:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L, 1) COLORRED,POINTDOT;中DDYL:DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1, H,1) COLORWHITE,POINTDOT;中DDZC:DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1, L,1) COLORWHITE,POINTDOT;短GDYL:DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS 1,H,1) COLORYELLOW,POINTDOT;短DDZC:DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS 1,L,1) COLORYELLOW,POINTDOT;。
通达信趋势画线标公式
通达信趋势画线标公式指标画波浪线用到了未来函数;波浪线红色为上涨、蓝色为下跌;趋势线红色主升阶段,蓝色为主跌;源码:M1:=5;M2:=10;M3:=20;M4:=60;DRAWGBK(C>0,RGB(0,10,10),RGB(88,0,0),0,'0',0);DRAWGBK(C>0,RGB(40,120,20),RGB(00,00,00),0,'0',1);DRAWGBK(C>0,RGB(80,100,120),RGB(00,00,00),0,'0',1);MA1:MA(CLOSE,M1);MA2:MA(CLOSE,M2);MA3:MA(CLOSE,M3);MA4:MA(CLOSE,M4);BM:=EMA(C,2);SM:=EMA(SLOPE(C,21)*20+C,42);BU:=CROSS(BM,SM);SEL:=CROSS(SM,BM);DRAWICON(BU,L-0.05,1);DRAWICON(SEL,H+0.03,2);STICKLINE(BM>=SM,LOW,HIGH,0,1),COLORRED;STICKLINE(BM>=SM,CLOSE,OPEN,3,1),COLORRED;STICKLINE(BM<SM,LOW,HIGH,0,1),COLORCYAN;STICKLINE(BM<SM,CLOSE,OPEN,3,1),COLORCYAN;{缠论}{五线顺上的拐点定位线,有未来函数}局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)),CIRCLEDOT,COLORYELLOW;DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED,LINETHICK3;DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORLICYAN,LINETHICK5;DD1:=BARSLAST(ABS(极点保留)!=1);DRAWICON(极点保留=1,局部极点,2);DRAWICON(极点保留=-1,局部极点,1);。
通达信最好自动画线主图指标公式
通达信最好自动画线主图指标公式A1:=REF(H,8)=HHV(H,2*8+1);B1:=FILTER(A1,8);C1:=BACKSET(B1,8+1);D1:=FILTER(C1,8);{高点}R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1); S11:=R11>REF(R11,1);DRAWLINE(D1,H,S11,H,1),COLORBLUE;A2:=REF(L,8)=LLV(L,2*8+1);B2:=FILTER(A2,8);C2:=BACKSET(B2,8+1);D2:=FILTER(C2,8);{低点}T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1); U11:=T11>REF(T11,1);DRAWLINE(D2,L,U11,L,1),COLORBLUE;M:=INTPART(3*8/5);A12:=REF(H,M)=HHV(H,2*M+1);B12:=FILTER(A12,M);C12:=BACKSET(B12,M+1);D12:=FILTER(C12,M);{高点}R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1); S112:=R112>REF(R112,1);DRAWLINE(D12,H,S112,H,1),COLORRED;A22:=REF(L,M)=LLV(L,2*M+1);B22:=FILTER(A22,M);C22:=BACKSET(B22,M+1);D22:=FILTER(C22,M);{低点}T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1); U112:=T112>REF(T112,1);DRAWLINE(D22,L,U112,L,1),COLORRED;VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);VAR2222:=CROSS(VAR1111,0.9);VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);VAR4444:=CROSS(VAR3333,0.9);压力:= REF(HIGH,BARSLAST(VAR2222));STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2222)),REF(HIGH ,BARSLAST(VAR2222)),0.5,1),COLOREA91B5,LINETHICK3;支撑:= REF(LOW,BARSLAST(VAR4444));STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4444)),REF(LOW, BARSLAST(VAR4444)),0.5,1),COLOR00B4FF,LINETHICK3;下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));{注意:下面这句有错,导入时压力2 三个字中间会多出一个空格,去掉就可以正常使用.}压力2:=IF(CROSS(D24,DDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24, DDD)))),COLORFFFFFF;压力位:=IF(ISLASTBAR,压力2,DRAWNULL);STICKLINE(ISLASTBAR ,压力位,压力位,120,0),LINETHICK4,COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;底部位:=IF(ISLASTBAR,底部,DRAWNULL);STICKLINE(ISLASTBAR ,底部位,底部位,100,0),LINETHICK4,COLOR00FF00;AA05:=MA(C,5),COLOR0099CC;五日乖离率:=(C-AA05)/AA05*100;BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;AA10:=MA(C,10);AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;AA30:=MA(C,30);三拾日乖离率:=(C-AA30)/AA30*100;VAR11:=(AA20-AA30)>REF((AA20-AA30),1)AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);VAR22:=(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) ANDAA30<REF(AA30,1);BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 ANDCROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 ANDAA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) ANDAA10>REF(AA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) ANDAA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1)ANDAA10<REF(AA10,1),10);DRAWICON(加仓 ,LOW*0.99,23);DRAWICON(清仓 ,HIGH*1.01,15);DRAWICON(强势狙击 ,LOW*0.99,13);TYP := (HIGH + LOW + CLOSE)/3;CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6));差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;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(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(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;短线:VAR1,COLORWHITE;中线:VAR6,COLORYELLOW;下跌:IF(VAR1=VAR6,VAR6, DRAWNULL),COLORGREEN;TJ1:= CCI1>差值4;立桩量:=FILTER(TJ1,0);TJ2:=IF(BARSLAST(立桩量)=1 ,1,IF(BARSLAST(立桩量)=2 ,1,IF(BARSLAST(立桩量)=3 ,1,0)));成立1:=TJ2;条件成立1:=FILTER(成立1,5);TJ11:= CCI1<-差值4 ;立桩量2:=FILTER(TJ11,0);TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(HIGH,1),1, IF(BARSLAST(立桩量2)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量2)=3 AND CLOSE>REF(HIGH,3),1,0)));成立2:=TJ22;条件成立2:=FILTER(成立2,5);TJ111:=(ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5))OR (VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1);立桩量3:=FILTER(TJ111,5);TJ222:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(HIGH,3),1,0)));突破3:=TJ222=1;STICKLINE(CLOSE AND 下跌!= VAR6,REF(HIGH,BARSLAST(立桩量3)),REF(HIGH,BARSLAST(立桩量3)),10,1),COLORCYAN;STICKLINE(CLOSE AND 下跌!= VAR6,REF(LOW,BARSLAST(立桩量3)),REF(LOW,BARSLAST(立桩量3)),10,1),COLORYELLOW;TJ3:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(LOW,3),1,0)));三天法则:=TJ3=1;成立:=三天法则 AND 突破3;条件成立:=FILTER(成立,5);TJ31:=(VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1);TJ32:=FILTER(TJ31,1);IF(条件成立AND 下跌!= VAR6 AND AA30>=REF(AA30,1),H*1.03,DRAWNULL),CROSSDOT,LINETHICK 6,COLORFF33FF;IF(条件成立AND 下跌!= VAR6 AND AA30>=REF(AA30,1),H*1.03,DRAWNULL),POINTDOT,LINETHICK 4,COLOR00CCFF;STICKLINE(C>=O,L,H,0,0),COLORRED;STICKLINE(C<O,L,H,0,0),COLORFFFF00;STICKLINE(C>O,C,O,3.2,0),COLORRED;STICKLINE(1,C,O,2.8,0),COLOR454500;STICKLINE(1,C,O,2,0),COLOR555500;STICKLINE(1,C,O,1.5,0),COLOR656500;STICKLINE(1,C,O,1,0),COLOR757500;STICKLINE(1,C,O,0.5,0),COLOR858500;STICKLINE(立桩量,C,O,2.8,0),COLOR000045;STICKLINE(立桩量,C,O,2.8,0),COLOR000065;STICKLINE(立桩量,C,O,2,0),COLOR000085;STICKLINE(立桩量,C,O,1.5,0),COLOR0000A5;STICKLINE(立桩量,C,O,1,0),COLOR0000C5;STICKLINE(立桩量,C,O,0.5,0),COLOR0000E5;DRAWICON(条件成立1,REF(HIGH,BARSLAST(立桩量3)),12);DRAWICON(条件成立2,REF(LOW,BARSLAST(立桩量3)),11);。
量学画线主图指标通达信公式(附图)
量学画线主图指标通达信公式(附图)均线数:=0;画线虚实:=1;显3121刻度:=0;显买卖点:=1;半分位:=(O+C)/2;峰边距:=5;回踩误差千分之:=2;画将1黄2元3全4:=2;精准计数周期:=240;低1开2收3高4:=1;基准点前N天:=0;昨半分位:=REF(半分位,1);STICKLINE(ISLASTBAR,昨半分位,昨半分位,10,0);DRAWTEXT(ISLASTBAR,昨半分位,' 昨半分位');{原文链接:/THREAD-4885579-1-1.HTML};X_1:=1991015;X_2:=TESTSKIP(DATE>X_1);STICKLINE(REF(LOW,1)>HIGH,HIGH,REF(LOW,1),5,0),COLOR GRAY;STICKLINE(REF(HIGH,1)<LOW,LOW,REF(HIGH,1),5,0),COLOR GRAY;DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.05,0,0,DYBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,GNBLOCK);DRAWTEXT_FIX(ISLASTBAR,0,0.045,0,FGBLOCK),COLORGREE N;X_3:=240;X_4:=CONST(HHV(REF(HIGH,1),X_3));X_5:=CONST(LLV(REF(LOW,1),X_3));X_6:=X_4-X_5;X_7:=LOW-X_6*0.03;X_8:=HIGH+X_6*0.03;X_9:=CLOSE>500;X_10:=MAX(CLOSE,OPEN);X_11:=MIN(CLOSE,OPEN);X_12:=基准点前N天;X_13:=画线虚实;X_14:=IF(X_9,HIGH,X_10);X_15:=IF(X_9,LOW,X_11);X_16:=IF(CLOSE>OPEN,IF(X_13=0,LOW,X_15),IF(X_13=0,HIG H,X_14));X_17:=回踩误差千分之/1000;X_18:=CURRBARSCOUNT;X_19:=精准计数周期;X_20:=X_18<=X_19;X_21:=IF(低1开2收3高4=1,LOW,IF(低1开2收3高4=2,OPEN,IF(低1开2收3高4=3,CLOSE,HIGH)));X_22:=IF(基准点前N天=0,X_21,REF(X_21,基准点前N天));WEN98编_基准价:IF(X_20,CONST(X_22),DRAWNULL),DOTLINE,COLORLIGRAY;X_23:=WEN98编_基准价;X_24:=X_23*X_17;X_25:=ABS(LOW-X_23)<=X_24;X_26:=ABS(OPEN-X_23)<=X_24;X_27:=ABS(CLOSE-X_23)<=X_24;X_28:=ABS(HIGH-X_23)<=X_24;X_29:=X_25 OR X_26 OR X_27 OR X_28 AND X_20 AND X_18!=基准点前N天+1;X_30:=COUNT(X_29,X_19);精准点个数:IF(X_30>0,X_30+1,0),NODRAW,COLORMAGENTA;X_31:=峰边距;X_32:=REF(HIGH,X_31)=HHV(HIGH,2*X_31+1);X_33:=FILTER(X_32,X_31);X_34:=BACKSET(X_33,X_31+1);X_35:=FILTER(X_34,X_31);X_36:=REF(HIGH,BARSLAST(X_35));X_37:=REF(MAX(CLOSE,OPEN),X_31)=HHV(MAX(CLOSE,OPE N),2*X_31+1);X_38:=FILTER(X_37,X_31);X_39:=BACKSET(X_38,X_31+1);X_40:=FILTER(X_39,X_31);X_41:=REF(MAX(CLOSE,OPEN),BARSLAST(X_40));X_42:=REF(LOW,X_31)=LLV(LOW,2*X_31+1);X_43:=FILTER(X_42,X_31);X_44:=BACKSET(X_43,X_31+1);X_45:=FILTER(X_44,X_31);X_46:=REF(LOW,BARSLAST(X_45));X_47:=REF(MIN(CLOSE,OPEN),X_31)=LLV(MIN(CLOSE,OPEN) ,2*X_31+1);X_48:=FILTER(X_47,X_31);X_49:=BACKSET(X_48,X_31+1);X_50:=FILTER(X_49,X_31);X_51:=REF(MIN(CLOSE,OPEN),BARSLAST(X_50));X_52:=IF(画线虚实=0,X_36,X_41);X_53:=IF(画线虚实=0,X_46,X_51);STICKLINE(X_52=REF(X_52,1) AND 峰边距>0,X_52,X_52,5,0),COLOR990099;STICKLINE(X_53=REF(X_53,1) AND 峰边距>0,X_53,X_53,5,0),COLOR009900;K中:(HIGH+LOW)/2,NODRAW,COLORYELLOW;X_54:=MA(CLOSE,5);MA5角度:ATAN((X_54/REF(X_54,1)-1)*100)*180/3.1416,NODRAW;X_55:=均线数;年线250:IF(X_55>=6 AND X_55<7,MA(CLOSE,250),DRAWNULL),COLORBLUE;趋势120:IF(X_55>=5 AND X_55<7,MA(CLOSE,120),DRAWNULL),COLORGRAY;决策60:IF(X_55>=4 AND X_55<7,MA(CLOSE,60),DRAWNULL),COLORGREEN;生命20:IF(X_55>=3 AND X_55<7,MA(CLOSE,20),DRAWNULL),COLORLIRED;IF(X_55>=3 AND 生命20>=REF(生命20,1),生命20,DRAWNULL),COLORLIMAGENTA;操盘10:IF(X_55>=2 AND X_55<7,MA(CLOSE,10),DRAWNULL),COLORBROWN;攻击5:IF(X_55>=1 AND X_55<7,MA(CLOSE,5),DRAWNULL),COLORWHITE;IF(攻击5>REF(攻击5,1),攻击5,DRAWNULL),COLORMAGENTA;IF(操盘10>REF(操盘10,1),操盘10,DRAWNULL),COLORYELLOW;X_56:=FILTER(CROSS(KDJ.J,0) OR CROSS(KDJ.J,10),3);DRAWICON(显买卖点=1 AND X_56 AND CLOSE>REF(CLOSE,1),X_7-X_6*0.03,1);DRAWICON(显买卖点=1 AND CROSS(RSI.RSI1,20),X_7,1);X_57:=REF(HHV(IF(X_13=1,X_10,HIGH),2),1);X_58:=FILTER(CLOSE>X_57,1);X_59:=REF(LLV(IF(X_13=1,X_11,LOW),2),1);X_60:=FILTER(CLOSE<X_59,1);X_61:=X_58 AND COUNT(X_58,BARSLAST(X_60))=1 AND 显买卖点=1;X_62:=X_60 AND COUNT(X_60,BARSLAST(X_58))=1 AND 显买卖点=1;STICKLINE(X_62,X_59,X_59,18,(-1)),COLORGREEN;DRAWICON(X_62,X_8,39);STICKLINE(X_61,X_57,X_57,18,(-1)),COLORMAGENTA;DRAWICON(X_61,X_7,38);X_63:=1.01;X_64:=IF(X_13=1,MIN(CLOSE,OPEN),LOW);X_65:=VOL=REFX(HHV(VOL,8),3);X_66:=X_65 AND BETWEEN(VOL/REF(VOL,1),1.01,5);X_67:=VOL>REF(VOL,1);X_68:=CLOSE/REF(CLOSE,1)>=1.03 OR CLOSE/OPEN>=1.03;X_69:=CLOSE>OPEN OR CLOSE>REF(CLOSE,1);X_70:=CLOSE>REF(MAX(CLOSE,OPEN),1);X_71:=X_68;X_72:=RANGE(VOL/REF(VOL,1),0.966,1.034) AND BARSCOUNT(VOL)>=2;X_73:=X_70 AND REFX(X_72 AND COUNT(CLOSE>OPEN,2)=2,1);X_74:=BETWEEN(VOL/REF(VOL,1),1.01,4.99) AND X_69;X_75:=X_67 AND X_70;X_76:=REFX(COUNT(VOL>=REF(VOL,1) AND X_69,2)=2,2);X_77:=REFX(COUNT(BETWEEN(CLOSE/REF(CLOSE,1),1.001,1.04),2)=2,2);X_78:=X_66 OR X_71 OR X_73 OR X_74 OR X_75 OR X_76 OR X_77;X_79:=FILTER(X_69 AND X_78,0);X_80:=LLV(CLOSE,3)>=REF(MIN(CLOSE,OPEN),3);X_81:=1*(X_79 AND REFX(X_80,3));X_82:=EMA(VOL,3)<=REF(VOL,3)*1.03;X_83:=(EMA(VOL,3)-REF(VOL,3))/REF(VOL,3)<=(EMA(CLOSE,3)-REF(CLOSE,3))/REF(CLOSE,3);X_84:=X_82 OR X_83;X_85:=REFX(MIN(EMA(CLOSE,3),CLOSE),3)>=CLOSE;X_86:=1*(X_81 AND REFX(X_84,3) AND X_85);X_87:=COUNT(VOL<=REF(VOL,1),3)=3;X_88:=COUNT(CLOSE>=REF(CLOSE,1),3)=3;X_89:=COUNT(CLOSE>OPEN,4)=4;X_90:=X_87 AND X_88 AND X_89;X_91:=REFX(X_90,3);X_92:=MIN(CLOSE,OPEN)>REF(MAX(CLOSE,OPEN),1);X_93:=1*(X_69 AND REFX(X_86,1) AND MAX(CLOSE,OPEN)<REFX(OPEN,1));X_94:=画将1黄2元3全4;X_95:=BARSLAST(X_81 AND REF(X_81=0,1));X_96:=REF(X_64,X_95);X_97:=X_94=1 OR X_94=4;STICKLINE(X_97,X_96,X_96,3,0),COLORWHITE;X_98:=BARSLAST(X_86 AND REF(X_86=0,1));X_99:=REF(X_64,X_98);X_100:=X_94=2 OR X_94=4 OR X_94=5;STICKLINE(X_100,X_99,X_99,3,0),COLORYELLOW;X_101:=REF(LLV(X_64,3),X_98-3);STICKLINE(X_94=5,X_101,X_101,21,(-1)),COLORYELLOW;X_102:=BARSLAST(X_93 AND REF(X_93=0,1));X_103:=REF(MAX(CLOSE,OPEN),X_102);X_104:=X_94=3 OR X_94=4;STICKLINE(X_104,X_103,X_103,3,0),COLORLIRED;X_105:=ABS(X_36-X_23)<=X_24;X_106:=ABS(X_41-X_23)<=X_24;X_107:=FILTER(X_105 OR X_106,480) AND X_20;X_108:=ABS(X_46-X_23)<=X_24;X_109:=ABS(X_51-X_23)<=X_24;X_110:=FILTER(X_108 OR X_109,480) AND X_20;X_111:=COUNT(X_110,X_19) AND COUNT(X_107,X_19) AND X_18=15;DRAWLINE(X_107 AND 峰边距>0,X_23,1,X_23,0),COLORLIRED;DRAWLINE(X_110 AND 峰边距>0,X_23,1,X_23,0),COLORGREEN;DRAWLINE(X_111 AND 峰边距>0,X_23,1,X_23,1),COLORMAGENTA;X_112:=ABS(X_99-X_23)<=X_24;X_113:=ABS(X_101-X_23)<=X_24;X_114:=ABS(X_103-X_23)<=X_24;X_115:=FILTER(X_112 OR X_113 OR X_114,480) AND X_20;DRAWLINE(X_115,X_23,1,X_23,0),COLORBROWN;X_116:=REF(CLOSE,1);X_117:=IF(CLOSE>=1,10000,100000);X_118:=1.1*X_116-49/X_117;X_119:=1.05*X_116-49/X_117;X_120:=0.9*X_116+51/X_117;X_121:=0.95*X_116+51/X_117;X_122:=NAMELIKE(1) OR NAMELIKE(2);X_123:=IF(X_122,CLOSE>=X_119,CLOSE>=X_118);X_124:=IF(X_122,CLOSE<=X_121,CLOSE<=X_120);X_125:=IF(X_122,HIGH>=X_119,HIGH>=X_118);X_126:=IF(X_122,LOW<=X_121,LOW<=X_120);X_127:=CLOSE>OPEN AND (CLOSE>=X_119 OR CLOSE>1.05*OPEN-51/X_117) OR (CLOSE>1000 AND CLOSE>X_116*1.024);X_128:=CLOSE<OPEN AND (CLOSE<=X_121 OR CLOSE<0.95*OPEN+49/X_117) OR (CLOSE>1000 AND CLOSE<X_116*0.976);X_129:=BARSLAST(FILTER(X_127,3));X_130:=REF(X_16,X_129);阳底:IF(显3121刻度=2 AND REF(X_127,X_129) AND X_130=REF(X_130,1),X_130,DRAWNULL),DOTLINE,COLORYELLO W;X_131:=BARSLAST(FILTER(X_128,3));X_132:=REF(X_16,X_131);阴顶:IF(显3121刻度=2 AND REF(X_128,X_131) AND X_132=REF(X_132,1),X_132,DRAWNULL),DOTLINE,COLORGREEN;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);STICKLINE(X_125,HIGH,MAX(CLOSE,OPEN),0,0),COLORMAG ENTA;STICKLINE(X_126,LOW,MIN(CLOSE,OPEN),0,0),COLORLICYA N;STICKLINE(X_127,OPEN,CLOSE,1,0),COLOR0000BB;STICKLINE(X_128,OPEN,CLOSE,1,0),COLORLIGREEN;STICKLINE(X_123,OPEN,CLOSE,1,0),COLORMAGENTA;STICKLINE(X_124,OPEN,CLOSE,1,0),COLORLICYAN;X_133:=CLOSE>OPEN AND CLOSE<X_116;STICKLINE(X_133,OPEN,CLOSE,0,0),COLORGREEN;X_134:=CLOSE<OPEN AND CLOSE>X_116;STICKLINE(X_134,OPEN,CLOSE,0,0),COLORRED;X_135:=AMOUNT/VOL/100;X_136:=CLOSE<OPEN AND X_135>REF(CLOSE,1) AND CLOSE<=X_116 AND X_135<=HIGH;STICKLINE(X_136,X_135,X_135,1,0),COLORRED;X_137:=PERIOD=5 AND NAMELIKE(10) AND (ABS(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>=0.025 OR ABS(CLOSE-OPEN)>=60);X_138:=X_14-(X_14-X_15)/3;X_139:=X_15+(X_14-X_15)/3;X_140:=X_15+(X_14-X_15)/2;X_141:=1+IF(X_9,2,4.92)/100;X_142:=X_14/X_15>=X_141 OR CLOSE/REF(CLOSE,1)>=X_141;X_143:=显3121刻度=1 AND X_142;C31:IF(X_143,X_138,DRAWNULL),POINTDOT,COLORWHITE;C21:IF(X_143,X_140,DRAWNULL),POINTDOT,COLORWHITE;C32:IF(X_143,X_139,DRAWNULL),POINTDOT,COLORWHITE;X_144:=1;X_145:=显3121刻度=2 AND X_142;STICKLINE(X_145,X_138,X_138,X_144,0),COLORYELLOW;STICKLINE(X_145,X_140,X_140,X_144,0),COLORYELLOW;STICKLINE(X_145,X_139,X_139,X_144,0),COLORYELLOW;DRAWICON(X_18=基准点前N天+1,X_7,1);STICKLINE(X_29,X_23,X_23,3,1),COLORYELLOW;STICKLINE(X_18=基准点前N天+1,X_23,X_23,3,1),COLORYELLOW;X_146:=IF(X_13=0,BARSLAST(X_35)>0,BARSLAST(X_40)>0) AND (ABS(LOW-X_52)<=X_52*X_17 OR ABS(X_11-X_52)<=X_52*X_17);X_147:=IF(X_13=0,BARSLAST(X_45)>0,BARSLAST(X_50)>0)AND (ABS(LOW-X_53)<=X_53*X_17 OR ABS(X_11-X_53)<=X_53*X_17);STICKLINE(X_146,X_52,X_52,1,1),COLORYELLOW;STICKLINE(X_147,X_53,X_53,1,1),COLORYELLOW;。
通达信指标公式源码自动画线主图指标公式
通达信自动画线主图指标公式自动化线的顶底两条线有未来,其他没有未来JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;VAR4:=(((HIGH + LOW) + CLOSE) / 3);VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR6:=(VAR5 + ((VAR5 * 6) / 100));春买:=R19,NODRAW,COLOR00DD00;秋离场:=R1A,NODRAW,COLOR2288EE;红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRA W;离场:=IF(红持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;进:=IF(阴观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;STICKLINE(ISLASTBAR AND (红持股OR REF(红持股,1)=1),今离场价,今离场价,20,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (阴观望OR REF(阴观望,1)=1),今进场价,今进场价,20,1),COLOR00FF00;XX2:EMA(EMA((CLOSE+LOW+HIGH)/3,3),23),COLORGREEN, LINETHICK2; XX3:=REF(XX2,1);IF(XX2>XX3,XX2,DRAWNULL),COLORRED, LINETHICK2;B11:=MA(CLOSE,1);B22:=SMA(SMA(SMA(B11,2,1),2,1),2,1) ;SMA2:=MA(B22,3) ;DRAWBAND(B22,RGB(255,0,0),SMA2,RGB(0,255,0));下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100); RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)) )),COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;STICKLINE(ISLASTBAR ,压力位,压力位,40,0),COLORFF00FF,LINETHICK2; STICKLINE(ISLASTBAR ,底部位,底部位,35,0),COLOR00FFFF,LINETHICK2;B1:=REF(CLOSE,1);B2:=REF(CLOSE,2);B3:=REF(CLOSE,3);B4:=REF(CLOSE,4);CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);持股:=(CLOSE=CMAX AND (B1>=B2 OR B1>=B3)) OR ((B1=CMAX AND(B2=CMIN OR B3=CMIN)) AND CLOSE>=B2) OR(B2=CMAX AND B3=CMIN AND CLOSE>=B1) OR (B3=CMAX AND CLOSE>=B1 AND CLOSE>=B2);STICKLINE(持股,B1,CLOSE,3,0),COLOR000099;变盘:=CLOSE=CMAX AND B1=CMIN;STICKLINE(变盘,B2,CLOSE,3,0),COLOR0099EF;下跌:=(CLOSE=CMIN AND (B1<B2 OR B1<B3)) OR ((B1=CMIN AND(B2=CMAX OR B3=CMAX)) AND CLOSE<B2) OR(B2=CMIN AND B3=CMAX AND CLOSE<B1) OR (B3=CMIN AND CLOSE<B1 AND CLOSE<B2);STICKLINE(下跌,B1,CLOSE,3,0),COLOR009900;STICKLINE(B1=CMAX AND CLOSE=CMIN,B2,CLOSE,3,0),COLOR009900;买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);STICKLINE(买入,B1,B2,3,0),COLOR00FFFF;抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);STICKLINE(抛售,B1,B2,3,0),COLORFFFFFF;STICKLINE(C>=O,L,H,0,1),COLORRED;STICKLINE(C<O,H,L,0,1),COLORGREEN;STICKLINE(持股OR 买入,O,C,1.5,0),COLORRED;STICKLINE(下跌OR 抛售,O,C,1.5,0),COLORGREEN;STICKLINE(C>0,O,C,0,0),COLORFFFFFF;MMA:=CONST(HHV(H,90));MMB:=CONST(LLV(L,90));WN:=3;{原码N:=3;}WA1:=REF(H,WN)=HHV(H,2*WN+1); WB1:=FILTER(WA1,WN);WC1:=BACKSET(WB1,WN+1); WD1:=FILTER(WC1,WN);{高点}WA2:=REF(L,WN)=LLV(L,2*WN+1); WB2:=FILTER(WA2,WN);WC2:=BACKSET(WB2,WN+1); WD2:=FILTER(WC2,WN);{低点}WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;WE2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR ISLASTBAR OR BARSCOUNT(C)=1;WL1:=(WD2 AND NOT(WD1 AND WE1<WE2)); WH2:=WD1 AND NOT(WD2AND WE1>=WE2);WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 ANDCOUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));WG1:=WF1>REF(WF1,1); WI1:=BACKSET(WG1,2);WLD:=WI1>REF(WI1,1);{过滤后低点}WL2:=WLD OR ISLASTBAR OR BARSCOUNT(C)=1;WX2:=REF(BARSLAST(WL2),1)+1; WF2:=BACKSET(WL2 ANDCOUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));WG2:=WF2>REF(WF2,1); WI2:=BACKSET(WG2,2);WHD:=WI2>REF(WI2,1);{过滤后高点}WR1:=BACKSET(ISLASTBAR,BARSLAST(WHD)+1); WS1:=WR1>REF(WR1,1); {前一高}WT1:=BACKSET(ISLASTBAR,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1); {前一低}WR2:=BACKSET(WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1); {前二高}WT2:=BACKSET(WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1); {前三低}WT4:=BACKSET(WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1); {前四低}WR3:=BACKSET(WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1); {前三高}WR4:=BACKSET(WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1); {前四高};压力1:=DRAWLINE(WS2,H,WS1,H,1),COLOR008888; {★压力1:}支撑1:=DRAWLINE(WU2,L,WU1,L,1),COLOR008888;{★支撑1:}压力2:=DRAWLINE(WS3,H,WS2,H,1),COLOR888000; {★压力2:}支撑2:=DRAWLINE(WU3,L,WU2,L,1),COLOR888000;{★支撑2:}压力3:=DRAWLINE(WS4,H,WS3,H,1),COLOR0000CC;{★压力3:}支撑3:=DRAWLINE(WU4,L,WU3,L,1),COLOR0000CC;{★支撑3:};BSC:=CONST(MAX(BARSLAST(WS4),BARSLAST(WU4))*3),NODRAW;IF(BETWEEN(压力1,MMA,MMB),压力1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(支撑1,MMA,MMB),支撑1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(压力2,MMA,MMB),压力2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(支撑2,MMA,MMB),支撑2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(压力3,MMA,MMB),压力3,DRAWNULL),COLOR0000CC,LINETHICK1;IF(BETWEEN(支撑3,MMA,MMB),支撑3,DRAWNULL),COLOR0000CC,LINETHICK1;底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) OR CROSS(HIGH,底),L,'---铁底'),COLOR00FF00;X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;X2:=EMA(X1,10);X3:=REF(X2,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);X6:=REF(CLOSE,1);X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;X8:=CROSS(79,X7);X9:=FILTER(X8,4);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T; VARA:=IF(CLOSE>1000,VAR8T,VAR9T);起步:=VAR3T AND VAR4T;逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(XL2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1); DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X2>X3,LOW,'←反弹'),COLOR0000FF;DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4)) *4*25,87.5) AND VAR1T<40,87,0) AND X2>X3,LOW,'←短买'),COLOR0000AA; DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2 +HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE* 2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X2>X3,LOW,'←加仓'),COLORFF5ED8;DRAWTEXT(CROSS(X4,X5),HIGH+C*0.01,'←减'),COLORB4FF00; DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9 ,5),HIGH+C*0.02,'←跑'),COLORBCFF8B;STICKLINE(起步>0,HIGH,LOW,0.8,0),COLOR00FFFF;STICKLINE(起步>0,OPEN,CLOSE,5,0),COLOR00FFFF;DRAWTEXT(逃遁>0,HIGH,'●←逃'),COLOR7FFFD6;X1P:=(C+L+H)/3;BB13:=ATAN(EMA(X1P,13)-REF(EMA(X1P,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 ANDEMA(X1P,13)>REF(EMA(X1P,8),1),10),EMA8,'∠45上升'),COLORWHITE; VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);DRAWTEXT(FILTER((VAR4AA>90),45),(LOW),'★大胆搏'),COLOR00FFFF;L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; L24:=(HIGH+LOW+CLOSE)/3;L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));L27:=IF(L25>=150 AND L25<200 AND L26>=150 AND L26<200,10,0);L28:=IF(L25<=-150 AND L25>-200 AND L26<=-150 AND L26>-200,-10,L27); L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);L30:=IF(L29<90,L29,100);L31:=IF(L23>0,L23,0);XL11:=(IF(L28>=200 AND L25>=150,15,IF(L26<=-200 ANDL25<=-150,-15,L28)))+60;XL22:=L31>48 AND XL11>60 AND L30<100;DRAWTEXT(XL22 AND COUNT(XL22,30)=1,L,'大笔买入'),COLORFF00FF; VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))* 100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42)) *100,20,1),15,1);VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1),15,1);VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) ANDCLOSE>REF(CLOSE,1);DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;DRAWTEXT_FIX(1,0,0,0,'市盈率:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.08,0,0,CONST(DYNAINFO(39))),COLORYELLOW; DRAWTEXT_FIX(1,0.16,0,0,'每股收益(元):'),COLOR0080FF; DRAWNUMBER_FIX(1,0.29,0,0,CONST(FINANCE(33))),COLOR0080FF; DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.46,0,0,CONST(WINNER(C )*100)),COLORYELLOW; DRAWTEXT_FIX(1,0,0.05,0,'总股本(万股):'),COLORMAGENTA; DRAWNUMBER_FIX(1,0.13,0.05,0,CONST(FINANCE(1)/10000)),COLORMAGE NTA;DRAWTEXT_FIX(1,0,0.1,0,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.1,0.1,0,HYBLOCK),COLOR0080FF;DRAWTEXT_FIX(1,0.21,0.1,0,DYBLOCK),COLOR0080FF;{量能饱和}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);DRAWTEXT_FIX(1,0.35,0.9,0,'量能饱和度:')COLOR00FFFF; DRAWNUMBER_FIX(1,0.48,0.9,0,CONST(SAT)),COLORYELLOW;。
通达信今天量向前画横线指标公式
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PE RIOD=5,240,1)))));MTIME:=MOD(FROMOPEN,TOTAL);CTIME:=IF(MTIME<0.5,TOTAL,MTIME);V VOL :=IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW;STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 ||SETCODE=1),VVOL,0,-1,-1),COLOR00C0C0;AT:=IF(CAPITAL=0,AMOUNT/100000000,(VOL)/CAPITAL*100);ATM1:=EMA(AT,5);ATM2:=MA(AT,13);阶段 地量 :=AT<REF(LLV(AT,25),1) && ATM1<ATM2;XX:=BARSLAST(阶段地量);II:=DRAWLINE(阶段地量,VOL*5,ISLASTBAR,REF(VOL*5,XX),1);成交量 :VOL,VOLSTICK;五倍地量:IF(CROSS(COUNT(CROSS(VOL>REF(VOL*5,XX),0.5),XX)=1,0.5),V,0),N ODRAW;STICKLINE(阶段地量,V*(3/10),V*(6/10),1.38,1),COLOR009900;STICKLINE(阶段地量,V*(3/10),V*(6/10),0.15,0),COLOR00FF00;五倍地量线:DRAWLINE(五倍地量,II,REF(五倍地量,1),REF(II,1),1),COLORGREEN; 倍量 :=V>REF(V,1)*2;N:=BARSLAST(倍量);常数:=CONST(IF(N=0,V,REF(V,N)));GG:=C>O;STICKLINE((倍量 AND GG) OR (C>REF(C,1) AND C=O AND倍量),0,V,0,0),COLORGREEN;阴线:=C<O;STICKLINE((倍量 AND 阴线) OR (C<REF(C,1) AND C=O AND倍量),0,V,0,0),COLORRED;STICKLINE(CROSS(COUNT(CROSS(VOL>REF(VOL*5,XX),0.5),XX)=1,0.5),V*(3/10),V*(6/10),1,0),COLORYELLOW;备注:=REFX(CROSS(常数,V),1);最后倍量:IF(IF(倍量,V,0)=REFX(REF(V,BARSLAST(倍量)),BARSNEXT(ISLASTBAR )),1,0),NODRAW;TT:=BARSLAST(备注);TS:=IF(ISLASTBAR AND 最后倍量,REF(TT,1)+1,TT);条件:=IF(备注,V,0)=REFX(REF(V,TS),BARSNEXT(倍量));天:=BARSLAST(条件);倍量横线:IF(天<=REFX(REF(BARSNEXT(最后倍量),天),最后倍量),DRAWLINE(条件,常数,ISLASTBAR,常数,1),DRAWNULL),COLORYELLOW,DOTLINE ;天数:IF(ISLASTBAR AND最后倍量=1,REF(天,1)+1,IF(倍量横线,天,DRAWNULL)),COLORRED,NODRAW;DRAWNUMBER(最后倍量=1,V,天数);。
通达信三角形画线指标公式
通达信三角形画线指标公式
在通达信中,绘制三角形指标公式需要使用到通达信的绘图函数。
以下是一个基本的三角形指标公式的示例:
```
A1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,1)+1);
A2:=A1REF(A1,1);
B1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,2)+1);
B2:=B1REF(B1,1);
C1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,3)+1);
C2:=C1REF(C1,1);
DRAWLINE(A2,COLORRED);
DRAWLINE(B2,COLORGREEN);
DRAWLINE(C2,COLORBLUE);
```
以上公式将绘制一个由三条线段组成的三角形。
`BACKSET`函数用于获取最后一个交易日的指标值,`PEAKBARS`函数用于获取指定数量交易日内的峰
值位置,`REF`函数用于获取指定日期的指标值。
`ISLASTBAR`函数用于判断是否为最后一个交易日。
具体绘制三角形的公式应根据实际需求进行修改和调整,比如可以根据收盘价、最高价、最低价等数据计算出三角形的三个顶点位置,然后使用
`DRAWLINE`函数绘制出对应的线段。
通达信技术指标公式用于绘制技术指标线
通达信技术指标公式用于绘制技术指标线技术指标公式用于绘制技术指标线。
以KDJ指标为例,右键点击KDJ,选择“编辑公式”后打开公式算法编辑器,显示出KDJ指标公式的内容。
参数名称:最小值,最大值,缺省值N: 1 10O 9M1: 2 40 3M2: 2 40 3RSV:=(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该公式绘制K、D、J两条指标线。
RSV行是一个中间语句,计算当期收盘价与N天内最低价之差除以N内最高价与最低价之差的比值,再乘以系数100。
K线为RSV的M1天移动平均线,D线为线K的M2天移动平均线,J线为K线与J线的差值。
(以下是引用‘wjwjc’版主对计算‘5日均线上升角度’的实例讲解aa:=ma(c,5);{这是5日均线}bb:=ref(ma(c,5),1);{这是昨日5日均线}cc:(aa-bb)/bb>n/100;{这是5日均线增长比率,比率越大,其上长的斜率就越大}n是参数,n%是5日均线的增长比率,因此n定5以上可能其的斜率就越大,你可试试。
) (对于时间限制的问题,我们就以‘庄家进出’公式来作分析了解。
Var1:=IF(YEAR>=2034 AND MONTH>=1,0,1);{VAR1赋值:如果年份>=2034 AND 月份>=1,返回0,否则返回1} {点评:这个语句在配合其它语句使用的情况下可起到时间限制作用}VarC:=MA(SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE昨收,返回成交量(手),否则返回(如果收盘价<昨收,返回0-成交量(手),否则返回0)的历史累和/25000的2日简单移动平均*VAR1}{点评:在这句用到了VAR1,当VAR1符合条件即:年份>=2034 和月份>=1时,则VAR1=0,这样以后计算出来的结果全是0,这时该指标便毫无意义了,起到了时间限制的作用。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
通达信画线指标公式
通达信是一种常用的股票交易软件,它支持自定义指标和画线指标。
以下是一些通达信中常用的画线指标公式示例:
移动平均线(MA): MA(CLOSE, N):计算收盘价CLOSE的N日简单移动平均线。
指数移动平均线(EMA): EMA(CLOSE, N):计算收盘价CLOSE 的N日指数移动平均线。
BOLL指标: BOLL(CLOSE, N, P):计算收盘价CLOSE的N日布林带指标,P为标准差倍数。
MACD指标: DIF: EMA(CLOSE, SHORT) - EMA(CLOSE, LONG) DEA: EMA(DIF, MID) MACD: (DIF - DEA) * 2
KDJ指标: RSV: (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
这些公式只是通达信中常用的画线指标公式示例,实际上通达信支持更多的指标公式和定制化功能。
如果你有特定的指标需求,可以根据自己的需求进行进一步的研究和开发。
需要注意的是,通达信软件使用一种特定的编程语言来编写自定义指标公式,称为通达信公式语言(TDX Formula)。
如果你想要进一步学习和开发通达信指标,可以查阅相关的编程手册和文档。