【股票指标公式下载】-【通达信】简单画线(总趋势、慢线、快线、高点压力)

合集下载

通达信自编波段高点自动划线公式(主图)

通达信自编波段高点自动划线公式(主图)

通达信自编波段高点自动划线公式(主图){高低点定自动连线}N:=10;M:=9;X1:=DRAW LINE (HIGH=HHV(HIGH,N),HIGH,LOW=LLV(LOW,M),LOW,0);X2:=DRAWLINE(LOW=LLV(LOW,M),LOW,HIGH=HHV(HIGH, N),HIGH,0);YDD1:=LOW=LLV(LOW,M) AND X1=X2;DDTS:=BARSLAST(YDD1);YGD1:=HIGH=HHV(HIGH,N) AND X1=X2;GDTS:=BARSLAST(YGD1);QDDD:=LOW=LLV(LOW,M) AND LOW=LLV(LOW,GDTS) AN D GDTS>1;QDGD:=HIGH=HHV(HIGH,N) AND HIGH=HHV(HIGH,DDTS) AND DDTS>1;X3:=DRAWLINE(QDGD,HIGH,QDDD,LOW,0),CO LORL IGRAY,LINETHICK3;X4:=DRAWLINE(QDDD,LOW,QDGD,HIGH,0),COLORLIGRAY,LI NETHICK3;YGD:=HIGH=HHV(HIGH,N) AND X3=X4;YDD:=LOW=LLV(LOW,M) AND X3=X4;{DRAW ICON (YGD,H,23);}{根据相邻阶段高点之间的涨跌差值确定目标高点:大于前高5或小于前高5个点取高点}M1:=5;M2:=3;{涨跌差值};预前高值:=IF(YGD=1,REF(H,REF(BARSLAST(YGD),1)+1),REF(H,BARSLAS T(YGD))),NODRAW;{返回上次高点的值}预下高TS:=REFX(BARSNEXT(YGD),1)+1;预下高值:=REFX(H,REFX(BARSNEXT(YGD),1)+1);下预下高TS:=REFX(预下高TS,预下高TS)=DRAWNULL;XH0:=(YGD AND H>预前高值 AND (H-预前高值)/预前高值*100>=M1 AND 预下高TS=DRAWNULL);XH1:=(YGD AND H>预前高值 AND 预下高值>0 AND 下预下高TS=1)OR(YGD AND H0 AND 下预下高TS=1);XH2:=(YGD AND H>预前高值 AND H>预下高值);XH3:=(YGD AND H>预前高值 AND H=M1);XH4:=YGD AND H预下高值 AND (1-H/预前高值)*100>=M2;XH5:=YGD AND H=M2{ AND(预下高值-H)/H*100>=M1};GD:=XH0 OR XH1 OR XH2 OR XH3 OR XH4 OR XH5;{本次高点,高点值,本次高点周期内到最后交易日天数}BCGDTS:=BARSLAST(GD);{返回本次高点到当前天数}BCGDDZHTS:=IF(GD,CURRBARSCOUNT,0);{本次高点到最后交易日天数}高点值:=IF(BCGDTS,REF(H,BCGDTS),H);{本次高点值}TS:=IF(BCGDTS,REF(BCGDDZHTS,BCGDTS),BCGDDZHTS);{本次高点周期内到最后交易日天数等于本次高点到最后交易日天数} GDCL:=CONST(TS);{取本次高点到最后交易日天数的最后一个值为常量}{类推上一次高点,高点值,本次高点周期内到最后交易日天数}高点值1:=REF(高点值,BCGDTS+1);{上一高点值}TS1:=REF(TS,BCGDTS+1);{上一高点期间到最后交易日的天数} GDCL1:=CONST(TS1);{类推上上一次高点,高点值,本次高点周期内到最后交易日天数}高点值2:=REF(高点值1,BCGDTS+1);{上上一高点值}TS2:=REF(TS1,BCGDTS+1);{上一高点期间到最后交易日的天数} GDCL2:=CONST(TS2);{类推上N高点,高点值,本次高点周期内到最后交易日天数}高点值3:=REF(高点值2,BCGDTS+1);TS3:=REF(TS2,BCGDTS+1);GDCL3:=CONST(TS3);高点值4:=REF(高点值3,BCGDTS+1);TS4:=REF(TS3,BCGDTS+1);GDCL4:=CONST(TS4);高点值5:=REF(高点值4,BCGDTS+1);TS5:=REF(TS4,BCGDTS+1);GDCL5:=CONST(TS5);高点值6:=REF(高点值5,BCGDTS+1);TS6:=REF(TS5,BCGDTS+1);GDCL6:=CONST(TS6);高点值7:=REF(高点值6,BCGDTS+1);TS7:=REF(TS6,BCGDTS+1);GDCL7:=CONST(TS7);高点值8:=REF(高点值7,BCGDTS+1);TS8:=REF(TS7,BCGDTS+1);GDCL8:=CONST(TS8);压力:DRAWLINE(CURRBARSCOUNT=GDCL,H,ISLA STBA R,REF(H,GDCL-1),1),COLORGREEN,LINETHICK2;压力1:DRAWLINE(CURRBARSCOUNT=GDCL1,H,ISLASTBAR,REF(H,GDCL1-1),1),COLORM AGEN TA,LINETHICK2;压力2:DRAWLINE(CURRBARSCOUNT=GDCL2,H,ISLASTBAR,REF(H,GD CL2-1),1),COLORYELLOW,LINETHICK2;压力3:DRAWLINE(CURRBARSCOUNT=GDCL3,H,ISLASTBAR,REF(H,GD CL3-1),1),COLORWHITE,LINETHICK2;{压力4:DRAWLINE(CURRBARSCOUNT=GDCL4,H,ISLASTBAR,REF(H,GD CL4-1),1),COLORBROWN,LINETHICK2;压力5:DRAWLINE(CURRBARSCOUNT=GDCL5,H,ISLASTBAR,REF(H,GD CL5-1),1),COLORGRAY,LINETHICK2;压力6:DRAWLINE(CURRBARSCOUNT=GDCL6,H,ISLASTBAR,REF(H,GD CL6-1),1),COLORBROWN,LINETHICK2;压力7:DRAWLINE(CURRBARSCOUNT=GDCL7,H,ISLASTBAR,REF(H,GD CL7-1),1),COLORYELLOW,LINETHICK2;压力8:DRAWLINE(CURRBARSCOUNT=GDCL8,H,ISLASTBAR,REF(H,GD CL8-1),1),COLORYELLOW,LINETHICK2;};。

通达信画线指标公式

通达信画线指标公式

通达信画线指标公式
通达信是一种常用的股票交易软件,它支持自定义指标和画线指标。

以下是一些通达信中常用的画线指标公式示例:
移动平均线(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)。

如果你想要进一步学习和开发通达信指标,可以查阅相关的编程手册和文档。

【股票指标公式下载】-【通达信】新思路(趋势线、行情线、加码跟进)

【股票指标公式下载】-【通达信】新思路(趋势线、行情线、加码跟进)

【通达信】新思路〔趋势线、行情线、加码跟进〕-指标公式源码VARA:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 - 100));趋势线:EMA(((VARA/10)+EMA(CLOSE,10)),3),COLORFFFF00,LINETHICK2; VARB:=(OPEN+HIGH+LOW)/3;VARC:=EMA(VARB,4);行情线:VARC,COLORYELLOW;STICKLINE(行情线<趋势线,H,L,1,1),COLORGREEN;STICKLINE(行情线<趋势线,C,O,6,1),COLORGREEN;STICKLINE(行情线>=趋势线,C,O,6,1),COLORRED;BUYA:=IF(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),1,0);STICKLINE(行情线>=趋势线,H,L,1,1),COLORRED;STICKLINE(行情线>=趋势线,OPEN,CLOSE,4.5,0),COLOR000099;STICKLINE(行情线>=趋势线,OPEN,CLOSE,3,0),COLOR0000BB;STICKLINE(行情线>=趋势线,OPEN,CLOSE,2,0),COLOR0000FF;STICKLINE(行情线<趋势线,H,L,1,1),COLOR00FF00;STICKLINE(行情线<趋势线,OPEN,CLOSE,4.5,0),COLOR009900;STICKLINE(行情线<趋势线,OPEN,CLOSE,3,0),COLOR00BB00;STICKLINE(行情线<趋势线,OPEN,CLOSE,2,0),COLOR00FF00;{买入显示}DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.98,'▲'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.975,'∣'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.975,'‖'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.97,'∣'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.97,'‖'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.965,'∣'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.965,'‖'),COLOR0000FF;{买出显示}DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.02,'▼'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.025,'∣'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.025,'‖'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.03,'∣'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.03,'‖'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.035,'∣'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.035,'‖'),COLOR00FF00;FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);FA:=IF(CROSS(FF,MA15),1,0);{加码跟进}TR:=MAX(MAX((HIGH - LOW),ABS(REF(CLOSE,1) - HIGH)),ABS(REF(CLOSE,1) - LOW));ATR:=MA(TR,14);AA:=(HHV(HIGH,20) - (2 * ATR));BB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));SSS:=CROSS(MIN(MA(CLOSE,13),AA),CLOSE);BBB:=BARSLAST(BB);SSSB:=BARSLAST(SSS);B1:=((BBB = 0) AND (REF(SSSB,1) < REF(BBB,1)));B1B:=BARSLAST(B1);B2:=((((BB = 1) AND (B1B < SSSB)) AND (B1B > 0)) AND (COUNT(BB,SSSB) < 3));B2B:=BARSLAST(B2);B3:=((((BB = 1) AND (B2B < B1B)) AND (COUNT(BB,SSSB) < 4)) AND (COUNT(BB,SSSB) > 2));DRAWTEXT((B1=1 AND 行情线>=趋势线 AND BUYA=0) OR (B2=1 AND 行情线>=趋势线 AND BUYA=0),LOW*0.98,'加仓'),COLORFF00FF;A:=(3*CLOSE+LOW+OPEN+HIGH)/6;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+ 14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A, 11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A, 18)+REF(A,20))/210;Y:=EMA(X,13);加仓A:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;DRAWTEXT(FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,Y)) AND 行情线>=趋势线AND BUYA=0 AND FA=0,3),LOW*0.98,'加仓'),COLORFF00FF;加仓:=(B1=1 AND 行情线>=趋势线 AND BUYA=0) OR (B2=1 AND 行情线>=趋势线AND BUYA=0) OR FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,Y)) AND 行情线>=趋势线 AND BUYA=0 AND FA=0,3);STICKLINE(加仓,H,L,1,1),COLORFF00FF;{STICKLINE(加仓,C,O,6,1),COLORFF00FF;}STICKLINE(加仓,OPEN,CLOSE,4.5,0),COLOR660099;STICKLINE(加仓,OPEN,CLOSE,3,0),COLOR6600CC;STICKLINE(加仓,OPEN,CLOSE,2,0),COLORFF00FF;{减仓}VARJ1:=REF(CLOSE,1);VARJ2:=((SMA(MAX(CLOSE-VARJ1,0),6,1))/(SMA(ABS(CLOSE-VARJ1),6,1)))*(1 00);减仓A:=CROSS(85,VARJ2);DRAWTEXT(减仓A AND 行情线>=趋势线,HIGH*1.03,'减仓'),COLORYELLOW; MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);DY:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX); LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;减仓B:=FILTER(CROSS(84,RSI) OR DY,5);{下穿84}DRAWTEXT(减仓B AND 行情线>=趋势线,H*1.03,'减仓'),COLORYELLOW;减仓:=减仓A OR 减仓B;STICKLINE(减仓,H,L,1,1),COLORYELLOW;{STICKLINE(减仓,C,O,6,1),COLORYELLOW;}STICKLINE(减仓,OPEN,CLOSE,4.5,0),COLOR00CCCC;STICKLINE(减仓,OPEN,CLOSE,3,0),COLOR33FFCC;STICKLINE(减仓,OPEN,CLOSE,2,0),COLOR00FFFF;{一阳穿三线}BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;上:=BBI+3*STD(BBI,10);中:=BBI;下:=BBI-3*STD(BBI,10);优选:=BETWEEN(上,OPEN,CLOSE) AND BETWEEN(中,OPEN,CLOSE) AND BETWEEN(下,OPEN,CLOSE) AND CLOSE>OPEN AND 上>=REF(上,1) AND中>=REF(中,1) AND 下>REF(下,1);DRAWTEXT(FILTER(优选,2),LOW*0.95,'优选'),COLOR00FF00;{底背离}DRAWTEXT(FA AND BUYA=0,(LOW * 0.98),'底背离'),COLOR0099FF;{波浪顶底}TY:=C;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10); LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10); A2:=REF(C,BARSLAST(HD));B2A:=REF(C,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);顶:IF(T1,A2,A2),COLOR00FF00,POINTDOT,LINETHICK2;STICKLINE(T1,A2,A2,9,0),COLOR00FF00;底:IF(T2,B2A,B2A),COLORFF00FF,POINTDOT,LINETHICK2;STICKLINE(T2,B2A,B2A,9,0),COLORFF00FF;{多空线}VAR2:=(C+L+O+H)/4;多头线:=(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2 ,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*RE F(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13 )+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(V AR2,18)+REF(VAR2,20))/210;空头线:=EMA(多头线,4);STICKLINE(多头线>空头线,多头线,空头线,4,10),COLORYELLOW;STICKLINE(多头线<空头线,多头线,空头线,4,10),COLORCCCCCC;{DRAWLINE(C=HHV(C,60),HHV(H,3),C=HHV(C,30) ANDC<HHV(C,45),HHV(HIGH,3),1),COLORYELLOW;};【通达信】新思路〔趋势线、行情线、加码跟进〕-指标公式效果图 (文档来源:假设水财经社区)。

【股票指标公式下载】-【通达信】超准分时(底线、高线、黄色起动线、拉升)

【股票指标公式下载】-【通达信】超准分时(底线、高线、黄色起动线、拉升)

【通达信】超准分时(底线、高线、黄色起动线、拉升)-指标公式源码(DATE<=1150530,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU))) /SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95);VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU))),(SUM(A MOUNT,BARSCOUNT((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),60),COLORMAGENTA,LINETHICK2;绿色散户线:EXPMA((DCLOSE/VBNH),120),COLORGREEN,LINETHICK2; DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/VBNH),120)),EXPM A((DCLOSE/VBNH),60)*1,1);DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),EXPMA((DCLOSE/VBNH),60)),EXPM A((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.02),1.02,'拉升'),COLORWHITE; 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),COLORMAGE NTA;DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),1.028,'买进'),COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),1.0326*1,13); DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),1.036,'观察分时量'),COLORWHITE;DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),1.005,'超强'),COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),1.003*1,13);【通达信】超准分时(底线、高线、黄色起动线、拉升)-指标公式效果图 (文档来源:若水财经社区)。

【股票指标公式下载】-【通达信】极准(超买、超卖、趋势线)

【股票指标公式下载】-【通达信】极准(超买、超卖、趋势线)

【股票指标公式下载】-【通达信】极准(超买、超卖、趋势线)【通达信】极准(超买、超卖、趋势线)-指标公式源码{ N:1 100 5 M:1 100 13}N:=5;M:=13;上:EMA(C,3),COLORBLUE,LINETHICK1;中:EMA(C,5),COLORWHITE,LINETHICK1;下:EMA(中,5),COLOR00FF00,LINETHICK1;IF(上>中 AND 上>REF(上,1), 上,DRAWNULL),LINETHICK2,COLORRED;IF(中>下 AND 中>REF(中,1), 中,DRAWNULL),LINETHICK2,COLORRED; DRAWBAND(上,RGB(255,255,0),中,RGB(256,200,0));QQ:= C<中;MM:=上>REF(上,1) AND REF(上,1)<REF(上,2) ;超买:MA(C,10)*IF(CAPITAL=0,1.04,1.1),POINTDOT,COLORGREEN,LINETHICK2; 超卖:MA(C,10)*IF(CAPITAL=0,0.95,0.9),POINTDOT,COLORRED,LINETHICK2; 获利盘%:WINNER(CLOSE)*100,NODRAW,COLORWHITE;趋势线:EMA(((SLOPE(CLOSE,21) * 20) +CLOSE),42),POINTDOT,COLORFF00FF,LINETHICK4;V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);V2:=(1-7/100)*(DMA(CLOSE,V1));V3:=(1+7/100)*(DMA(CLOSE,V1));V5:=MA((LOW+HIGH+CLOSE)/3,5);MA1:=MEMA(CLOSE,5);MA2:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416;MA3:=IF(MA2>0,MA2,MA2);MA5:=MA(CLOSE,N),COLOR888899;MA13:=MA(CLOSE,M),COLORFF00F0,LINETHICK2;VAR1:=CLOSE=HHV(C,4) AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) ANDC>=REF(C,1) AND C>=REF(C,2);{收盘价=4日内收盘价的最高值 AND 昨收>=2日前的收盘价}VAR2:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4);{收盘价=4日内收盘价的最高值 AND 昨收=4日内收盘价的最低值}VAR3:=CLOSE=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) ANDREF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) ANDC<REF(C,1) AND C<REF(C,2);{收盘价=4日内收盘价的最低值 AND (昨收<2日前的收盘价}VAR4:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);{昨收=4日内收盘价的最低值 AND 收盘价>=2日前的收盘价}VAR5:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) AND REF(C,2)>=REF(C,4) AND C<REF(C,1);{昨收=4日内收盘价的最高值 AND 收盘价<2日前的收盘价}VAR6:=V5>REF(V5,1) AND REF(V5,1)<REF(V5,2);{今日V5向上形成拐点}VAR7:=LOW<HHV(V5,13) AND HIGH>HHV(V5,13) AND CLOSE>REF(C,1) AND CLOSE>OPEN;VAR8:=VAR7 AND COUNT(VAR6,2);VAR9:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6); VAR10:=EMA(MA(C,13),13);VAR11:=FILTER((LLV(VAR9,2)=LLV(VAR9,7) AND COUNT(VAR9<0,2) AND CROSS(VAR9,MA(VAR9,2)))=1,5);VAR12:=FILTER((HHV(VAR9,2)=HHV(VAR9,7) AND COUNT(VAR9>50,2) AND CROSS(MA(VAR9,2),VAR9))=1,1);VAR13:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;VAR14:=FILTER(((CROSS(VAR13,0) OR CROSS(C,VAR10)) AND VAR11)=1,3); VAR15:=MA(C,18)>=REF(MA(C,18),3) AND CROSS(C,MA(C,18));VAR16:=VAR8 AND NOT(REF(VAR8,1));RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;金叉:=CROSS(J,D);死叉:=CROSS(D,J);买1:=(VAR14 OR VAR15) AND VAR11;买2:=(VAR14 OR VAR15) AND VAR4;买3:=(VAR14 OR VAR15) AND VAR2;买4:=(VAR2 AND VAR11) OR (VAR4 AND VAR11);买5:=(金叉 AND VAR4) OR (金叉 AND VAR2) OR (金叉 AND VAR11);{涨停}STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1), COLOR00FFFF;{跌停}STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1), COLORGREEN;{蓝}STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3.3,0),COLORFF6600;STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.4,0),COLORFF8800;STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.3,0),COLORFFAA00;STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.6,0),COLORFFCC00;{红}STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3.3,0),COLOR000066;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR000099;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.3,0),COLOR0000DD;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;{绿}STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR009900;STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,2.4,0),COLOR00BB00;STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,1.3,0),COLOR00DD00; STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;{灰}STICKLINE(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,3.3,0),COLOR999999; STICKLINE(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB; STICKLINE(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,1.3,0),COLORDDDDDD; STICKLINE(VAR4 AND MM,OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF; STICKLINE(金叉,OPEN,CLOSE,0.5,0),COLORYELLOW;STICKLINE(死叉,OPEN,CLOSE,0.5,0),COLOR000066;DRAWICON(VAR16,LOW-0.02,15);DRAWICON(买1 OR 买2 OR 买3 OR 买4 OR 买5 AND MM,LOW-0.05,15); DRAWICON(死叉 OR CROSS(50,VAR9) AND QQ AND K>50,HIGH+0.01,2);X1:=(C+L+H)/3;BB5:=ATAN(EMA(X1,7)-REF(EMA(X1,7),1))*3.1416*10;EMA3:=EMA(C,3);DRAWTEXT(FILTER(BB5>1 AND EMA(X1,7)>REF(EMA(X1,7),1),10),LOW*0.99,'★∠45'),COLORFFFFFF;VAR81:=1;VAR82:=((((2*CLOSE)+HIGH)+LOW) / 4);低金叉进:=20,COLORYELLOW,LINETHICK2;高死叉出:=90,COLORGREEN,LINETHICK3;VAR84:=LLV(LOW,5);VAR85:=HHV(HIGH,4);C1:=(EMA((((VAR82-VAR84)/(VAR85-VAR84))*100),4)*VAR81),COLORFF00FF,L INETHICK2;C2:=(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR81),COLORFFFFFF,LINETH ICK2;条件:=CROSS(C1,C2) AND C1<40;条件0:=CROSS(C2,C1) AND C1>90;TJ1:=CROSS(C1,C2);TJ2:=CROSS(C2,C1);TJ3:=CROSS(C1,C2) AND REF(C1,1)<20;TJ4:=CROSS(C2,C1) AND REF(C1,1)>80;DRAWTEXT(条件0,H*1.02,'S'),COLORBLUE;DRAWTEXT(TJ3 AND MM,L*0.98,'底'),COLORFF00FF;DRAWTEXT(TJ4 AND QQ,H*1.02,'逃'),COLORGREEN;水平面:=EMA(CLOSE,89),COLOR3399FF;AAA:=(3*C+H+L+O)/6;短趋:=(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;中趋:=(LLV(短趋,2)+LLV(短趋,4)+LLV(短趋,6))/3;TTJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>短趋;立桩量:=FILTER(TTJ1,5);TTJ2:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 ANDCLOSE>REF(HIGH,3),1,0)));突破:=TTJ2=1;TTJ3:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量)=3 ANDCLOSE>REF(LOW,3),1,0)));三天法则:=TTJ3=1;成立:=三天法则 AND 突破;条件成立:=FILTER(成立,3);DRAWTEXT(条件成立,L*0.93,'桩'),COLOR00FFFF;VAR90:=((((HHV((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12 )-EMA(DCLOSE,26)),9)))*2),4)<0) AND((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2)>REF((((EMA(DCLOSE,12) -EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)- EMA(DCLOSE,26)),9)))*2),1)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))- (EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2))) AND(REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLO SE,26)),9)))*2),3)));DRAWTEXT(VAR90 AND MM,L*0.98,'买'),COLORRED;DRAWTEXT(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*0.98,'追'),COLORMAGENTA;低点:=REF(LLV(L,250),3);H1:=低点*1.191;H2:=低点*1.382;H3:=低点*1.5;H4:=低点*1.618;H5:=低点*1.809;H6:=低点*2;H7:=低点*2.191;%19:REFDATE(H1,DATE),POINTDOT,COLORYELLOW,LINETHICK3;%38:REFDATE(H2,DATE),POINTDOT,COLORMAGENTA,LINETHICK3;%50:REFDATE(H3,DATE),POINTDOT,COLORLIGRAY,LINETHICK3;%61:REFDATE(H4,DATE),POINTDOT,COLORRED,LINETHICK3;%80:REFDATE(H5,DATE),POINTDOT,COLORWHITE,LINETHICK3;%100:REFDATE(H6,DATE),POINTDOT,COLOR00FF00,LINETHICK4;【通达信】极准(超买、超卖、趋势线)-指标公式效果图 (文档来源:若水财经社区)。

【股票指标公式下载】-【通达信】分价图(超短、中线、压力、支撑)

【股票指标公式下载】-【通达信】分价图(超短、中线、压力、支撑)

【通达信】分价图(超短、中线、压力、支撑)-指标公式源码最高:=REF(HHV(H,N),M);最低:=REF(LLV(L,N),M);H1:=最高-(最高-最低)*0.191;H中:=最高-(最高-最低)*0.5;H5:=最高-(最高-最低)*0.809;安全:REFDATE(H1,DATE),COLORFF8900,LINETHICK2;中枢:REFDATE(H中,DATE),COLORMAGENTA,LINETHICK2;警惕:REFDATE(H5,DATE),COLORYELLOW,LINETHICK2;X11:=(C+L+H)/3;X22:=EMA(X11,6);X33:=EMA(X22,5);STICKLINE(X22>=X33,X22,X33,4,1),COLOR00A6F6;STICKLINE(X22<X33,X22,X33,4,1), COLORBLUE;AA1:=(2*C+REF(C ,1 ))/3;BB1:=EMA(AA1,2);A:=MA(BB1,3);AAA:=(H+C+O)/3;AA2:=(18*AAA+17*REF(AAA ,1)+16*REF(AAA ,2)+15*REF(AAA ,3)+14*REF(AAA ,4)+13*REF(AAA ,5)+12*REF(AAA ,6)+11*REF(AAA ,7)+10*REF(AAA ,8)+9*REF(AA A ,9)+8*REF(AAA ,10)+7*REF(AAA ,11)+6*REF(AAA ,12)+5*REF(AAA ,13)+4*REF(AA A ,14)+3*REF(AAA ,15)+2*REF(AAA ,16)+REF(AAA ,17))/171;DD3:=A>=AA2 AND C>AA2;DD4:=A<AA2 ;DD5:=A>AA2 ;{STICKLINE((DD4 OR DD5) AND O<=C ,H,L,0.5,0),COLOR00CC99;} STICKLINE((DD4 OR DD5) AND O<=C ,C,O,2.8,0),COLOR00CC99; {STICKLINE((DD4 OR DD5) AND O>=C ,H,L,0.5,0),COLOR3F8C3A;} STICKLINE((DD4 OR DD5) AND O>=C ,C,O,2.8,0),COLOR3F8C3A;STICKLINE((DD3 OR C>AA2) AND O<=C,C,O,2.8,0),COLORRED; {STICKLINE((DD3 OR C>AA2) AND O<=C,H,L,0.5,0),COLORRED;} STICKLINE((DD3 OR C>AA2) AND O>=C,C,O,2.8,0),COLORFF33FF; {STICKLINE((DD3 OR C>AA2) AND O>=C,H,L,0.5,0),COLORFF33FF;} STICKLINE(MA(C,13)>O AND C>MA(C,13) AND O<C,O,C,2.8,0),COLORYELLOW; {STICKLINE(MA(C,13)>O AND C>MA(C,13),H,L,0.8,1),COLORYELLOW;} STICKLINE(C>0,C,O,0,0),COLORFFFFFF;X1:=HHV(H,3);X2:=LLV(L,3);XC:=C;XH:=H;XL:=L;YCJY1:=IF(XH>REF(X1,1) AND XC>REF(XC,1),X2,IF(XL<REF(X2,1) ANDXC<REF(XC,1),X1,DRAWNULL));YCJY:=IF(YCJY1=DRAWNULL,REF(YCJY1,1),YCJY1);SNX2:=IF(YCJY<H AND YCJY>L,REF(YCJY,1),YCJY);Y1:=HHV(H,13);Y2:=IF(Y1>REF(Y1,30),Y1,REF(Y1,8));RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;K:=SMA(RSV,3,1),COLORWHITE;D:=SMA(K,3,1),COLORYELLOW;J1:=-(3*K-2*D)+100;J2:=IF(J1<0 ,0 ,J1);J:=IF(J2>100,100,J2),COLORBLUE;超短:=SMA(AMOUNT,3,1)/100000000;中线:=SMA(AMOUNT,13,1)/100000000;压力1:=IF(J<K AND 超短>中线 AND C<Y2,SNX2,Y2);压力:PLOYLINE(C>0,压力1),LINETHICK2,COLORCYAN;支撑:PLOYLINE(C>0,SNX2) ,LINETHICK2,COLORGREEN;【通达信】分价图(超短、中线、压力、支撑)-指标公式效果图(文档来源:若水财经社区)。

【股票指标公式下载】-【通达信】买卖简单(趋势、低位线、高位线)

【股票指标公式下载】-【通达信】买卖简单(趋势、低位线、高位线)

【通达信】买卖简单(趋势、低位线、高位线)-指标公式源码STICKLINE(C>0.1,0,100,4.8,0),COLOR668800;STICKLINE(C>0.1,-5,0,4.8,0),COLORFFB06C;VAR1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;火:=BARSLAST(EMA(CLOSE,5)<REF(EMA(CLOSE,5),1)),NODRAW;山:=COUNT(EMA(CLOSE,5)>REF(EMA(CLOSE,5),1),5),NODRAW;KL:=IF(山>0,2*火,0);趋势:=KL/2,COLOREE687B,NODRAW;VARL1:=(EMA(C,12)-EMA(C,26))*100+50;VARL2:=EMA(VARL1,9);VARL3:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;VARL4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;VARL5:=SMA(VARL4,13,8);VARL6:=SMA(VARL3,21,8);低位线:=IF((趋势-VARL6<(-70)),0,-5);DRAWBAND(低位线,RGB(00,300,150),-5,RGB(00,300,150));QS:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*S MA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1); 高位线:=IF((QS-VARL6>85),0,-5);DRAWBAND(高位线,RGB(255,20,147),-5,RGB(255,20,147));K1:EMA(VAR2,5),COLORLIBLUE,NODRAW;K2:SMA(VAR2,5,1),COLORYELLOW,NODRAW;K:EMA((K1-K2),2),COLORWHITE,NODRAW;DRAWBAND(85,RGB(100,100,100),85+K,RGB(128,00,00));KK1:=IF(K>12,90,85),COLORCYAN;KK2:=IF(K<-12,80,85),COLORCYAN;DRAWBAND(KK1,RGB(200,200,200),KK2,RGB(200,200,200));DRAWBAND(K1,RGB(400,200,00),K2,RGB(50,300,100));STICKLINE(C>0.1,15,15,1,0),COLORCYAN;STICKLINE(C>0.1,50,50,1,0),COLORCYAN;LC:=REF(CLOSE,1);VAR01:=C-REF(C,1);VAR02:=100*EMA(EMA(VAR01,6),6)/EMA(EMA(ABS(VAR01),6),6);MA5:=EMA(C,5);MA13:=EMA(C,13);UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROS S(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(C ROSS(MA5,MA13))+1),0),COLOR0000FF;DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CR OSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST (CROSS(MA13,MA5))+1),0),COLOR00FF00;BT:=(LLV(VAR02,2)=LLV(VAR02,7) AND COUNT(VAR02<0,2) ANDCROSS(VAR02,MA(VAR02,2))) AND REF(DOWN,1)<REF(DOWN,2) ANDUP>REF(DOWN,1);STICKLINE(BT,85,100,2,0),COLOR000088;STICKLINE(BT,85,100,1,0),COLOR0000CC;STICKLINE(BT,85,100,0.22,0),COLOR0000FF;TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82; STICKLINE(TJ1,85,95,3,0),COLOR880088;STICKLINE(TJ1,85,95,1.5,0),COLORAA00AA;STICKLINE(TJ1,85,95,0.8,0),COLORCC00CC;STICKLINE(TJ1,85,95,0.2,0),COLORFF00FF;HR:=HHV(HIGH,55);HRY:=LLV(LOW,55);HRY11:=HR*HRY;HRY33:=SQRT(HRY11);TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33; STICKLINE(TJ2,85,90,4,0),COLOR008888;STICKLINE(TJ2,85,90,2,0),COLOR00AAAA;STICKLINE(TJ2,85,90,1,0),COLOR00CCCC;STICKLINE(TJ2,85,90,0.2,0),COLOR00FFFF;{HZ_买底1}A8:=100*EMA(EMA((C-REF(C,1)),6),6)/EMA(EMA(ABS((C-REF(C,1))),6),6); UP1:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1), LLV(L,BARSLAST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),H=HHV(H,BARSLAST (CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),HHV(H,BARSLAST(CROSS(EMA(CLOSE ,7),EMA(CLOSE,19)))+1),0);DOWN1:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1 ),HHV(H,BARSLAST(CROSS(EMA(CLOSE,7),EMA(CLOSE,19)))+1),L=LLV(L,BARSLA ST(CROSS(EMA(CLOSE,19),EMA(CLOSE,7)))+1),LLV(L,BARSLAST(CROSS(EMA(CLO SE,19),EMA(CLOSE,7)))+1),0);买1:=IF((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1),DRAWNULL,100); STICKLINE(买1=100,0,5,4,0),COLOR00AAAA;STICKLINE(买1=100,0,5,2.5,0),COLOR00CCCC;STICKLINE(买1=100,0,5,0.5,0),COLOR00FFFF; ;【通达信】买卖简单(趋势、低位线、高位线)-指标公式效果图(文档来源:若水财经社区)。

通达信股票走势趋势指标公式

通达信股票走势趋势指标公式

通达信股票走势趋势指标公式通达信股票走势趋势指标公式N:=10;量:=(CLOSE - LLV(LOW,32)) / (HHV(HIGH,32) - LLV(LOW,32)) * 1.2 * CLOSE;量1:=EMA(量,3);量2:=EMA(量,5);量3:=EMA(量,7);Y:=MA(量1,6);Y1:=MA(Y,2);Y2:=MA(Y,4);Y3:=MA(Y,6);强弱分界:(Y1+Y2+Y+Y3)/4,COLORGREEN,LINETHICK2;IF(强弱分界<量3,强弱分界,DRAWNULL),COLORRED,LINETHICK2;STICKLINE(量1 >= 量2,量3,量1,2,0),COLOR000055;STICKLINE(量1 >= 量2,量3,量1,1.8,0),COLOR0000BB;STICKLINE(量1 >= 量2,量3,量1,1.4,0),COLOR0000CC;STICKLINE(量1 >= 量2,量3,量1,1,0),COLOR0000DD;STICKLINE(量1 >= 量2,量3,量1,0.5,0),COLOR0000FF;STICKLINE(量1 <= 量2,量3,量1,2,0),COLOR000055;STICKLINE(量1 <= 量2,量3,量1,1.8,0),COLORFF3300;STICKLINE(量1 <= 量2,量3,量1,1.4,0),COLORFF5500;STICKLINE(量1 <= 量2,量3,量1,1,0),COLORFF7700;STICKLINE(量1 <= 量2,量3,量1,0.5,0),COLORFF9900;T1:=量2 >= 量3 AND 量1 < REF(量1,1);T2:=量2 < 量3 AND 量1 > REF(量1,1);STICKLINE(T1,量1,量3,2,0),COLORFFBB11;STICKLINE(T1,量1,量3,1.8,0),COLORFFCC22;STICKLINE(T1,量1,量3,1.4,0),COLORFFDD33;STICKLINE(T1,量1,量3,1,0),COLORFFEE44;STICKLINE(T1,量1,量3,0.5,0),COLORFFFF55;STICKLINE(T2,量1,量3,2,0),COLOR338FDD;STICKLINE(T2,量1,量3,1.8,0),COLORFF00FF;STICKLINE(T2,量1,量3,1.4,0),COLOR00DDFF;STICKLINE(T2,量1,量3,1,0),COLOR00AAFF;STICKLINE(T2,量1,量3,0.5,0),COLOR00BBFF;大涨:=CLOSE/REF(CLOSE,1)>=1.09 OR ((H-L)/REF(C,1)>0.1 AND C=H),LINETHICK0,COLOR00FFFF;STICKLINE(大涨,量1,量3,2,0),COLOR00FFFF;大跌:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)<-0.098 OR ((H-L)/REF(C,1)>0.1 AND C=L),LINETHICK0,COLOR00FF00;STICKLINE(大跌,量1,量3,2,0),COLOR00FF00;HH:=HHV(量1,N);LL:=LLV(量1,N);LC:=REF(C,1);CCI:=((C-MA(C,14))/(0.015*AVEDEV(C,14)))/4+50,COLORFFCCCC;RSI:=SMA(MAX(C-LC,0),6,1)/SMA(ABS(C-LC),6,1)*150-30,COLORCC9900;低0:=IF(LLV(CCI,10)<0 AND LLV(RSI,10)<0 AND C=LLV(C,10) AND L=LLV(L,10),40,0);低:=IF(FILTER(低0=40,5),50,0);DRAWICON(低=50,量1-0.05,9);A1:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑马线:=EMA(A1,5),LINETHICK2,COLOR6600FF;A2:=(黑马线-REF(黑马线,1))/REF(黑马线,1)*100;A3:=EMA(C,5);A4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趋势线:=(MA(3*SMA(A4,6,1)-2*SMA(SMA(A4,5,1),5,1),2)),LINETHICK2,COLORYELLOW;A5:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*100;DRAWTEXT(FILTER(REF(黑马线,1)>90 AND A2<0,7),量1+0.5,跑),COLOR00FF00;DRAWTEXT(CROSS(A1,黑马线) AND 黑马线<A5,量3-1.5,21D);P1:=20,32,28;P2:=32,35,32;P3:=35,38,35;VARA2:=LLV(LOW,10);VARA3:=HHV(HIGH,25);警戒线1:= P1/10;减仓线1:= P2/10 ;卖出线1:= P3/10;动力线1:= EMA((CLOSE-VARA2)/(VARA3-VARA2)*4,4);警惕:IF(CROSS(动力线1,警戒线1),量2+3,DRAWNULL),POINTDOT,LINETHICK5,COLORF00FF0;逢高减磅:IF(CROSS(动力线1,减仓线1),量2+2,DRAWNULL), POINTDOT,LINETHICK5,COLORF0F000;NG1:=20;VARG2:=((3 * SMA((((CLOSE - LLV(LOW,NG1)) / (HHV(HIGH,NG1) - LLV(LOW,NG1))) * 100),5,1)) - (2 * SMA(SMA((((CLOSE - LLV(LOW,NG1)) / (HHV(HIGH,NG1) - LLV(LOW,NG1))) * 100),5,1),3,1)));秘密买点:IF((VARG2 <= 3),量2+5,强弱分界),COLORWHITE;绝密买点:IF((VARG2 <= 0),量2+4,强弱分界),COLORRED;STICKLINE(VARG2<0 ,量2,量2+4,0.5,0),COLORRED;FFF:=REF((H-MAX(C,O))/ABS(C-O)>2 AND C>O,1) AND ((MIN(C,O)-L)/ABS(C-O)>2 AND C>O);抄点:STICKLINE(FFF,0,10,3,0),COLORLICYAN;。

通达信自动画趋势线指标公式

通达信自动画趋势线指标公式

通达信自动画趋势线指标公式参数:n 5A1:=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&gt;=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;L1:=(D2 AND NOT(D1 AND E1&lt;E2)); H2:=D1 AND NOT(D2 ANDE1&gt;=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 ANDCOUNT(L1,X1)&gt;0,LLVBARS(IF(L1,L,10000),X1));G1:=F1 &gt;REF(F1,1); I1:=BACKSET(G1,2);LD:=I1&gt;REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 ANDCOUNT(H2,X2)&gt;0,HHVBARS(IF(H2,H,0),X2));G2:=F2&g t;REF(F2,1); I2:=BACKSET(G2,2); HD:=I2&gt;REF(I2,1);{过滤后高点}R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1&gt;REF(R1,1); {前一高}T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1&gt;REF(T1,1); {前一低}R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2&gt;REF(R2,1); {前二高}T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2&gt;REF(T2,1); {前二低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3&gt;REF(T3,1); {前三低}T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);U4:=T4&gt;REF(T4,1); {前四低}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3&gt;REF(R3,1); {前三高}R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);S4:=R4&gt;REF(R4,1); {前四高}短期压力:DRAWLINE(S2,H,S1,H,1),COLORRED;短期支撑:DRAWLINE(U2,L,U1,L,1),COLORGREEN;中期压力:DRAWLINE(S3,H,S2,H,1),COLORYELLOW; 中期支撑:DRAWLINE(U3,L,U2,L,0),COLORGREEN; 长期压力:DRAWLINE(S4,H,S3,H,1),COLORFF00FF;长期支撑:DRAWLINE(U4,L,U3,L,0),COLORGREEN;DRAWICON(S 1,H*1.01,6);DRAWICON(S2,H*1.01,6);DRAWICON(S3,H*1.01,6);DRAWICON(S4,H*1.01,6);DRAW ICON(U1,L*0.99,9);DRAWICON(U2,L*0.99,9);DRAWICON(U3,L*0.99,9);DRAW ICON(U4,L*0.99,9);。

【股票指标公式下载】-【通达信】自动画线(高点压力、低点支撑)

【股票指标公式下载】-【通达信】自动画线(高点压力、低点支撑)

【通达信】自动画线(高点压力、低点支撑)-指标公式源码HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLA Y:=0;AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);QY:=BACKSET(AA,HIGHN+1);CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);DRAWICON(CC,H*1.02,2);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,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055F F,POINTDOT;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLO W,POINTDOT;AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);QY1:=BACKSET(AA1,LOWN+1);CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);DRAWICON(CC1,L*0.98,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,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK2;ZGSTAR:=(高点压力+低点支撑)/2;ZGEND:=CONST((高点压力+低点支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF55 BB,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGEN TA,POINTDOT,;DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYAN, POINTDOT;【通达信】自动画线(高点压力、低点支撑)-指标公式效果图(文档来源:若水财经社区)。

通达信指标公式源码自动画线主图指标公式

通达信指标公式源码自动画线主图指标公式

通达信自动画线主图指标公式自动化线的顶底两条线有未来,其他没有未来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;。

通达信指标公式源码 自动画线主图指标公式

通达信指标公式源码 自动画线主图指标公式

N1:=10;N2:=10;DISP:=2;K:=IF(PERIOD=5,1,{日}IF(PERIOD=6,1,{周}IF(PERIOD=7,1,{月}IF(PERIOD=8,1,{多分钟}IF(PERIOD=9,1,{多日}IF(PERIOD=10,1,{季}IF(PERIOD=11,2,{年}IF(PERIOD=4,1,{60F}IF(PERIOD=3,1,{30F}IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10;P1:=PEAK(1,K*N1,1);P2:=PEAK(1,K*N1,2);WP1:=PEAKBARS(1,K*N1,1);WP2:=PEAKBARS(1,K*N1,2);T1:=TROUGH(2,K*N2,1);T2:=TROUGH(2,K*N2,2);WT1:=TROUGHBARS(2,K*N2,1);WT2:=TROUGHBARS(2,K*N2,2);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4 ),1));TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA; DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;中枢高:=PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED; 中枢低:=PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGRE EN;{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;} 趋势高:=PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;趋势低:=PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;局部低点预选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) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) ORREF(高保留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;{大折线}A1:=REF(HIGH,10)=HHV(HIGH,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);D1:=FILTER(C1,10);{高点}A2:=REF(LOW,10)=LLV(LOW,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);D2:=FILTER(C2,10);{低点}E1:=(REF(LLV(LOW,2*10),1)+REF(HHV(HIGH,2*10),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=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,LOW,10000),X1)); G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORMAGENTA,DOTLINE,LINETHICK1; DRAWLINE(HD,H,LD,L,0),COLORMAGENTA,DOTLINE,LINETHICK1;J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BARSLAST(LD),H,L ),0),COLORWHITE,LINETHICK1;{趋势线}UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);DRAWLINE(XX,L,VV,L,1),COLORRED,LINETHICK2;UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);DRAWLINE(XX2,H,VV2,H,1),COLORGREEN,LINETHICK2;。

通达信自动趋势划线主图指标公式

通达信自动趋势划线主图指标公式

通达信自动趋势划线主图指标公式通达信自动趋势划线主图指标公式通达信自动趋势划线主图股票软件源码如下: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;{后面进行过滤,方法同前。

通达信快慢线公式(一)

通达信快慢线公式(一)

通达信快慢线公式(一)通达信快慢线公式1. 什么是通达信快慢线公式?通达信快慢线公式,也称为通达信DM公式,是用于衡量市场趋势的一种技术指标。

它由两条移动平均线组成,快线是快速移动平均线(Fast line),慢线是慢速移动平均线(Slow line)。

这两条移动平均线的差异被称为快慢线。

2. 相关公式以下是通达信快慢线公式的相关公式:•快线:[FastLine = EMA(CLOSE, 12)]•慢线:[SlowLine = EMA(CLOSE, 26)]•快慢线:[DM = FastLine - SlowLine]其中,CLOSE代表收盘价,EMA代表指数移动平均线。

3. 公式解释说明•快线:快速移动平均线是以较短的时间周期计算的指数移动平均线。

一般情况下,使用12个周期进行计算。

快线对价格的反应更为敏感,能够较快地反应市场的短期波动。

•慢线:慢速移动平均线是以较长的时间周期计算的指数移动平均线。

一般情况下,使用26个周期进行计算。

慢线对价格的反应较为缓慢,能够更好地捕捉市场的长期趋势。

•快慢线:快慢线是指快速移动平均线和慢速移动平均线的差值。

它反映了市场的短期波动与长期趋势之间的关系。

当快慢线呈现正值时,意味着市场出现上涨趋势;而当快慢线呈现负值时,意味着市场出现下跌趋势。

4. 举例说明假设某只股票在过去12个交易日的收盘价格如下:110, 112, 115, 116, 118, 120, 125, 130, 128, 124, 1 22, 118根据上述收盘价数据,可以计算出快速移动平均线和慢速移动平均线,从而得到快慢线的数值。

首先计算快速移动平均线(以12个周期为基准):[FastLine = = ]然后计算慢速移动平均线(以26个周期为基准):[SlowLine = = ]最后计算快慢线的差值:[DM = - = ]根据上述计算结果,可以得出该股票的快慢线为,这意味着市场趋势相对较强,有上涨的可能性。

通达信大道至简主图指标公式

通达信大道至简主图指标公式

通达信大道至简主图指标公式AA3:=EMA(CLOSE,5)>EMA(CLOSE,6) AND EMA(CLOSE,6)>EMA(CLOSE,7) AND EMA(CLOSE,7)>EMA(CLOSE,8) AND EMA(CLOSE,8)>EMA(CLOSE,9)AND EMA(CLOSE,9)>EMA(CLOSE,10) AND EMA(CLOSE,10)>EMA(CLOSE,11) AND EMA(CLOSE,11)>EMA(CLOSE,12)AND EMA(CLOSE,12)>EMA(CLOSE,13) AND EMA(CLOSE,13)>EMA(CLOSE,14);AA2:= EMA(CLOSE,14)>EMA(CLOSE,15)AND EMA(CLOSE,15)>EMA(CLOSE,20) AND EMA(CLOSE,20)>EMA(CLOSE,30) AND EMA(CLOSE,30)>EMA(CLOSE,60) AND EMA(CLOSE,60)>EMA(CLOSE,90)AND EMA(CLOSE,90)>EMA(CLOSE,120) AND EMA(CLOSE,120)>EMA(CLOSE,250);A1:= AA2 AND AA3;A2:=EMA(CLOSE,5)>EMA(CLOSE,6) AND EMA(CLOSE,6)>EMA(CLOSE,7) AND EMA(CLOSE,7)>EMA(CLOSE,8) AND EMA(CLOSE,8)>EMA(CLOSE,9)AND EMA(CLOSE,9)>EMA(CLOSE,10) AND EMA(CLOSE,10)>EMA(CLOSE,11) AND EMA(CLOSE,11)>EMA(CLOSE,12)AND EMA(CLOSE,12)>EMA(CLOSE,13) AND EMA(CLOSE,13)>EMA(CLOSE,14);B1:=IF(A1,1,2);VAR1MZ:=((CLOSE > REF(CLOSE,1)) AND (CLOSE >REF(CLOSE,2)));VAR2MZ:=((REF(VAR1MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR3MZ:=((REF(VAR2MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR4MZ:=((REF(VAR3MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR5MZ:=((REF(VAR4MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR6MZ:=((REF(VAR5MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR7MZ:=((REF(VAR6MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR8MZ:=((REF(VAR7MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR9MZ:=((REF(VAR8MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VARAMZ:=((REF(VAR9MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VARBMZ:=((REF(VARAMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VARCMZ:=((REF(VARBMZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));{红K}STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),L,H,0,0),COLOR0000DD;STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ)OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,REF(C,1),3,0),COLOR000099;STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,REF(C,1),2,0),COLOR0000BB;STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,REF(C,1),1,0),COLOR0000DD;VARDMZ:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));VAREMZ:=((REF(VARDMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VARFMZ:=((REF(VAREMZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR10MZ:=((REF(VARFMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR11MZ:=((REF(VAR10MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR12MZ:=((REF(VAR11MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR13MZ:=((REF(VAR12MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR14MZ:=((REF(VAR13MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR15MZ:=((REF(VAR14MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR16MZ:=((REF(VAR15MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR17MZ:=((REF(VAR16MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR18MZ:=((REF(VAR17MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));{绿K}STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),C,REF(C,1),3 ,0 ),COLOR00BB00;STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),C,REF(C,1),2 ,0 ),COLOR00DD00;STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),C,REF(C,1),1 ,0 ),COLOR00FF00;STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),H,L,0,0 ),COLOR00DD00;VAR19MZ:=(REF((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),1) AND VAR1MZ);VAR1AMZ:=(REF((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),1) AND VARDMZ);{粉红}STICKLINE(VAR19MZ,REF(CLOSE,1),REF(CLOSE,2),3 ,0 ),COLO RFF11FF;STICKLINE(VAR19MZ,REF(CLOSE,1),REF(CLOSE,2),2 ,0 ),COLO RFF44FF;STICKLINE(VAR19MZ,REF(CLOSE,1),REF(CLOSE,2),1 ,0 ),COLO RFF66FF;{黄色}STICKLINE(VAR1AMZ,REF(CLOSE,1),REF(CLOSE,2),3,0),COLO R00AAFF;STICKLINE(VAR1AMZ,REF(CLOSE,1),REF(CLOSE,2),2,0),COLO R00CCFF;STICKLINE(VAR1AMZ,REF(CLOSE,1),REF(CLOSE,2),1,0),COLO R00EEFF;FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);TTJ:=CROSS(FF,MA15);上:=EMA(C,3),COLORBLUE,LINETHICK1;中:=EMA(C,5),COLORWHITE,LINETHICK1;下:=EMA(中,5),COLOR00FF00,LINETHICK1;QQ:= CMM:=上>REF(上,1) AND REF(上,1)V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);V2:=(1-7/100)*(DMA(CLOSE,V1));V3:=(1+7/100)*(DMA(CLOSE,V1));V5:=MA((LOW+HIGH+CLOSE)/3,5);MA1Q:=MEMA(CLOSE,5);MA2Q:=ATAN((MA1Q/REF(MA1Q,1)-1)*100)*180/3.1416;MA3Q:=IF(MA2Q>0,MA2Q,MA2Q);MA5Q:=MA(CLOSE,5),COLOR888899;MA13:=MA(CLOSE,13),COLORFF00F0,LINETHICK2;VAR01:=CLOSE=HHV(C,4) AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3))OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) ANDREF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) ANDC>=REF(C,1) AND C>=REF(C,2);VAR02:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4);VAR03:=CLOSE=LLV(C,4) AND (REF(C,1)REF(C,1)=LLV(C,4) AND CREF(C,1)=HHV(C,4) AND CCVAR04:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) ANDREF(C,1)<=REF(C,3) AND REF(C,2)=REF(C,1);VAR05:=REF(C,1)=HHV(C,4) AND CREF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) ANDREF(C,2)>=REF(C,4) AND CVAR06:=V5>REF(V5,1) AND REF(V5,1)VAR07:=LOWHHV(V5,13) AND CLOSE>REF(C,1) AND CLOSE>OPEN;VAR08:=VAR07 AND COUNT(VAR06,2);VAR09:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6);VAR10:=EMA(MA(C,13),13);VAR11:=FILTER((LLV(VAR09,2)=LLV(VAR09,7) AND COUNT(VAR09<0,2) ANDCROSS(VAR09,MA(VAR09,2)))=1,5);VAR12:=FILTER((HHV(VAR09,2)=HHV(VAR09,7) AND COUNT(VAR09>50,2) ANDCROSS(MA(VAR09,2),VAR09))=1,1);VAR13:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;VAR14:=FILTER(((CROSS(VAR13,0) OR CROSS(C,VAR10)) AND VAR11)=1,3);VAR15:=MA(C,18)>=REF(MA(C,18),3) AND CROSS(C,MA(C,18));VAR16:=VAR08 AND NOT(REF(VAR08,1));RSVQ:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSVQ,3,1);D:=SMA(K,3,1);J:=3*K-2*D;金叉:=CROSS(J,D);死叉:=CROSS(D,J);买1:=(VAR14 OR VAR15) AND VAR11;买2:=(VAR14 OR VAR15) AND VAR04;买3:=(VAR14 OR VAR15) AND VAR02;买4:=(VAR02 AND VAR11) OR (VAR04 AND VAR11);买5:=(金叉 AND VAR04) OR (金叉 AND VAR02) OR (金叉 AND VAR11);TTJ0:=VAR16;TTJ1:=买1 OR 买2 OR 买3 OR 买4 OR 买5 AND MM;XG0:=TTJ AND TTJ0;XG1:=TTJ AND TTJ1;XG11:=XG0 OR XG1;PL5:=ZIG(3,5);EN1:=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);EX1:=ZIG(3,5)=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);PL10:=ZIG(3,10);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,20);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,40);走强1:=BARSLAST(PL5走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10DTJD5:=IF(PL10ZTJZ10:=IF(PL20>REF(PL20,1) ,COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20DTJD10:=IF(PL20TJ11:=EN2 AND ZTJZ5=1;TJ22:=EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2;TJ33:=EN2 AND DTJZ10=1;TJ44:=EN3 AND ZTJZ10=1;TJ55:=EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2;XG22:=TJ11 OR TJ22 OR TJ33 OR TJ44 OR TJ55;XGQ:=XG11 OR XG22;W18:=EXIST(XGQ,1);DRAWTEXT(XGQ,L-0.1,'●放心买'),COLORRED;SQX:=(C-MA(CLOSE,13))*100;DIFF:=EMA(MA(SQX,7),1),COLORWHITE;DEA:=EMA(DIFF,7),COLORYELLOW;MACD:=(DIFF-DEA)*2,COLORSTICK;奉献理想专用:IF((CROSS(DIFF,DEA) AND DIFF低位金叉:=IF(CROSS(DIFF,DEA) AND DIFFIF(CROSS(DIFF,DEA) AND DIFF{再上N均线 N 10 1 100 1}MA1:=MA(C,5);MA2:=MA(C,10);MA3:=MA(C,21);破N:=REF(MA1,1)REF(MA2,1);试摸N:=C>MA(C,10) OR H>=MA2;再上N:=C>O AND REF(C,1)< MA(C,10) AND 试摸N AND 破N AND MA(C,21)有行情:=再上N AND (CROSS(C,长期趋势) OR CROSS(L,长期趋势) OR CROSS(H,长期趋势));DRAWTEXT(有行情,LOW-0.2,'●有行情'),COLORGREEN;VAR10B:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR11B:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12B:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13B:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14B:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15B:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16B:=ZIG(3,51)=REF(ZIG(3,51),2) ANDREF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17B:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18B:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19B:=EMA(CLOSE,2)-EMA(CLOSE,150);买1B:=VAR10B;买2B:=(VAR11B+VAR13B+VAR15B+VAR17B);BB:=IF(买1B>0 OR 买2B>0 ,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYE LLOW;红买绿卖:IF(CROSS(BB,买1B),LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK5,COLORWHIT E;牛节点:=CROSS(EMA(C,5),EMA(C,30))AND CROSS(EMA(C,10),EMA(C,20));DRAWICON(牛节点,L-0.1,13);CSAR:=SAR(10,2,20);持币:=IF(CSAR>=H,CSAR,0),CIRCLEDOT,COLORGREEN{持币};持股:=IF(CSAR<=L,CSAR,0),CIRCLEDOT,COLORRED{持股};生命线2:=EMA(SLOPE(C,21)*20+C,42),LINETHICK2,COLORYELLOW;{股价在上持,在下空仓}止损:=EMA(C,5),COLORYELLOW,LINETHICK1;{红持股绿持币黄观望}菩提B:=XMA(H,20);{此函数仅做参考线,为提前趋势预测线,上涨途中向下见顶,下跌途中向上见底};参买:=IF(止损>=REF(止损,1),止损,DRAWNULL),LINETHICK2,COLORRED;{持股前提}DRAWICON(CROSS(L,CSAR) AND 参买>0 AND H0AND H>长期趋势,(LOW- 0.1),5);VVAR1D:=((((OPEN + LOW) + HIGH) + CLOSE) / 4);短底:=EMA(VVAR1D,5);支撑:=HHV(短底,60);MAN:=(SMA(HIGH,21,2) * 1.05);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);中D:=(((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6);X1D:=EMA(中D,10);RSVD:=SMA(下档线,3,1);K大:=SMA(RSVD,3,1);D大:=((3 * RSVD) - (2 * K大));J12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);RSV24:=SMA(J12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力位:=IF(CROSS(D24,D 大),HIGH,REF(HIGH,BARSLAST(CROSS(D24,D大)))),COLORFFFFFF;牛浮面:=CROSS(CLOSE,MA20) AND HIGH < 压力位AND OPEN < MA20AND HIGH < 支撑 AND MAN - REF(MAN,1) > 0 AND X1D - REF(X1D,1)>0 ANDD大 < 63 AND MA20 - REF(MA20,1) > 0,COLORWHITE;DRAWTEXT(牛浮面,L,'●牛浮面'),COLORWHITE;CO:=(C-O);绿K:=(卖出>LOW AND 卖出MIN(C,O) AND 卖出OR 卖出{全绿K}全绿K2:=C>卖出 OR (H>卖出 AND O>C);STICKLINE(全绿K2,C,O,3,0),COLOR00BB00; STICKLINE(全绿K2,C,O,2,0),COLOR00DD00; STICKLINE(全绿K2,C,O,1,0),COLOR00FF00;。

通达信最好的自动画线主图指标公式

通达信最好的自动画线主图指标公式

通达信最好的自动画线主图指标公式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:=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) AND AA30<REF(AA30,1);BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA10>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) AND AA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) AND AA10<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);。

【股票指标公式下载】-【通达信】江恩波浪(压力线、支撑线)

【股票指标公式下载】-【通达信】江恩波浪(压力线、支撑线)

【通达信】江恩波浪(压力线、支撑线)-指标公式源码MA5:EMA(CLOSE,5);MA10:EMA(C,10);MA20:EMA(CLOSE,20);VAR1A:=(REF(HIGH,1)+REF(LOW,1))/2;压力线:MA(CLOSE,20)+2*STD(CLOSE,20);支撑线:MA(CLOSE,21)-2.2*STD(CLOSE,21),COLORYELLOW;VAR2A:=CROSS(VAR1A,压力线);VAR3A:=REF(CLOSE,1);VAR4A:=SMA(MAX(CLOSE-VAR3A,0),7,1)/SMA(ABS(CLOSE-VAR3A),7,1)*100; VAR5A:=CROSS(79,VAR4A);VAR6A:=FILTER(VAR5A,4);DRAWICON(FILTER(VAR6A OR VAR2A,5),HIGH*1.035,2);DRAWTEXT(FILTER(VAR6A OR VAR2A,5),HIGH*1.02,'卖'),COLORYELLOW; VAR7A:=FILTER( MA5>REF(MA5,1)AND MA10>REF(MA10,1)ANDMA20>REF(MA20,1)AND MA5<MA10,5);VAR8A:=FILTER(HHVBARS(H,13)/C>2 AND MA5>REF(MA5,1)AND MA5<MA10,7); VAR9A:=REF(L,2)<支撑线 AND L>支撑线 AND C>O AND MA5>REF(MA5,1); DRAWICON(FILTER(VAR7A OR VAR8A OR VAR9A,5)AND VAR4A<45,L,1); DRAWTEXT(FILTER(VAR7A OR VAR8A OR VAR9A,5)AND VAR4A<45,L,'买'),COLORRED;DRAWICON(CROSS(10,VAR4A),L,3);VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); 涨:STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,1),COLORRED; VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); 跌:STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 ORVAR18,CLOSE,REF(CLOSE,1),3,0),COLORFF8080;VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;底:STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORYELLOW;VAR1B:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;顶:STICKLINE(VAR1B,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORWHITE;A:=BARSCOUNT(C);AH:=HHV(H,72);AL:=LLV(L,72);A0:=(AH-AL)/21;B1:=L-A0;STICKLINE((A+0)/13=FLOOR((A+0)/13),B1,B1-3*A0,1,0);DRAWTEXT((A+0)/13=FLOOR((A+0)/13),B1-5.5*A0,'转向'),COLORWHITE; 【通达信】江恩波浪(压力线、支撑线)-指标公式效果图(文档来源:若水财经社区)。

Get格雅股票指标公式下载通达信神笔马良高点压力、阻力、支撑、均线

Get格雅股票指标公式下载通达信神笔马良高点压力、阻力、支撑、均线

【股票指标公式下载】-【通达信】神笔马良(高点压力、阻力、支撑、均线)【通达信】神笔马良〔高点压力、阻力、支撑、均线〕-指标公式源码VV:=(C+L+H)/3;DSA:=SMA(EMA(VV,2),2,1)LINETHICK2,COLORRED;Y396:=DSA;险1:=Y396*1.1,COLORLIRED;险2:=Y396*1.125,COLORLIRED;险3:=Y396*1.15,COLORLIRED;良1:=Y396*0.9,COLORLIBLUE;良2:=Y396*0.875,COLORLIBLUE;良3:=Y396*0.85,COLORLIBLUE;变色:=IF(Y396<REF(Y396,1),Y396,DRAWNULL),LINETHICK2,COLORBLUE; {WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;}{WSR2:=CROSS(WSR1,5);}{WSR3:=CROSS(8,WSR1);}{WSR4:=CROSS(WSR1,-5);}{WSR5:=CROSS(WSR1,-8);}{WSR6:=WSR3;}{WSR7:=WSR4 OR WSR5;}{WSR8:=WSR7 AND FILTER(WSR7,5);}{WSR10:DRAWICON(WSR8,L-0.01,1);}{WSR9:=WSR6 AND FILTER(WSR6,5);}{WSR11:DRAWICON(WSR9,H+0.01,2);}WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;WSR2:=CROSS(WSR1,5);WSR3:=CROSS(8,WSR1);WSR4:=CROSS(WSR1,-5);WSR5:=CROSS(WSR1,-8);WSR6:=WSR3;WSR7:=WSR4 OR WSR5;WSR8:=WSR7 AND FILTER(WSR7,5);WSR10:DRAWICON(WSR8,L-0.01,1);WSR9:=WSR6 AND FILTER(WSR6,5);WSR11:DRAWICON(WSR9,H+0.01,2);WSR12:=O<良3;DRAWICON(WSR12 AND FILTER(WSR12,12),L-0.03,9);W1:=C>REF(C,1) AND MACD<REF(MACD,1) AND MACD>0 AND V<REF(V,1);W2:=C>REF(C,1) AND MACD<0 AND MACD<REF(MACD,1) AND V<REF(V,1);XG:=W1 OR W2;VAR1:=AMOUNT/VOL/7;VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;VAR3:=SUM(AMOUNT,10)/VAR1/7;VAR4:=DMA(VAR2,VOL/VAR3);VAR5:=(CLOSE-VAR4)/VAR4*100,COLORLIMAGENTA;XG1:=CROSS(VAR5,MA(VAR5,2)) AND VAR5<0 AND C<(HHV(H,5)*0.88) ANDREF(O>C,1) AND REF(O>C,2);XG3:=XG AND XG1 AND L<良1;WSR13:=O>良3 AND L<良1 OR XG3;DRAWICON(WSR13 AND FILTER(WSR13,10),L-0.03,5);WSR14:=H>险3;DRAWICON(WSR14 AND FILTER(WSR14,15),H+0.03,6);WSR15:=H<险3 AND H>险2;DRAWICON(WSR15 AND FILTER(WSR15,5),H+0.03,4); WSR16:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3);WSR17:=(INDEXC-MA(INDEXC,8))/MA(INDEXC,8);WSR18:=(INDEXC-MA(INDEXC,18))/MA(INDEXC,18);WSR19:=(WSR16 + WSR17 + WSR18)/3;WSR20:=(C-MA(C,3))/MA(C,3);WSR21:=(C-MA(C,8))/MA(C,8);WSR22:=(C-MA(C,18))/MA(C,18);WSR23:=(WSR20 + WSR21 + WSR22)/3;WSR24:=(WSR19>REF(WSR19,1) AND CROSS(WSR23,WSR19))*50;WSR25:=(INDEXC-MA(INDEXC,6))/MA(INDEXC,6);WSR26:=(INDEXC-MA(INDEXC,12))/MA(INDEXC,12);WSR27:=(INDEXC-MA(INDEXC,24))/MA(INDEXC,24);WSR28:=(WSR25 + WSR26 + WSR27)/3;WSR29:=(C-MA(C,6))/MA(C,6);WSR30:=(C-MA(C,12))/MA(C,12);WSR31:=(C-MA(C,24))/MA(C,24);WSR32:=(WSR29 + WSR30 + WSR31)/3;WSR33:=(WSR28>REF(WSR28,1) AND CROSS(WSR32,WSR28))*20;WSR34:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR35:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR36:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR37:=(WSR34 + WSR35 + WSR36)/3;WSR38:=(C-MA(C,13))/MA(C,13);WSR39:=(C-MA(C,34))/MA(C,34);WSR40:=(C-MA(C,55))/MA(C,55);WSR41:=(WSR38 + WSR39 + WSR40)/3;WSR42:=(WSR37>REF(WSR37,1) AND CROSS(WSR41,WSR37));WSR43:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR44:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR45:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR46:=(WSR43 + WSR44 + WSR45)/3;WSR47:=(C-MA(C,30))/MA(C,30);WSR48:=(C-MA(C,60))/MA(C,60);WSR49:=(C-MA(C,90))/MA(C,90);WSR50:=(WSR47 + WSR48 + WSR49)/3;WSR51:=(WSR46>REF(WSR46,1) AND CROSS(WSR50,WSR46));WSR52:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR53:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR54:=(INDEXC-MA(INDEXC,89))/MA(INDEXC,89);WSR55:=(WSR52 + WSR53 + WSR54)/3;WSR56:=(C-MA(C,60))/MA(C,60);WSR57:=(C-MA(C,120))/MA(C,120);WSR58:=(C-MA(C,220))/MA(C,220);WSR59:=(WSR56 + WSR57 + WSR58)/3;WSR60:=(WSR59>REF(WSR59,1) AND CROSS(WSR59,WSR55));WSR61:=WSR24 OR WSR33 OR WSR42 OR WSR51 OR WSR60; {DRAWICON(WSR61 AND H<Y396 AND FILTER(WSR61,5),良3,7); DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良3,'良机');} N1:=20;N2:=10;N3:=5;STICKLINE(CLOSE>REF(CLOSE,1)*1.095 ANDCLOSE=HIGH,CLOSE,OPEN,2,1),COLOR0000FF;{涨停}STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 ANDCLOSE=LOW,CLOSE,OPEN,2,1),COLORGREEN;{跌停};GJ:=(C+H+L+O)/4;明日阻力:=L+(GJ-L)+(C-L);明日支撑:=L+(C-GJ);今日阻力:REF(明日阻力 , 1),NODRAW;今日支撑:REF(明日支撑 , 1),NODRAW;STICKLINE(ISLASTBAR AND C>=今日阻力,今日阻力,今日阻力,10,1),COLOR0000FF;STICKLINE(ISLASTBAR AND C<今日阻力,今日阻力,今日阻力,10,1),COLOR00FF00;STICKLINE(ISLASTBAR AND C>=今日支撑,今日支撑,今日支撑,10,1),COLORFF00FF;STICKLINE(ISLASTBAR AND C<今日支撑,今日支撑,今日支撑,10,1),COLORFF8800;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,CURRBARSCOUNT=GDCS1,H,1),COLORRED; DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR00FF 00,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLOR00FF 00,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,CURRBARSCOUNT=DDCS1,L,1) COLORRED;DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLOR00FF 00,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLOR00FF 00,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,CURRBARSCOUNT=LGDCS1,H,1),COLORFF 0000;DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H,LGDCS2-1),1),COLOR00 FF00,POINTDOT;DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H,LGDCS1-1),1),COLOR00 FF00,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);支撑:DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1),COLORFF 0000;ZGSTAR:=(压力+支撑)/2;ZGEND:=CONST((压力+支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORWHI TE;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);L压力:DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H,1) COLORFF0000;DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF(H,LLGDCS2-1),1),COLOR 00FF00,POINTDOT;DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF(H,LLGDCS1-1),1),COLOR 00FF00,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);L支撑:DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L,1) COLORYELLOW;LZGSTAR:=(L压力+L支撑)/2;LZGEND:=CONST((L压力+L支撑)/2);LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);L中轨:DRAWLINE(CURRBARSCOUNT=LSTARDAY,LZGSTAR,ISLASTBAR,LZGEND,1),COLOR YELLOW;{A:=DRAWLINE(LOW<=LLV(LOW,120),LOW,HHV(H,6)<=HHV(H,10),LLV(LOW,6),1) ,COLORBLUE ,LINETHICK2;}A:=(3*C+L+O+H)/6;TY:=C;本钱:=(MA(CLOSE,60)+MA(CLOSE,70)+MA(CLOSE,90)+MA(CLOSE,108))/4,COLORRE D,LINETHICK2;MA0:MA(C,0)COLORYELLOW ,LINETHICK2;K:=(C+H+L)/3;D:=MA(K,4);阻力:=HHV(D,55),COLORYELLOW,LINETHICK2;顶部:=HHV(H*0.98,55)COLORFFFFFF,LINETHICK2;DRAWICON(REF(C,1)<D AND C>D ANDD<REF(D,1),L*0.98,1),COLORYELLOW,LINETHICK2 ;{均线}TYP:= (HIGH + LOW +2* C)/4;均线:=EMA(TYP,3),LINETHICK2,COLORWHITE;均线上轨:=HHV(均线,14),LINETHICK2,COLORYELLOW;均线下轨:=LLV(均线,14),LINETHICK2,COLORGREEN;角度:=ATAN((均线/REF(均线,1)-1)*100)*180/3.1416;{K线优化}STICKLINE(CLOSE>=OPEN,HIGH,LOW,0,1 ),COLOR5B5BFF;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,2.7,0 ),COLOR0000CC;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,2,0 ),COLOR0E0EFF;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,1.2,0 ),COLOR4848FF;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0.6,0 ),COLOR7878FF;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0.1,0 ),COLORA1A1FF;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0,0 ),COLORCACAFF;STICKLINE(CLOSE< OPEN,HIGH,LOW,0,1 ),COLORCYAN;STICKLINE(CLOSE< OPEN,OPEN,CLOSE,2.7,0 ),COLOR990000;STICKLINE(CLOSE< OPEN,OPEN,CLOSE,2,0 ),COLORCC0000;STICKLINE(CLOSE< OPEN,OPEN,CLOSE,1.2,0 ),COLORFF4400;STICKLINE(CLOSE< OPEN,OPEN,CLOSE,0.6,0 ),COLORFF8800;STICKLINE(CLOSE< OPEN,OPEN,CLOSE,0.1,0 ),COLORFFCC00;STICKLINE(CLOSE< OPEN,OPEN,CLOSE,0,0 ),COLORCYAN;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5) +14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A ,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A ,18)+REF(A,20))/210;MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);CB:=EMA(X,13);买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) ANDCROSS(DX,MA(DX,2)),1,0);DRAWICON(FILTER(买=1,5),L*0.97,1);{DT1:=C>REF(C,N);DT2:=C>REF(C,M);STICKLINE(DT2,H,L,0,0),COLORRED;STICKLINE(DT2=0,H,L,0,0),COLORBLUE;STICKLINE(DT1,H,MAX(O,C),0,0),COLORRED;STICKLINE(DT1=0,L,MIN(O,C),0,0),COLORBLUE;STICKLINE(DT2,O,C,2.5,0),COLORRED;STICKLINE(DT2=0,O,C,2.5,0),COLORBLUE;STICKLINE(DT1,(O+C)/2,O,2.5,0),COLORRED;STICKLINE(DT1=0,(O+C)/2,C,2.5,0),COLORBLUE;};【通达信】神笔马良〔高点压力、阻力、支撑、均线〕-指标公式效果图 (文档来源:假设水财经社区)。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

【通达信】简单画线(总趋势、慢线、快线、高点压力)-指标公式源码
快线:EMA(EMA(EMA(EMA(CLOSE,2),2),2),2),LINETHICK2,COLOR0000FF;
慢线:EMA(REF(快线,1),2),LINETHICK2,COLOR00FFFF;
总趋
势:EMA(EMA(EMA(EMA(EMA(CLOSE,55),2),2),2),2),LINETHICK2,COLORFF00FF; HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLA Y:=0;
AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);
DRAWICON(CC,H*1.02,2);
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,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055F F,POINTDOT;
DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLO W,POINTDOT;
AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DRAWICON(CC1,L*0.98,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,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK2;
ZGSTAR:=(高点压力+低点支撑)/2;
ZGEND:=CONST((高点压力+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);

轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF55 BB,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGEN TA,POINTDOT,;
DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYAN, POINTDOT;
TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);
TYX4:=MA((C+L+O+H)/4,13);
TYX5:=EMA((C+L+O+H)/4,21);
{空心红}
STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;
STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;
{深绿}
STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR007700;
STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR005500;
STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR006600;
STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR007700;
{蓝}
STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;
STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;
STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;
STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;
{黄}
STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;
STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;
STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;
STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;
{粉红}
STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;
STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;
STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;
STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;
{亮灰}
STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;
STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;
STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;
STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;
{深红}
STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;
STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;
STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;
STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;
MA(CLOSE,3);MA(CLOSE,13);
【通达信】简单画线(总趋势、慢线、快线、高点压力)-指标公式效果图
(文档来源:若水财经社区)。

相关文档
最新文档