均线三态通达信指标公式源码

合集下载

非常实用的波段神器通达信指标公式源码

非常实用的波段神器通达信指标公式源码

非常实用的波段神器通达信指标公式源码以下是通达信指标公式的一些源码,这些指标常被视为实用的波段神器。

1.均线指标公式:MA(CLOSE,N):=AVERAGE(CLOSE,N);MA(CLOSE,N1,N2):=MA(MA(CLOSE,N1),N2);2.相对强弱指标公式(RSI):LC:=REF(CLOSE,1);RSI(CLOSE,N):=SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100;3. 动量指标公式(Momentum):MOM(CLOSE,N):=CLOSE-REF(CLOSE,N);4. 平均幅度指标公式(Average True Range, ATR):TR:=MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1)),ABS(LOW-REF(CLOSE,1))),ABS(HIGH-REF(LOW,1)));ATR(N):=MA(TR,N);5. 布林带指标公式(Bollinger Bands):MB:=MA(CLOSE,N);UP:=MB+STD(CLOSE,N)*K;DN:=MB-STD(CLOSE,N)*K;6. 弗拉基米尔指标公式(Vladimir):TYP:=(HIGH+LOW+CLOSE)/3;VOLMA(CLOSE,V):=MA(VOL,V);FRAV(TYP):=MA(TYP*(HIGH-LOW),VI);FAPT:=(FRAV(TYP)/VOLMA(CLOSE,V))/FRAV(TYP)*FRAV(VOLMA(CLOSE, VI)-VOLMA(CLOSE,V));7. 成交量指标公式(Volume):VOLMA(CLOSE,N):=MA(VOL,N);以上是一些通达信指标公式的简单示例。

请注意,这些只是指标的公式描述,实际使用中可能需要根据自己的需求进行修改和优化。

通达信指标公式源码(MA均线)主图指标

通达信指标公式源码(MA均线)主图指标

(MA均线)主图指标M5:MA(C,5),COLORWHITE;M10:MA(C,10),COLORYELLOW;M20:MA(C,20),COLORCYAN;M60:MA(C,60),COLORGREEN,LINETHICK2;M120:MA(C,120),COLORRED,LINETHICK2;TY:=C;A1:=REF(TY,10)=HHV(TY,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);HD:=FILTER(C1,10);A2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10);前期高位:REF(C,BARSLAST(HD)),COLOR8000FF,POINTDOT;STICKLINE(C,前期高位,前期高位,8,0),COLOR8000FF;JRH:=HHV(C,2);JRL:=LLV(C,2);VAR01:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));VAR02:=(REF(VAR01,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR03:=(REF(VAR02,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR04:=(REF(VAR03,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR05:=(REF(VAR04,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR06:=(REF(VAR05,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR07:=(REF(VAR06,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR08:=(REF(VAR07,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR09:=(REF(VAR08,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VARA:=(REF(VAR09,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)); 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)); VAR010:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR011:=(REF(VAR010,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR012:=(REF(VAR011,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR013:=(REF(VAR012,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR014:=(REF(VAR013,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR015:=(REF(VAR014,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR016:=(REF(VAR015,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR017:=(REF(VAR016,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR018:=(REF(VAR017,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR019:=((REF(VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,1)) AND VAR01);VAR1A:=((REF(VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,1)) AND VARD);红色持股:=VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;青色观望:=VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013 OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);今离场价:REF(离场,1),COLOR0000FF,NODRAW;明进场价:=进,COLOR33AACC,NODRAW;今进场价:REF(明进场价,1),COLORGREEN,NODRAW;上涨家数:INDEXADV,COLOR0080FF,NODRAW;下跌家数:INDEXDEC,COLORGREEN,NODRAW;DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR00FFFF;DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR00FFFF;DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0); 主力进:=(超B)+(大B),NODRAW;主力出:=(超S)+(大S),NODRAW;小散进:=(中B)+(小B),NODRAW;小散出:=(中S)+(小S),NODRAW;DAZHIV:=CONST(MAX(ABS(主力进),MAX(ABS(主力出),MAX(ABS(小散进),ABS(小散出))))),NODRAW;DRAWRECTREL(0,CONST(940-(ABS(主力进)*250/DAZHIV)),30,960,IF(CONST(主力进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(32,CONST(940-(ABS(主力出)*250/DAZHIV)),62,960,IF(CONST(主力出>0),RGB(23,125,255),RGB(255,0,0)));DRAWRECTREL(70,CONST(940-(ABS(小散进)*250/DAZHIV)),100,960,IF(CONST(小散进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(102,CONST(940-(ABS(小散出)*250/DAZHIV)),132,960,IF(CONST(小散出>0),RGB(23,125,255),RGB(255,0,0)));DRAWTEXT_FIX(CURRBARSCOUNT=1,0.0001,0.9,0,STRCAT('',CON2STR(主力进/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.033,0.9,0,STRCAT('',CON2STR(主力出/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.9,0,STRCAT('',CON2STR(小散进/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.101,0.9,0,STRCAT('',CON2STR(小散出/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,1,0,'(X10万元)'),COLOR00FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1,0,1,0,'主进出'),COLORCYAN;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.09,1,0,'散进出'),COLORCYAN;主力买力度:=LARGEINTRDVOL*1000/VOL;主力卖力度:=LARGEOUTTRDVOL*1000/VOL;AAD:=CONST(MAX(ABS(主力买力度),ABS(主力卖力度)))*4,NODRAW; DRAWRECTREL(0,515,CONST(ABS(主力买力度)*500/AAD),568,IF(CONST(主力买力度)>0,RGB(255,0,0),RGB(0,50,0)));DRAWRECTREL(0,570,CONST(ABS(主力卖力度)*500/AAD),623,IF(CONST(主力卖力度)>0,RGB(0,50,0),RGB(255,0,0)));DRAWTEXT_FIX(1,0,0.524,0,STRCAT('主买力度:',CON2STR(主力买力度,0))),COLORYELLOW;DRAWTEXT_FIX(1,0,0.576,0,STRCAT('主卖力度:',CON2STR(主力卖力度,0))),COLORYELLOW;VAR111:=ZIG(3,13);STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 <REF(VAR111,1)),CLOSE,OPEN,3,0),COLOR66FF00;DRAWTEXT_FIX(STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),CLOSE,OPEN,5,0),0.00,0.11,0,''),COLOR00FF00,LINETHICK1;VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) -LLV(LOW,5))),34));F:IF(CROSS(VAR200,MA(VAR300,5)),LOW *0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLOREE00EE;年:MA(CLOSE,22),LINETHICK2,COLORWHITE;MAA5:MA(C,5),COLORFF00FF,LINETHICK2;MAA10:=MA(C,10);MAA30:MA(C,30),COLORRED;KS:IF(MAA10>MAA30,MAA10,MAA30),COLORBLUE;A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;A4:=SMA(A3,3,1);A5:=SMA(A4,3,1);A6:=3*A4-2*A5;A7:=C-REF(C,1);A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));DRAWTEXT(FILTER(买=1,5),LOW-0.05,'↖跟党走'),COLORYELLOW; STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;STICKLINE(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95,100,0),COLORWHITE; DRAWNUMBER(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95);。

通达信指标公式源码大全

通达信指标公式源码大全

通达信指标公式源码大全Profit: EMA(EMA(EMA(High,5),5)*1.15.Color=ffffff。

LineThickness=1;Risk: EMA(EMA(High,5),5)*1.1.Color=yellow;Drawdown:EMA(MA(EMA(High,5),5),5)*1.05.Color=00FF00;Balance: EMA(EMA(EMA(High,5),5)。

Color=FF00FF。

LineThickness=1;Rebound: MA(MA(MA(High,5),5)*0.95.Color=gray。

LineThickness=1;Oversold: MA(MA(MA(Close,5),5)*0.9.Color=blue。

LineThickness=1;VAR3:=LLV(High,240);VAR4:=100*(Close-VAR3)/VAR3;VAR5:=(Close-LLV(Low,528))/(HHV(High,528)-LLV(Low,528))*100;VAR6:=(Close-LLV(Close,530))/(HHV(Close,530)-LLV(Close,530))*100;VAR7:=0;VAR8:=SMA(Max(Close-REF(Close,1),34,1)/SMA(ABS(Close-REF(Close,1)),7,1)*100;VAR9:=SMA(Max(Close-REF(Close,1),13,1)/SMA(ABS(Close-REF(Close,1)),13,1)*100;VAR10:=IF(Cross(3,16,1)=0 AND High>Low+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) ANDREF(ZIG(3,6),1)<=REF(ZIG(3,6),2) ANDREF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) ANDREF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) ANDREF(ZIG(3,22),1)<=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);Rewritten:The profit ___ (EMA) of the high price over 5 ds。

实战分析思路通达信指标公式源码

实战分析思路通达信指标公式源码

实战分析思路通达信指标公式源码通达信是中国股市中使用较为广泛的一种技术分析软件。

该软件提供了丰富的指标工具,包括均线、MACD、KDJ等等。

对于想要实战分析的投资者,了解这些指标的计算公式是非常重要的。

下面将介绍一些常用指标的计算公式和通达信源码。

1.均线(MA)指标的计算公式如下:MA(n)=(C1+C2+…+Cn)/n其中,MA(n)表示平均线的值,C1、C2、Cn分别表示n个周期内的收盘价。

通达信源码如下:_MA:MA(CLOSE,N);上述代码表示计算周期为N的收盘价的均线。

2.MACD指标的计算公式如下:DIFF = EMA(short) - EMA(long)DEA=EMA(DIFF,M)MACD=(DIFF-DEA)*2其中,EMA表示指数移动平均线,DIFF表示快线与慢线的差值,DEA 为DIFF的M周期指数移动平均,MACD为DIFF与DEA的差值的两倍。

通达信源码如下:_DIFF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);_DEA:EMA(_DIFF,M);_MACD:(_DIFF-_DEA)*2;上述代码表示计算DIFF、DEA和MACD三个指标。

3.KDJ指标的计算公式如下:RSV=(CLOSE-LOWEST(CLOSE,N))/(HIGHEST(CLOSE,N)-LOWEST(CLOSE,N))*100K=(1-a)*PREV.K+a*RSVD=(1-a)*PREV.D+a*KJ=3*K-2*D其中,RSV表示未成熟随机值,K、D、J分别表示K、D、J三条曲线的值,N为周期,a为平滑因子。

通达信源码如下:_RSV:(CLOSE-LOWEST(CLOSE,N))/(HIGHEST(CLOSE,N)-LOWEST(CLOSE,N))*100;_k1:(1-a)*REF(_k1,1)+a*_RSV;_d1:(1-a)*REF(_d1,1)+a*_k1;_j1:3*_k1-2*_d1;上述代码表示计算RSV、K、D和J四个指标。

通达信指标公式源码 本人赢钱法宝短线狙击手指标

通达信指标公式源码 本人赢钱法宝短线狙击手指标

A:=(3*C+H+L+O)/6;XJ:=(A+0.618*REF(A,1)+0.382*REF(A,2)+0.236*REF(A,3)+0.146*REF(A,4))/ 2.382;YCZXH:=(MA(HHV(A,2),5)+MA(HHV(A,2),13)+MA(HHV(A,2),21)+MA(HHV(A, 2),32))/4;YCZXL:=(MA(LLV(A,2),5)+MA(LLV(A,2),13)+MA(LLV(A,2),21)+MA(LLV(A,2),3 2))/4;SMH:EMA(YCZXH,21),COLOR004000,LINETHICK2;SML:EMA(YCZXL,21),COLOR004000,LINETHICK2;SMJ:(SML+SMH)/2,COLOR004000,LINETHICK2;PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*REF(A,5)+ 4*REF(A,6)+3*REF(A,7)+2*REF(A,8)+REF(A,9))/55;A1:=EMA(PJ,3),COLOR004000;A2:=EMA(PJ,5),COLOR004000;A3:=EMA(PJ,7),COLOR004000;A4:=EMA(PJ,9),COLOR004000;A5:=EMA(PJ,11),COLOR004000;LX:=REF(XJ,1);ZD:=(SMA(MAX(XJ-LX,0),5,1)/SMA(ABS(XJ-LX),5,1))*100;KX1:=(CLOSE>=OPEN) AND ZD>=50;KX2:=(CLOSE<OPEN) AND ZD>=50;KX3:=(CLOSE>=OPEN) AND ZD<50;KX4:=(CLOSE<OPEN) AND ZD<50;IF(A5<REF(A5,1),A5,DRAWNULL),COLOR820000,LINETHICK2;IF(A5>REF(A5,1),A5,DRAWNULL),COLOR00005B,LINETHICK2;IF(A4<REF(A4,1),A4,DRAWNULL),COLOR8C0000,LINETHICK1;IF(A4>REF(A4,1),A4,DRAWNULL),COLOR000055,LINETHICK1;IF(A3<REF(A3,1),A3,DRAWNULL),COLOR9B0000,LINETHICK1;IF(A3>REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1;IF(A2<REF(A2,1),A2,DRAWNULL),COLORBB0000,LINETHICK1;IF(A2>REF(A2,1),A2,DRAWNULL),COLOR00007D,LINETHICK1;IF(A1<REF(A1,1),A1,DRAWNULL),COLORCC0000,LINETHICK1;IF(A1>REF(A1,1),A1,DRAWNULL),COLOR00009B,LINETHICK1;AAA2:=SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0);AAA3:=SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0);AAA4:=SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0);BB1:=0;B1万元:=DVOL*DCLOSE/100;B1差:=B1万元-REF(B1万元,1);B2万元:=DVOL*DCLOSE/100;B2比:=B2万元/REF(B2万元,1);净流入万元:=(AAA2-AAA3-0.5*AAA4);PM:=MA(净流入万元,1);PMA:=PM/REF(PM,1)>1;PMB:=REF(PMA,1)<1 AND PMA;密码:=(EMA(MA(B1万元,2),2))/100000,COLORYELLOW,NODRAW;二日比:=密码/REF(密码,1);选股:=PMB AND 密码>REF(密码,1) AND 二日比>1 ,COLORRED,NODRAW; 均价线:=AMOUNT/V/100;均价线2:=MA(均价线,3);均价线5:=MA(均价线,5);均价线10:=MA(均价线,10);均价线30:=MA(均价线,30);突破:=C>均价线2 AND 均价线2<REF(均价线2,1) AND REF(均价线2,1)<REF(均价线2,2)AND REF(均价线2,2)<REF(均价线2,3) AND 选股;STICKLINE(突破,H,L,5,0),LINETHICK1,COLORRED;STICKLINE(突破,H,L,0.2,0),COLORYELLOW;STICKLINE(突破,O,C,2,0),LINETHICK1,COLORYELLOW;。

通达信指标计算公式源码大全

通达信指标计算公式源码大全

通达信指标计算公式源码大全1. 指标计算公式的概述本文档提供了通达信指标计算公式的源码大全。

在通达信软件中,指标计算公式是用于生成各种技术指标的数学计算公式。

这些指标可以帮助投资者分析市场趋势,预测股票价格的走势,以及制定投资策略。

2. 常用指标计算公式2.1 移动平均线移动平均线是最常用的技术指标之一,可以平滑价格曲线,过滤噪音,显示价格的趋势。

以下是常见的移动平均线计算公式:- 简单移动平均线(SMA)- 加权移动平均线(WMA)- 指数移动平均线(EMA)2.2 相对强弱指标(RSI)相对强弱指标是一种衡量股票价格变动强度的指标。

以下是相对强弱指标的计算公式:\[RSI = 100 - \frac{100}{1 + RS}\]\[RS = \frac{\text{N日内收盘涨幅之和}}{\text{N日内收盘跌幅之和}}\]2.3 布林带指标(BOLL)布林带指标是一种测量股票价格波动性的指标。

以下是布林带指标的计算公式:\[MB = \frac{\text{N日收盘价之和}}{N}\]\[UP = MB + k \times \text{标准差}\]\[DN = MB - k \times \text{标准差}\]\[k\] 为参数,一般取值为2。

3. 自定义指标计算公式除了常见的指标计算公式之外,通达信软件还支持自定义指标计算公式。

用户可以根据自己的需求编写和修改指标计算公式。

4. 重要提示本文档提供的指标计算公式源码仅供参考和研究使用,请在投资交易中谨慎使用,切勿盲目依赖指标计算结果。

以上是《通达信指标计算公式源码大全》的内容概述,希望对您的投资分析和技术指标计算有所帮助。

三线主图通达信指标公式源码

三线主图通达信指标公式源码

从去年开始至今,股市经过三波大幅波动。

有人称之为“股灾3.0“。

这个指标是方便您查看手中持有个股或者准备建仓个股现在的价位相对三次股灾而言到底在什么位置?是还在第三次股灾价位下徘徊?还是已经突破第三次正向第二次股灾冲锋?也可以观察个股在三次股灾中的表现,是一路毫无抵抗狂跌至今?还是曾经有过突破第二次第一次股灾高位?三条画线对照个股一目了然。

个股是强势还是弱势通过股灾的表现也可以参考参考。

红色水平线----表示第一次股灾最高价画线黄色水平线----表示第二次股灾最高价画线绿色水平线----表示第三次股灾最高价画线窗口位置红色数据----表示第一次股灾最高黄色数据----表示第二次股灾最高绿色数据----表示第三次股灾最高附件中带有一个选股分别是选出突破这三条压力线当天出票,出票后可以参考基本面消息面量能K线形态等等因素,择优选择可参与个股。

指标导入后由于取值较远,如果主图窗口可以显示数据而主图画线不显示,请按键盘上下键缩放K线取值{主图}H1:=IF(RANGE(DATE,1150501,1150701),H,DRAWNULL);第一次:REF(H1,BARSLAST(FILTERX(H1=HHV(H1,0),BARSCOUNT(C)))),COLORRED;H2:=IF(RANGE(DATE,1150701,1150901),H,DRAWNULL);第二次:REF(H2,BARSLAST(FILTERX(H2=HHV(H2,0),BARSCOUNT(C)))),COLORYELLOW; H3:=IF(RANGE(DATE,1150901,1160201),H,DRAWNULL);第三次:REF(H3,BARSLAST(FILTERX(H3=HHV(H3,0),BARSCOUNT(C)))),COLORGREEN;{选股}H1:=IF(RANGE(DATE,1150501,1150701),H,DRAWNULL);G1:=REF(H1,BARSLAST(FILTERX(H1=HHV(H1,0),BARSCOUNT(C))));H2:=IF(RANGE(DATE,1150701,1150901),H,DRAWNULL);G2:=REF(H2,BARSLAST(FILTERX(H2=HHV(H2,0),BARSCOUNT(C))));H3:=IF(RANGE(DATE,1150901,1160201),H,DRAWNULL);G3:=REF(H3,BARSLAST(FILTERX(H3=HHV(H3,0),BARSCOUNT(C))));xg:CROSS(C,G1) OR CROSS(C,G2) OR CROSS(C,G3);。

通达信指标公式源码 三线买卖(主图指标)

通达信指标公式源码 三线买卖(主图指标)

快线: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,COLORFF00F F;HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0; MADISPLAY:=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),COL OR0055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COL ORYELLOW,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),C OLORFF55BB,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COL ORMAGENTA,POINTDOT,;DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COL ORCYAN,POINTDOT;。

均线数浪及三角形通达信指标公式源码

均线数浪及三角形通达信指标公式源码

X:=30;D:=60;M5:=EMA(C,X);M10:=EMA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(CONST(M5)>CONST(M10),HHV(H,T+1),REF(HHV(H,T+1),ST));L1:=IF(CONST(M5)<CONST(M10),LLV(L,ST+1),REF(LLV(L,ST+1),T));H2:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST1-1),REF(HHV(H,T+1),ST2-1)); L3:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T1-1),REF(LLV(L,ST+1),T2-1)); TJ1:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T2) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ2:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) ANDCURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ3:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ4:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ5:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T)+1 AND CURRBARSCOUNT<=CONST(ST)+1 AND L=CONST(L1);TJ6:=CONST(M5)>CONST(M10) AND H=CONST(H1) ANDCURRBARSCOUNT<=CONST(ST2);TJ7:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST2) AND CURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ8:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ9:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ10:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ11:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST)+1 AND CURRBARSCOUNT<=CONST(T)+1 AND H=CONST(H1);TJ12:=CONST(M5)<CONST(M10) AND L=CONST(L1)ANDCURRBARSCOUNT<=CONST(T2);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=CONST(MAX(MAX(H1,H2),H3));LL:=CONST(MIN(MIN(L1,L2),L3));Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,DOTLINE;DRAWTEXT(TJ7,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z),2)),'元')),COLORGREEN;HH1:=CONST(MAX(H1,MAX(H2,H3)));LL1:=CONST(MIN(MIN(L1,L2),L3));Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,DOTLINE;DRAWTEXT(TJ1,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z1),2)),'元')),COLORMAGENTA;LT:=BARSLAST(L=LLV(L,120));CT:=CONST(LT)+1;HT:=FINDHIGHBARS(H,CT,CT,1);{HH:=FINDHIGH(H,CT,CT,1);LL:=CONST(REF(L,LT));}QD:=CURRBARSCOUNT=CT*2;ZD:=CURRBARSCOUNT=CT;DRAWLINE(QD,CONST(HH),ISLASTBAR,CONST(HH),0),COLORYELLOW;DRAWLINE(QD,CONST(HH),ZD,LL,0),COLORYELLOW;DRAWLINE(ZD,LL,ISLASTBAR,CONST(HH),0),COLORYELLOW;KT的X:=30;D:=60;M5:=EMA(C,X);M10:=EMA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),HHV(H,T+1),R EF(HHV(H,T+1),ST));L1:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),LLV(L,ST+1),RE F(LLV(L,ST+1),T));H2:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),REF(HHV(H,T+ 1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),REF(LLV(L,ST+ 1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),REF(HHV(H,T+ 1),ST1-1),REF(HHV(H,T+1),ST2-1));L3:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),REF(LLV(L,ST+ 1),T1-1),REF(LLV(L,ST+1),T2-1));TJ1:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T2,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS) ANDL=refx(L3,DATACOUNT-BARPOS);TJ2:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS) ANDH=refx(H3,DATACOUNT-BARPOS);TJ3:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST1,DATACOUNT-BARPOS) ANDL=refx(L2,DATACOUNT-BARPOS);TJ4:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T1,DATACOUNT-BARPOS) ANDH=refx(H2,DATACOUNT-BARPOS);TJ5:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T,DATACOUNT-BARPOS)+1 AND DATACOUNT-BARPOS+1<=refx(ST,DATACOUNT-BARPOS)+1 ANDL=refx(L1,DATACOUNT-BARPOS);TJ6:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND H=refx(H1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS);TJ7:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST2,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS) ANDH=refx(H3,DATACOUNT-BARPOS);TJ8:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T1,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS) ANDL=refx(L3,DATACOUNT-BARPOS);TJ9:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST1,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T1,DATACOUNT-BARPOS) ANDH=refx(H2,DATACOUNT-BARPOS);TJ10:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(ST1,DATACOUNT-BARPOS) ANDL=refx(L2,DATACOUNT-BARPOS);TJ11:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST,DATACOUNT-BARPOS)+1 AND DATACOUNT-BARPOS+1<=refx(T,DATACOUNT-BARPOS)+1 ANDH=refx(H1,DATACOUNT-BARPOS);TJ12:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND L=refx(L1,DATACOUNT-BARPOS)ANDDATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=refx(MAX(MAX(H1,H2),H3),DATACOUNT-BARPOS);LL:=refx(MIN(MIN(L1,L2),L3),DATACOUNT-BARPOS);Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,LINEDOT;DRAWTEXT(TJ7,refx(Z,DATACOUNT-BARPOS)*1,'中区价位:'+NUMTOSTR(refx(Z,DATACOUNT-BARPOS),2)+'元'),COLORGREEN;HH1:=refx(MAX(H1,MAX(H2,H3)),DATACOUNT-BARPOS);LL1:=refx(MIN(MIN(L1,L2),L3),DATACOUNT-BARPOS);Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,LINEDOT;DRAWTEXT(TJ1,refx(Z1,DATACOUNT-BARPOS)*1,'中区价位:'+NUMTOSTR(refx(Z1,DATACOUNT-BARPOS),2)+'元'),COLORMAGENTA;LT:=BARSLAST(L=LLV(L,120));CT:=refx(LT,DATACOUNT-BARPOS)+1;HT:=FINDHIGHBARS(H,CT,CT,1);HH:=FINDHIGH(H,CT,CT,1);LL:=refx(REF(L,LT),DATACOUNT-BARPOS);QD:=DATACOUNT-BARPOS+1=CT*2;ZD:=DATACOUNT-BARPOS+1=CT;DRAWLINE(QD,refx(HH,DATACOUNT-BARPOS),ISLASTBAR,refx(HH,DATACOUNT-BARPO S),0),COLORYELLOW;DRAWLINE(QD,refx(HH,DATACOUNT-BARPOS),ZD,LL,0),COLORYELLOW; DRAWLINE(ZD,LL,ISLASTBAR,refx(HH,DATACOUNT-BARPOS),0),COLORYELLOW; AA:=EMA(C,5)>EMA(C,20);BB:=EMA(C,5)<EMA(C,20);CC:= EMA(C,5)>EMA(C,10);CC1:=EMA(C,5)<EMA(C,10);DD:=C<O;STICKLINE(AA,H,L,0,0),COLORRED;STICKLINE(AA,O,C,8,1),COLORRED;STICKLINE(AA AND DD,O,C,8,0),COLORRED;STICKLINE(BB,H,L,0,0),COLORGREEN;STICKLINE(BB,O,C,8,1),COLORGREEN;STICKLINE(BB AND DD,O,C,8,0),COLORGREEN;STICKLINE(BB AND CC,H,L,0,1),COLORWHITE;STICKLINE(BB AND CC,O,C,8,1),COLORWHITE;STICKLINE(BB AND CC AND DD,O,C,8,0),COLORWHITE;STICKLINE(AA AND CC1,H,L,0,0),COLORWHITE;STICKLINE(AA AND CC1,O,C,8,1),COLORWHITE;STICKLINE(AA AND CC1 AND DD,O,C,8,0),COLORWHITE;金字塔X:=30;D:=60;M5:=EMA(C,X);M10:=EMA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),HHV(H,T+1),R EF(HHV(H,T+1),ST));L1:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),LLV(L,ST+1),RE F(LLV(L,ST+1),T));H2:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),REF(HHV(H,T+ 1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),REF(LLV(L,ST+ 1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),REF(HHV(H,T+ 1),ST1-1),REF(HHV(H,T+1),ST2-1));L3:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),REF(LLV(L,ST+ 1),T1-1),REF(LLV(L,ST+1),T2-1));TJ1:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T2,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS) ANDL=refx(L3,DATACOUNT-BARPOS);TJ2:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS) ANDH=refx(H3,DATACOUNT-BARPOS);TJ3:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST1,DATACOUNT-BARPOS) ANDL=refx(L2,DATACOUNT-BARPOS);TJ4:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(T1,DATACOUNT-BARPOS) ANDH=refx(H2,DATACOUNT-BARPOS);TJ5:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T,DATACOUNT-BARPOS)+1 ANDDATACOUNT-BARPOS+1<=refx(ST,DATACOUNT-BARPOS)+1 ANDL=refx(L1,DATACOUNT-BARPOS);TJ6:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) ANDH=refx(H1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS);TJ7:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST2,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS) ANDH=refx(H3,DATACOUNT-BARPOS);TJ8:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T1,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS) ANDL=refx(L3,DATACOUNT-BARPOS);TJ9:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST1,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T1,DATACOUNT-BARPOS) ANDH=refx(H2,DATACOUNT-BARPOS);TJ10:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(ST1,DATACOUNT-BARPOS) ANDL=refx(L2,DATACOUNT-BARPOS);TJ11:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST,DATACOUNT-BARPOS)+1 AND DATACOUNT-BARPOS+1<=refx(T,DATACOUNT-BARPOS)+1 ANDH=refx(H1,DATACOUNT-BARPOS);TJ12:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND L=refx(L1,DATACOUNT-BARPOS)ANDDATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=refx(MAX(MAX(H1,H2),H3),DATACOUNT-BARPOS);LL:=refx(MIN(MIN(L1,L2),L3),DATACOUNT-BARPOS);Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,LINEDOT;DRAWTEXT(TJ7,refx(Z,DATACOUNT-BARPOS)*1,'中区价位:'+NUMTOSTR(refx(Z,DATACOUNT-BARPOS),2)+'元'),COLORGREEN;HH1:=refx(MAX(H1,MAX(H2,H3)),DATACOUNT-BARPOS);LL1:=refx(MIN(MIN(L1,L2),L3),DATACOUNT-BARPOS);Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,LINEDOT;DRAWTEXT(TJ1,refx(Z1,DATACOUNT-BARPOS)*1,'中区价位:'+NUMTOSTR(refx(Z1,DATACOUNT-BARPOS),2)+'元'),COLORMAGENTA;HT:=BARSLAST(H=HHV(H,100));LT:=BARSLAST(L=LLV(L,100));CT:=refx(HT,DATACOUNT-BARPOS)+1;HH:=refx(REF(H,HT),DATACOUNT-BARPOS);LL:=refx(REF(L,LT),DATACOUNT-BARPOS);QD:=DATACOUNT-BARPOS-1=CT*2;ZD:=DATACOUNT-BARPOS-1=CT;DRAWLINE(QD,refx(HH,DATACOUNT-BARPOS),ISLASTBAR,refx(HH,DATACOUNT-BARPO S),0),COLORYELLOW;DRAWLINE(QD,refx(HH,DATACOUNT-BARPOS),ZD,LL,0),COLORYELLOW; DRAWLINE(ZD,LL,ISLASTBAR,refx(HH,DATACOUNT-BARPOS),0),COLORYELLOW; AA:=EMA(C,5)>EMA(C,20);BB:=EMA(C,5)<EMA(C,20);CC:= EMA(C,5)>EMA(C,10);CC1:=EMA(C,5)<EMA(C,10);DD:=C<O;STICKLINE(AA,H,L,0,0),COLORRED;STICKLINE(AA,O,C,9,1),COLORRED;STICKLINE(AA AND DD,O,C,9,0),COLORRED;STICKLINE(BB,H,L,0,0),COLORGREEN;STICKLINE(BB,O,C,9,1),COLORGREEN;STICKLINE(BB AND DD,O,C,9,0),COLORGREEN;STICKLINE(BB AND CC,H,L,0,1),COLORWHITE;STICKLINE(BB AND CC,O,C,9,1),COLORWHITE;STICKLINE(BB AND CC AND DD,O,C,9,0),COLORWHITE;STICKLINE(AA AND CC1,H,L,0,0),COLORWHITE;STICKLINE(AA AND CC1,O,C,9,1),COLORWHITE;STICKLINE(AA AND CC1 AND DD,O,C,9,0),COLORWHITE;。

通达信均线解盘指标公式

通达信均线解盘指标公式

TT:=240/FROMOPEN;比:=TT;J12:=(HIGH - ((HIGH - LOW) / 3));J23:=(LOW + ((HIGH - LOW) / 3));AAA:=CONST(HHV(H,90));BBB:=CONST(LLV(L,100));DRAWBAND(AAA,RGB(50,100,00),BBB,RGB(00,00,00));MA1:MA(CLOSE,5);MA2:MA(CLOSE,10);MA3:MA(CLOSE,20);MA4:MA(CLOSE,60);MA5:MA(CLOSE,120);DRAWKLINE(H,O,L,C);T1{早晨之星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1)< REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 ANDCLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2)),1,0));T2{黄昏之星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) > 1.03 AND REF(OPEN,1)> REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.02AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,2)),1,0));T3{长十字}:=CONST(IF((CLOSE=OPEN ANDHIGH/LOW >1.03),1,0));T4{垂死十字}:=CONST(IF((CLOSE=OPEN AND CLOSE=LOW AND CLOSE!=HIGH),1,0));T5{早晨十字星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1)< REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) ANDCLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2)),1,0));T6{黄昏十字星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) > 1.05 AND REF(OPEN,1)> REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) ANDCLOSE/OPEN<0.95 AND CLOSE<REF(CLOSE,2)),1,0));T7{射击之星}:=CONST(IF((MIN(OPEN,CLOSE)=LOW AND HIGH-LOW >3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE > MA(CLOSE,5)),1,0)); T8{倒转锤头}:=CONST(IF((MIN(OPEN,CLOSE)=LOW AND HIGH-LOW >3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5)),1,0)); T9{锤头}:=CONST(IF((HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW >3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE <MA(CLOSE,5)),1,0));T10{吊颈}:=CONST(IF((HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW >3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE>MA(CLOSE,5)),1,0)); T11{穿头破脚}:=CONST(IF(((REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.96AND CLOSE<REF(OPEN,1)AND OPEN>REF(CLOSE,1))OR (REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.04AND CLOSE>REF(OPEN,1) AND OPEN<REF(CLOSE,1))),1,0));T12{乌云盖顶}:=CONST(IF((REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.97AND OPEN>REF(CLOSE,1) AND CLOSE<REF(CLOSE,1)),1,0));T13{曙光初现}:=CONST(IF((REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.03AND OPEN<REF(CLOSE,1) AND CLOSE>REF(CLOSE,1)),1,0));T14{身怀六甲}:=CONST(IF((ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04AND ABS(CLOSE-OPEN)/CLOSE<0.005 ANDMAX(CLOSE,OPEN) < MAX(REF(CLOSE,1),REF(OPEN,1)) AND MIN(CLOSE,OPEN)> MIN(REF(CLOSE,1),REF(OPEN,1))),1,0));T15{十字胎}:=CONST(IF((ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04AND CLOSE=OPEN ANDCLOSE < MAX(REF(CLOSE,1),REF(OPEN,1)) AND CLOSE >MIN(REF(CLOSE,1),REF(OPEN,1))),1,0));T16{平顶}:=CONST(IF((ABS(HIGH-REF(HIGH,1))/HIGH<0.001)。

MACD和均量线通达信指标公式源码

MACD和均量线通达信指标公式源码

MACD和均量线通达信指标公式源码
MACD指标(Moving Average Convergence Divergence)是一种常用的技术分析指标,用于显示短期趋势与长期趋势之间的关系。

MACD指标由快速线(DIF线)、慢速线(DEA线)和柱状线组成,通达信中的MACD 指标公式如下:
```
MACD:(CLOSE-EMA(CLOSE,12))-(EMA(CLOSE,26)-EMA(CLOSE,9))
DIF:EMA(CLOSE,12)-EMA(CLOSE,26)
DEA:EMA(DIF,9)
```
其中,CLOSE表示收盘价,EMA表示指数移动平均。

均量线是一种用来反映成交量变化趋势的技术指标,通达信中的均量线公式如下:
```
VOLMA:MA(VOL,N)
```
其中,VOL表示成交量,MA表示简单移动平均,N表示计算均量线的周期。

在通达信中,用户可以通过自定义条件选股、自定义指标等功能来使用MACD和均量线等技术指标,以辅助股票交易决策。

MACD指标主要用于
判断股票价格的趋势方向,均量线则主要用于观察成交量的变化趋势,进而指导投资者进行买卖决策。

均线三态通达信指标公式源码

均线三态通达信指标公式源码

均线三态:粘合、共振、多头MA1:=MA(C,5);MA2:=MA(C,10);MA3:=IF(FINANCE(42)>=30,MA(C,30),EMA(C,30));MA4:=IF(FINANCE(42)>=60,MA(C,60),EMA(C,60));MA5:=IF(FINANCE(42)>=120,MA(C,120),EMA(C,120));MA6:=IF(FINANCE(42)>=250,MA(C,250),EMA(C,250));GZ:=MA1>REF(MA1,1) AND MA2>REF(MA2,1) AND MA3>REF(MA3,1) AND MA4>REF(MA4,1) AND MA5>REF(MA5,1) AND MA6>REF(MA6,1);DT:=MA1>MA2 AND MA2>MA3 AND MA3>MA4 AND MA4>MA5 AND MA5>MA6;均线粘合:MAX(MAX(MAX(MAX(MAX(MA1,MA2),MA3),MA4),MA5),MA6)/MIN(MIN(MIN(MIN(MIN( MA1,MA2),MA3),MA4),MA5),MA6),COLORGREEN;六线共振:BARSLASTCOUNT(GZ),COLORYELLOW,NODRAW;均线多头:BARSLASTCOUNT(DT),COLORRED,NODRAW;三线粘合:MAX(MAX(MA1,MA2),MA3)/MIN(MIN(MA1,MA2),MA3),NODRAW;四线粘合:MAX(MAX(MAX(MA1,MA2),MA3),MA4)/MIN(MIN(MIN(MA1,MA2),MA3),MA4),NODRAW; 五线粘合:MAX(MAX(MAX(MAX(MA1,MA2),MA3),MA4),MA5)/MIN(MIN(MIN(MIN(MA1,MA2),MA3) ,MA4),MA5),NODRAW;PLOYLINE(均线粘合,均线粘合),COLORGREEN;STICKLINE(均线多头,1.1,均线粘合,3,0),COLOR000088;STICKLINE(均线多头,1.1,均线粘合,2.5,0),COLOR000099;STICKLINE(均线多头,1.1,均线粘合,2,0),COLOR0000AA;STICKLINE(均线多头,1.1,均线粘合,1.5,0),COLOR0000BB;STICKLINE(均线多头,1.1,均线粘合,1.0,0),COLOR0000DD;STICKLINE(均线多头,1.1,均线粘合,0.5,0),COLOR0000FF;{//红柱}STICKLINE(均线粘合<=1.1 AND 均线多头=0 ,1.1,均线粘合,3,0),COLOR008800; STICKLINE(均线粘合<=1.1 AND 均线多头=0,1.1,均线粘合,2.5,0),COLOR00AA00; STICKLINE(均线粘合<=1.1 AND 均线多头=0,1.1,均线粘合,2,0),COLOR00BB00; STICKLINE(均线粘合<=1.1 AND 均线多头=0,1.1,均线粘合,1.5,0),COLOR00DD00; STICKLINE(均线粘合<=1.1 AND 均线多头=0,1.1,均线粘合,1,0),COLOR00FF00;{//绿柱}; STICKLINE(六线共振AND 均线多头=0,1.1,均线粘合,2,0),COLORYELLOW;。

通达信指标公式源码 个股均线

通达信指标公式源码 个股均线

长线120:MA(CLOSE,120),COLORRED;中线60:MA(CLOSE,60),COLORGREEN;中短线:EMA(C,18),POINTDOT,LINETHICK4,COLORYELLOW;短线10:MA(CLOSE,10),COLORMAGENTA;DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOU NT=1,C,3)DOTLINE;局部低点预选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;DD1:=BARSLAST(ABS(极点保留)!=1);DRAWTEXT(极点保留=1,局部极点,'卖'),COLORGREEN;DRAWTEXT(极点保留=-1,局部极点,'买'),COLORRED;。

均线数浪及三角形通达信指标公式源码

均线数浪及三角形通达信指标公式源码

X:=30;D:=60;M5:=EMA(C,X);M10:=EMA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(CONST(M5)>CONST(M10),HHV(H,T+1),REF(HHV(H,T+1),ST));L1:=IF(CONST(M5)<CONST(M10),LLV(L,ST+1),REF(LLV(L,ST+1),T));H2:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(CONST(M5)>CONST(M10),REF(HHV(H,T+1),ST1-1),REF(HHV(H,T+1),ST2-1)); L3:=IF(CONST(M5)<CONST(M10),REF(LLV(L,ST+1),T1-1),REF(LLV(L,ST+1),T2-1)); TJ1:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T2) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ2:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) ANDCURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ3:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ4:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(ST) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ5:=CONST(M5)>CONST(M10) AND CURRBARSCOUNT>=CONST(T)+1 AND CURRBARSCOUNT<=CONST(ST)+1 AND L=CONST(L1);TJ6:=CONST(M5)>CONST(M10) AND H=CONST(H1) ANDCURRBARSCOUNT<=CONST(ST2);TJ7:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST2) AND CURRBARSCOUNT<=CONST(T2) AND H=CONST(H3);TJ8:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T1) AND CURRBARSCOUNT<=CONST(ST2) AND L=CONST(L3);TJ9:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST1) AND CURRBARSCOUNT<=CONST(T1) AND H=CONST(H2);TJ10:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(T) AND CURRBARSCOUNT<=CONST(ST1) AND L=CONST(L2);TJ11:=CONST(M5)<CONST(M10) AND CURRBARSCOUNT>=CONST(ST)+1 AND CURRBARSCOUNT<=CONST(T)+1 AND H=CONST(H1);TJ12:=CONST(M5)<CONST(M10) AND L=CONST(L1)ANDCURRBARSCOUNT<=CONST(T2);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=CONST(MAX(MAX(H1,H2),H3));LL:=CONST(MIN(MIN(L1,L2),L3));Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,DOTLINE;DRAWTEXT(TJ7,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z),2)),'元')),COLORGREEN;HH1:=CONST(MAX(H1,MAX(H2,H3)));LL1:=CONST(MIN(MIN(L1,L2),L3));Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,DOTLINE;DRAWTEXT(TJ1,CONST(Z)*1.01,VARCAT(VARCAT('中区价位:',VAR2STR(CONST(Z1),2)),'元')),COLORMAGENTA;LT:=BARSLAST(L=LLV(L,120));CT:=CONST(LT)+1;HT:=FINDHIGHBARS(H,CT,CT,1);{HH:=FINDHIGH(H,CT,CT,1);LL:=CONST(REF(L,LT));}QD:=CURRBARSCOUNT=CT*2;ZD:=CURRBARSCOUNT=CT;DRAWLINE(QD,CONST(HH),ISLASTBAR,CONST(HH),0),COLORYELLOW;DRAWLINE(QD,CONST(HH),ZD,LL,0),COLORYELLOW;DRAWLINE(ZD,LL,ISLASTBAR,CONST(HH),0),COLORYELLOW;KT的X:=30;D:=60;M5:=EMA(C,X);M10:=EMA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),HHV(H,T+1),R EF(HHV(H,T+1),ST));L1:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),LLV(L,ST+1),RE F(LLV(L,ST+1),T));H2:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),REF(HHV(H,T+ 1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),REF(LLV(L,ST+ 1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),REF(HHV(H,T+ 1),ST1-1),REF(HHV(H,T+1),ST2-1));L3:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),REF(LLV(L,ST+ 1),T1-1),REF(LLV(L,ST+1),T2-1));TJ1:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T2,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS) ANDL=refx(L3,DATACOUNT-BARPOS);TJ2:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS) ANDH=refx(H3,DATACOUNT-BARPOS);TJ3:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST1,DATACOUNT-BARPOS) ANDL=refx(L2,DATACOUNT-BARPOS);TJ4:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T1,DATACOUNT-BARPOS) ANDH=refx(H2,DATACOUNT-BARPOS);TJ5:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T,DATACOUNT-BARPOS)+1 AND DATACOUNT-BARPOS+1<=refx(ST,DATACOUNT-BARPOS)+1 ANDL=refx(L1,DATACOUNT-BARPOS);TJ6:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND H=refx(H1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS);TJ7:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST2,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS) ANDH=refx(H3,DATACOUNT-BARPOS);TJ8:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T1,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS) ANDL=refx(L3,DATACOUNT-BARPOS);TJ9:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST1,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T1,DATACOUNT-BARPOS) ANDH=refx(H2,DATACOUNT-BARPOS);TJ10:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(ST1,DATACOUNT-BARPOS) ANDL=refx(L2,DATACOUNT-BARPOS);TJ11:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST,DATACOUNT-BARPOS)+1 AND DATACOUNT-BARPOS+1<=refx(T,DATACOUNT-BARPOS)+1 ANDH=refx(H1,DATACOUNT-BARPOS);TJ12:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND L=refx(L1,DATACOUNT-BARPOS)ANDDATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=refx(MAX(MAX(H1,H2),H3),DATACOUNT-BARPOS);LL:=refx(MIN(MIN(L1,L2),L3),DATACOUNT-BARPOS);Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,LINEDOT;DRAWTEXT(TJ7,refx(Z,DATACOUNT-BARPOS)*1,'中区价位:'+NUMTOSTR(refx(Z,DATACOUNT-BARPOS),2)+'元'),COLORGREEN;HH1:=refx(MAX(H1,MAX(H2,H3)),DATACOUNT-BARPOS);LL1:=refx(MIN(MIN(L1,L2),L3),DATACOUNT-BARPOS);Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,LINEDOT;DRAWTEXT(TJ1,refx(Z1,DATACOUNT-BARPOS)*1,'中区价位:'+NUMTOSTR(refx(Z1,DATACOUNT-BARPOS),2)+'元'),COLORMAGENTA;LT:=BARSLAST(L=LLV(L,120));CT:=refx(LT,DATACOUNT-BARPOS)+1;HT:=FINDHIGHBARS(H,CT,CT,1);HH:=FINDHIGH(H,CT,CT,1);LL:=refx(REF(L,LT),DATACOUNT-BARPOS);QD:=DATACOUNT-BARPOS+1=CT*2;ZD:=DATACOUNT-BARPOS+1=CT;DRAWLINE(QD,refx(HH,DATACOUNT-BARPOS),ISLASTBAR,refx(HH,DATACOUNT-BARPO S),0),COLORYELLOW;DRAWLINE(QD,refx(HH,DATACOUNT-BARPOS),ZD,LL,0),COLORYELLOW; DRAWLINE(ZD,LL,ISLASTBAR,refx(HH,DATACOUNT-BARPOS),0),COLORYELLOW; AA:=EMA(C,5)>EMA(C,20);BB:=EMA(C,5)<EMA(C,20);CC:= EMA(C,5)>EMA(C,10);CC1:=EMA(C,5)<EMA(C,10);DD:=C<O;STICKLINE(AA,H,L,0,0),COLORRED;STICKLINE(AA,O,C,8,1),COLORRED;STICKLINE(AA AND DD,O,C,8,0),COLORRED;STICKLINE(BB,H,L,0,0),COLORGREEN;STICKLINE(BB,O,C,8,1),COLORGREEN;STICKLINE(BB AND DD,O,C,8,0),COLORGREEN;STICKLINE(BB AND CC,H,L,0,1),COLORWHITE;STICKLINE(BB AND CC,O,C,8,1),COLORWHITE;STICKLINE(BB AND CC AND DD,O,C,8,0),COLORWHITE;STICKLINE(AA AND CC1,H,L,0,0),COLORWHITE;STICKLINE(AA AND CC1,O,C,8,1),COLORWHITE;STICKLINE(AA AND CC1 AND DD,O,C,8,0),COLORWHITE;金字塔X:=30;D:=60;M5:=EMA(C,X);M10:=EMA(C,D);T:=BARSLAST(CROSS(M5,M10));ST:=BARSLAST(CROSS(M10,M5));T1:=SUMBARS(T=0,2);T2:=SUMBARS(T=0,3);ST1:=SUMBARS(ST=0,2);ST2:=SUMBARS(ST=0,3);H1:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),HHV(H,T+1),R EF(HHV(H,T+1),ST));L1:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),LLV(L,ST+1),RE F(LLV(L,ST+1),T));H2:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),REF(HHV(H,T+ 1),ST),REF(HHV(H,T+1),ST1-1));L2:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),REF(LLV(L,ST+ 1),T),REF(LLV(L,ST+1),T1-1));H3:=IF(refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS),REF(HHV(H,T+ 1),ST1-1),REF(HHV(H,T+1),ST2-1));L3:=IF(refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS),REF(LLV(L,ST+ 1),T1-1),REF(LLV(L,ST+1),T2-1));TJ1:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T2,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS) ANDL=refx(L3,DATACOUNT-BARPOS);TJ2:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS) ANDH=refx(H3,DATACOUNT-BARPOS);TJ3:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST1,DATACOUNT-BARPOS) ANDL=refx(L2,DATACOUNT-BARPOS);TJ4:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(T1,DATACOUNT-BARPOS) ANDH=refx(H2,DATACOUNT-BARPOS);TJ5:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T,DATACOUNT-BARPOS)+1 ANDDATACOUNT-BARPOS+1<=refx(ST,DATACOUNT-BARPOS)+1 ANDL=refx(L1,DATACOUNT-BARPOS);TJ6:=refx(M5,DATACOUNT-BARPOS)>refx(M10,DATACOUNT-BARPOS) ANDH=refx(H1,DATACOUNT-BARPOS) ANDDATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS);TJ7:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST2,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS) ANDH=refx(H3,DATACOUNT-BARPOS);TJ8:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T1,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(ST2,DATACOUNT-BARPOS) ANDL=refx(L3,DATACOUNT-BARPOS);TJ9:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST1,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(T1,DATACOUNT-BARPOS) ANDH=refx(H2,DATACOUNT-BARPOS);TJ10:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(T,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1<=refx(ST1,DATACOUNT-BARPOS) ANDL=refx(L2,DATACOUNT-BARPOS);TJ11:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND DATACOUNT-BARPOS+1>=refx(ST,DATACOUNT-BARPOS)+1 AND DATACOUNT-BARPOS+1<=refx(T,DATACOUNT-BARPOS)+1 ANDH=refx(H1,DATACOUNT-BARPOS);TJ12:=refx(M5,DATACOUNT-BARPOS)<refx(M10,DATACOUNT-BARPOS) AND L=refx(L1,DATACOUNT-BARPOS)ANDDATACOUNT-BARPOS+1<=refx(T2,DATACOUNT-BARPOS);DRAWLINE(TJ1,L,TJ2,H,0),COLORMAGENTA;DRAWLINE(TJ2,H,TJ3,L,0),COLORMAGENTA;DRAWLINE(TJ3,L,TJ4,H,0),COLORMAGENTA;DRAWLINE(TJ4,H,TJ5,L,0),COLORMAGENTA;DRAWLINE(TJ5,L,TJ6,H,0),COLORMAGENTA;DRAWLINE(TJ7,H,TJ8,L,0),COLORGREEN;DRAWLINE(TJ8,L,TJ9,H,0),COLORGREEN;DRAWLINE(TJ9,H,TJ10,L,0),COLORGREEN;DRAWLINE(TJ10,L,TJ11,H,0),COLORGREEN;DRAWLINE(TJ11,H,TJ12,L,0),COLORGREEN;HH:=refx(MAX(MAX(H1,H2),H3),DATACOUNT-BARPOS);LL:=refx(MIN(MIN(L1,L2),L3),DATACOUNT-BARPOS);Z:=(HH-LL)/2+LL;DRAWLINE(TJ7,Z,ISLASTBAR,Z,0),COLORGREEN,LINEDOT;DRAWTEXT(TJ7,refx(Z,DATACOUNT-BARPOS)*1,'中区价位:'+NUMTOSTR(refx(Z,DATACOUNT-BARPOS),2)+'元'),COLORGREEN;HH1:=refx(MAX(H1,MAX(H2,H3)),DATACOUNT-BARPOS);LL1:=refx(MIN(MIN(L1,L2),L3),DATACOUNT-BARPOS);Z1:=(HH1-LL1)/2+LL1;DRAWLINE(TJ1,Z1,ISLASTBAR,Z1,0),COLORMAGENTA,LINEDOT;DRAWTEXT(TJ1,refx(Z1,DATACOUNT-BARPOS)*1,'中区价位:'+NUMTOSTR(refx(Z1,DATACOUNT-BARPOS),2)+'元'),COLORMAGENTA;HT:=BARSLAST(H=HHV(H,100));LT:=BARSLAST(L=LLV(L,100));CT:=refx(HT,DATACOUNT-BARPOS)+1;HH:=refx(REF(H,HT),DATACOUNT-BARPOS);LL:=refx(REF(L,LT),DATACOUNT-BARPOS);QD:=DATACOUNT-BARPOS-1=CT*2;ZD:=DATACOUNT-BARPOS-1=CT;DRAWLINE(QD,refx(HH,DATACOUNT-BARPOS),ISLASTBAR,refx(HH,DATACOUNT-BARPO S),0),COLORYELLOW;DRAWLINE(QD,refx(HH,DATACOUNT-BARPOS),ZD,LL,0),COLORYELLOW; DRAWLINE(ZD,LL,ISLASTBAR,refx(HH,DATACOUNT-BARPOS),0),COLORYELLOW; AA:=EMA(C,5)>EMA(C,20);BB:=EMA(C,5)<EMA(C,20);CC:= EMA(C,5)>EMA(C,10);CC1:=EMA(C,5)<EMA(C,10);DD:=C<O;STICKLINE(AA,H,L,0,0),COLORRED;STICKLINE(AA,O,C,9,1),COLORRED;STICKLINE(AA AND DD,O,C,9,0),COLORRED;STICKLINE(BB,H,L,0,0),COLORGREEN;STICKLINE(BB,O,C,9,1),COLORGREEN;STICKLINE(BB AND DD,O,C,9,0),COLORGREEN;STICKLINE(BB AND CC,H,L,0,1),COLORWHITE;STICKLINE(BB AND CC,O,C,9,1),COLORWHITE;STICKLINE(BB AND CC AND DD,O,C,9,0),COLORWHITE;STICKLINE(AA AND CC1,H,L,0,0),COLORWHITE;STICKLINE(AA AND CC1,O,C,9,1),COLORWHITE;STICKLINE(AA AND CC1 AND DD,O,C,9,0),COLORWHITE;。

通达信指标公式源码 超实用黑牛均线

通达信指标公式源码 超实用黑牛均线

黑牛均线~通信达主图青色为操盘线,洋红为界点线,白色为散户线操盘线上穿界点线长牛开始操盘线未上穿界点线不介入减少风险散户线下穿操盘线,止赢;上穿,重新介入买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);BU:=CROSS(买线,卖线);SEL:=CROSS(卖线,买线);DRAWICON(BU,L-0.1,1);DRAWICON(SEL,H+0.1,2);STICKLINE(买线>=卖线,LOW,HIGH,0.0,1),COLORRED; STICKLINE(买线>=卖线,CLOSE,OPEN,2,1),COLORRED; STICKLINE(买线<卖线,LOW,HIGH,0.0,1),COLORGREEN; STICKLINE(买线<卖线,CLOSE,OPEN,2,1),COLORGREEN; STICKLINE(BU,OPEN,CLOSE,2,0),COLORYELLOW; STICKLINE(SEL,OPEN,CLOSE,2,0),COLORBLUE;主力:EMA(CLOSE,10),COLORRED;散户:EMA(CLOSE,5),COLORWHITE;绿降:(46.18*EMA(CLOSE,10)-31.82*EMA(CLOSE,4))/14.36,COLORGREEN,LINET HICK1;操盘:MA(CLOSE,9),COLORCYAN,LINETHICK2;界点:MA(CLOSE,20),COLORMAGENTA;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'底背离'),COLOR0000FF;。

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

均线三态:粘合、共振、多头
MA1:=MA(C,5);
MA2:=MA(C,10);
MA3:=IF(FINANCE(42)>=30,MA(C,30),EMA(C,30));
MA4:=IF(FINANCE(42)>=60,MA(C,60),EMA(C,60));
MA5:=IF(FINANCE(42)>=120,MA(C,120),EMA(C,120));
MA6:=IF(FINANCE(42)>=250,MA(C,250),EMA(C,250));
GZ:=MA1>REF(MA1,1) AND MA2>REF(MA2,1) AND MA3>REF(MA3,1) AND MA4>REF(MA4,1) AND MA5>REF(MA5,1) AND MA6>REF(MA6,1);
DT:=MA1>MA2 AND MA2>MA3 AND MA3>MA4 AND MA4>MA5 AND MA5>MA6;
均线粘合:MAX(MAX(MAX(MAX(MAX(MA1,MA2),MA3),MA4),MA5),MA6)/MIN(MIN(MIN(MIN(MIN( MA1,MA2),MA3),MA4),MA5),MA6),COLORGREEN;
六线共振:BARSLASTCOUNT(GZ),COLORYELLOW,NODRAW;
均线多头:BARSLASTCOUNT(DT),COLORRED,NODRAW;
三线粘合:MAX(MAX(MA1,MA2),MA3)/MIN(MIN(MA1,MA2),MA3),NODRAW;
四线粘合:MAX(MAX(MAX(MA1,MA2),MA3),MA4)/MIN(MIN(MIN(MA1,MA2),MA3),MA4),NODRAW; 五线粘合:MAX(MAX(MAX(MAX(MA1,MA2),MA3),MA4),MA5)/MIN(MIN(MIN(MIN(MA1,MA2),MA3) ,MA4),MA5),NODRAW;
PLOYLINE(均线粘合,均线粘合),COLORGREEN;
STICKLINE(均线多头,1.1,均线粘合,3,0),COLOR000088;
STICKLINE(均线多头,1.1,均线粘合,2.5,0),COLOR000099;
STICKLINE(均线多头,1.1,均线粘合,2,0),COLOR0000AA;
STICKLINE(均线多头,1.1,均线粘合,1.5,0),COLOR0000BB;
STICKLINE(均线多头,1.1,均线粘合,1.0,0),COLOR0000DD;
STICKLINE(均线多头,1.1,均线粘合,0.5,0),COLOR0000FF;{//红柱}
STICKLINE(均线粘合<=1.1 AND 均线多头=0 ,1.1,均线粘合,3,0),COLOR008800; STICKLINE(均线粘合<=1.1 AND 均线多头=0,1.1,均线粘合,2.5,0),COLOR00AA00; STICKLINE(均线粘合<=1.1 AND 均线多头=0,1.1,均线粘合,2,0),COLOR00BB00; STICKLINE(均线粘合<=1.1 AND 均线多头=0,1.1,均线粘合,1.5,0),COLOR00DD00; STICKLINE(均线粘合<=1.1 AND 均线多头=0,1.1,均线粘合,1,0),COLOR00FF00;{//绿柱}; STICKLINE(六线共振AND 均线多头=0,1.1,均线粘合,2,0),COLORYELLOW;。

相关文档
最新文档