通达信指标公式源码布林线顶底
布林线顶底指标公式
布林线顶底指标公式布林线顶底指标(Bollinger Bands)是由约翰·布林格(John Bollinger)于1980年提出的一种技术分析工具,它通过利用统计学原理来刻画价格波动的趋势和波动幅度,帮助投资者评估市场的风险和机会。
布林线顶底指标的计算公式如下:- 上轨线(Upper Band)=中轨线(Moving Average)+ k * 标准差(Standard Deviation)- 中轨线(Moving Average)= N日收盘价的简单移动平均线- 下轨线(Lower Band)=中轨线(Moving Average)- k * 标准差(Standard Deviation)其中,k代表标准差的倍数,N代表计算中轨线的收盘价的天数。
布林线顶底指标的主要作用是判断价格的高低位和超买超卖情况。
当价格触及上轨线时,意味着市场处于高位,投资者可以考虑适当减仓或者观望;当价格触及下轨线时,意味着市场处于低位,投资者可以考虑适当加仓或者持有。
布林线顶底指标还可以用于判断价格的趋势和波动性。
当市场处于趋势行情时,布林线会展开;当市场处于震荡行情时,布林线会收缩。
通过观察布林线的展开和收缩,投资者可以判断市场的趋势性和波动性,并作出相应的交易策略。
值得注意的是,布林线顶底指标并不能单独作为交易的唯一依据,投资者还需要结合其他技术指标和基本面分析来进行综合判断。
此外,布林线顶底指标的参数设置也需要根据具体的市场和品种进行调整,不同的参数可能会对结果产生不同的影响。
在实际应用中,投资者可以使用专业的交易软件或者在线交易平台来绘制布林线顶底指标,并结合K线图等图表工具进行分析。
通过观察价格与布林线的相对位置、布林线的展开和收缩、以及价格的突破等情况,投资者可以更好地把握市场的走势和交易机会。
布林线顶底指标是一种常用的技术分析工具,通过利用统计学原理来刻画价格波动的趋势和波动幅度。
投资者可以根据布林线顶底指标的计算公式和相关原理,结合其他技术指标和基本面分析,来进行市场分析和交易决策。
通达信指标公式源码 布林和缠走势合并公式
布林中线:MA(CLOSE,21);布林上线:布林中线+2*STD(CLOSE,21) COLORGREEN;布林下线:布林中线-2*STD(CLOSE,21) COLORRED;局部低点预选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);局部极点A:=局部低点预选C+局部高点预选C;AAAA:IF(局部低点预选C=-1,L,IF(局部高点预选C=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;缺口判断:=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);AAAD:=IF(高保留=1 AND 低保留=-1 AND H>REF(H,REF(距前高天,1)+2),1,IF(高保留=1AND 低保留=-1 AND L<REF(L,REF(距前低天,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留+低保留,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW; DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORYELLOW; DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW;。
简单明了通达信指标公式源码
简单明了通达信指标公式源码
以下是通达信指标公式的源码(部分):
1.移动平均线(MA)
```
MA(CLOSE,N):收盘价的N日简单移动平均线
MA(C,N):C为输入数据,例如指标的参数可以是成交量、MACD柱等;
```
2.指数平滑移动平均线(EMA)
```
EMA(C,N):收盘价的N日指数平滑移动平均线
```
3.相对强弱指标(RSI)
```
RSI(C,N):C为收盘价序列,N为计算周期;
```
4. 随机相对强弱指标(StochRSI)
```
StochRSI(C, N, M1, M2): C为收盘价序列,N为计算RSI的周期,
M1为计算K值的周期,M2为计算D值的周期;
```
5.BOLL指标(布林线)
```
BOLL(CLOSE,N,P):C为收盘价序列,N为计算布林线的周期,P为布林线上下轨的标准差倍数;
```
6.指数平均数指标(EMA)
```
EMA(CLOSE,N):收盘价序列的N日指数平均数;
```
7.指数平滑异同平均线(MACD)
```
MACD(CLOSE,SHORT,LONG,M):C为收盘价序列,SHORT为快速移动平均线的时间周期,LONG为慢速移动平均线的时间周期,M为移动平均线的移动天数;
```
8.能量潮(OBV)
```
OBV(CLOSE,V):C为收盘价序列,V为成交量序列;
```
以上是通达信指标公式的部分源码,还有其他指标的源码未列出。
通达信技术指标公式源码大全
通达信技术指标公式源码大全一、简介本文档提供了通达信技术指标公式源码的大全,旨在帮助用户了解和使用通达信软件中的各种技术指标。
二、技术指标公式源码以下是一些常用的技术指标公式源码:1. 移动平均线(MA):C := CLOSE;MA(C, n)2. 相对强弱指标(RSI):LC := REF(C, 1);R := SMA(MAX(C-LC, 0), n, 1) / SMA(ABS(C-LC), n, 1) * 100;RSI := SMA(R, m, 1);3. 布林线(BOLL):MA(C, n);BOLLUP := MA(C, n) + k * STD(C, n);BOLLDOWN := MA(C, n) - k * STD(C, n);4. 动量指标(MOM):MOM := C - REF(C, n);5. 成交量指标(VOL):VOL := V;6. 相对强弱指数(RSI):RSV:=(CLOSE-LLV(LOW,M))/((HHV(HIGH,M)-LLV(LOW, M))*100);;7. 平均成交量(AVP):AVP:=(C+M+O+L)/4*V*T/F;三、使用指南使用以上的技术指标公式源码,可以在通达信软件中进行相关指标的计算和显示。
用户可以根据自己的需要,调整指标参数和相关代码,以获得所需的分析结果。
请注意,以上源码仅供参考,具体使用时需要根据实际情况进行修改和优化。
结论本文档提供了通达信技术指标公式源码的大全,希望能对用户在通达信软件中应用技术指标提供帮助。
用户可以根据实际需求,选择合适的指标公式源码进行使用。
使用多年经过实战的好指标——顶底优化通达信指标公式源码
以下是一种经过多年实战验证的顶底优化通达信指标公式的源码:```python#导入依赖库import numpy as np#定义顶底优化指标函数def tops_bottoms_optimization(close_prices, window): """顶底优化指标公式:param close_prices: 收盘价序列:param window: 窗口大小:return: 顶底优化指标值序列"""highs = np.array(close_prices)lows = np.array(close_prices)tops = np.zeros(len(close_prices))bottoms = np.zeros(len(close_prices))#计算顶部for i in range(window, len(close_prices) - window):if np.all(highs[i] > highs[i - window:i]) andnp.all(highs[i] > highs[i + 1:i + window + 1]):tops[i] = highs[i]#计算底部for i in range(window, len(close_prices) - window):if np.all(lows[i] < lows[i - window:i]) and np.all(lows[i] < lows[i + 1:i + window + 1]):bottoms[i] = lows[i]#填充非零值for i in range(len(close_prices)):if tops[i] == 0:tops[i] = tops[i - 1]if bottoms[i] == 0:bottoms[i] = bottoms[i - 1]#计算顶底优化指标值tops_bottoms_opt = (close_prices - bottoms) / (tops - bottoms)return tops_bottoms_opt#示例使用close_prices = [1, 2, 3, 4, 5, 4, 3, 2, 1]window = 2tops_bottoms_opt = tops_bottoms_optimization(close_prices, window)print(tops_bottoms_opt)```该指标的实现逻辑如下:1. 首先,将收盘价序列转化为numpy数组,分别创建保存最高价和最低价的数组tops和bottoms,并将其初始化为0。
布林买卖线通达信指标公式源码
第一张图有量无势一切成空,这种情况倒是非常适合做多超短线指标使用看看每一个信号对应位置就明白不用多说。
第二张图势为量用,一旦势成量学的一切理论都起作用。
二六三上有注解应该看的清楚,包括对庄家5个种类之一的狡庄定义。
做多超短线不仅仅用于短线,对于牛股使用初升第一阶段你就介入了一旦势成,你还会傻呼呼的放跑掉??至于截图上的指标名称可能和源码名字不一样,也是正常的,我是用内测版通达信做各种模型试验,是在虚拟硬盘中运行,经常修改,除非需要存档一般关机自动清除。
第一篇《三箭穿云定牛势》,昨夜里凌晨4点才上传的《丁蟹效应》,应该算是关于势学内容的第二篇。
这个贴算是第三篇《势为量用量为势先》。
欢迎同道回帖提供势的理论观点{主图}BOLL:MA(CLOSE,20);UB:BOLL+2*STD(CLOSE,20);LB:BOLL-2*STD(CLOSE,20);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)); 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)); 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),4,0),COLOR33DDCC;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR33EECC;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR33FFCC;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),1,0),COLOR33FFCC;DRAWTEXT(VAR19,REF(CLOSE,1),'短买'),COLOR33FFCC;VAR1A:=((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(VAR1A,REF(CLOSE,1),REF(CLOSE,2),4,0),COLORFF66FF;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORFF77FF;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORFF88FF;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),1,0),COLORFF99FF;DRAWTEXT(VAR1A,REF(CLOSE,1)+0.01,'离场'),COLORFF99FF;MA3:=MA(CLOSE,3),COLORGREEN,LINETHICK3;YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;离场:=IF(VAR1A,1,0),LINETHICK0;短买:=IF(VAR19,1,0),LINETHICK0;MA60:=MA(C,30),COLORWHITE;重心红:IF(MA60>=REF(MA60,1),MA60,DRAWNULL),COLORRED,LINETHICK3; DRAWTEXT_FIX(1,0.92,5,0,'☆何胖子版权☆'),COLORRED;DRAWTEXT_FIX(1,0.02.0.1,0,0,'☆马泰效应理想论坛技术交流专用☆'),COLORRED;{副图}VAR0:=(2*CLOSE+HIGH+LOW)/4;B:=XMA((VAR0-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,12);5,POINTDOT,COLORWHITE;20,POINTDOT,COLORF00FF0;50,POINTDOT,COLORGREEN;80,POINTDOT,COLORWHITE;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:SMA(RSV,3,1),COLORWHITE;D:SMA(K,3,1),COLORYELLOW;J:3*K-2*D,COLORMAGENTA;做多线:EMA(B,3),LINETHICK1,COLORWHITE;做空线:EMA(做多线,18),COLORCYAN,LINETHICK1;多头:=CROSS(做多线,做空线);条件1:=J>K>D;条件2:=CROSS(J,做空线) AND CROSS(K,做空线) AND CROSS(D,做空线); 做多:多头,COLORRED;DRAWICON(做多,30,1);空头:=CROSS(做空线,做多线);做空:空头,COLORGREEN;DRAWICON(做空,60,2);DRAWTEXT(做多,15,'多'),COLORRED;DRAWTEXT(做空,65,'空'),COLORGREEN;。
通达信指标公式源码顶底趋势指标
90,COLOR9966FF,LINETHICK2;80,COLOR996699;20,COLORGREEN;10,COLORCC6633,LINETHICK2;长期线:MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19)+100,COLOR9900FF; 短期线:-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))+100,COLOR888888;中期线:EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100,COLORYELLOW,LINET HICK2;见顶:(REF(中期线,1)>85 AND REF(短期线,1)>85 AND REF(长期线,1)>65) AND CROSS(长期线,短期线) ;顶部区域:(中期线<REF(中期线,1) AND REF(中期线,1)>80) AND (REF(短期线,1)>95 OR REF(短期线,2)>95 ) AND 长期线>60 AND 短期线<83.5AND 短期线<中期线AND 短期线<长期线+4;顶部:=FILTER(顶部区域,4);底部区域:(长期线<12 AND 中期线<8 AND (短期线<7.2 OR REF(短期线,1)<5) AND (中期线>REF(中期线,1) OR 短期线>REF(短期线,1)))OR (长期线<8 AND 中期线<7 AND 短期线<15 AND 短期线>REF(短期线,1)) OR (长期线<10 AND 中期线<7 AND 短期线<1) ;STICKLINE( 顶部,99,103,20,1 ),COLORRED,COLORGREEN;低位金叉:长期线<15 AND REF(长期线,1)<15 AND 中期线<18 AND 短期线>REF(短期线,1) AND CROSS(短期线,长期线) AND 短期线>中期线AND (REF(短期线,1)<5 OR REF(短期线,2)<5 ) AND (中期线>=长期线OR REF( 短期线,1)<1 ); STICKLINE( 低位金叉,0,5,11,0 ),COLORRED;。
【股票指标公式下载】[通达信] 加密的通达信布林线(源码、主图、贴图)
很多朋友在找通达信的布林线指标,今天我将源码公布N:=20;MIDA:=MA(C,N);V ART1:=POW((C-MIDA),2);V ART2:=MA(V ART1,N);V ART3:=SQRT(V ART2);UPPERA:=MIDA+2*V ART3;LOWERA:=MIDA-2*V ART3;BOLL:REF(MIDA,1);UB:REF(UPPERA,1);LB:REF(LOWERA,1);今天还有朋友要sar指标,也叫抛物线指标,网上有,今天也给朋友V AR1:=SAR(10,2,20);S:IF(V AR1>C,V AR1,DRAWNULL),COLORRED,CIRCLEDOT;X:IF(VAR1<C,V AR1,DRAWNULL),COLORGREEN,CIRCLEDOT;B1:=REF(C,1);B2:=REF(C,2);SS:=IF(C>REF(C,1) AND REF(C,1)>=REF(C,2),1,IF(C<REF(C,1) AND REF(C,1)<=REF(C,2),-1,IF(C>REF(C,2) AND REF(C,2)>REF(C,1),2,IF(C<REF(C,2) AND REF(C,2)<REF(C,1),-2,0))));SM:=IF(REF(SS,1)>0 OR REF(SS,1)<0,REF(SS,1),IF(REF(SS,2)>0 OR REF(SS,2)<0,REF(SS,2),IF(REF(SS,3)>0 OR REF(SS,3)<0,REF(SS,3),IF(REF(SS,4)>0 OR REF(SS,4)<0,REF(SS,4),IF(REF(SS,5)>0 OR REF(SS,5)<0,REF(SS,5),IF(REF(SS,6)>0 OR REF(SS,6)<0,REF(SS,6),IF(REF(SS,7)>0 OR REF(SS,7)<0,REF(SS,7),0)))))));MC:IF(REF(SS,1)>0 OR REF(SS,1)<0,B2,IF(SM>0,MIN(B1,B2),MAX(B1,B2))),COLORFF00FF;STICKLINE(SS=1 OR SM>=1 AND SS=0,B1,C,0.8,1),COLORRED;STICKLINE(SS=-1 OR SM<=-1 AND SS=0,B1,C,0.8,0),COLORFF9000;STICKLINE(SS=2,B2,C,0.8,1),COLORRED;STICKLINE(SS=-2,B2,C,0.8,0),COLORFF9000;STICKLINE((SS=-1 OR SS=-2) AND SM>0,B2,B1,0.8,1),COLORRED;STICKLINE((SS=1 OR SS=2) AND SM<0,B2,B1,0.8,0),COLORFF9000;。
趋势布林线主图指标公式
趋势布林线主图指标公式通达信趋势布林线主图指标公式源码如下:N:=5;C增比:=C/REF(C,1);C均增比:=(C增比+REF(C增比,1)+REF(C增比,2)+REF(C增比,3)+REF(C增比,4))/5;YC:=C*C均增比;强弱:=COUNT(YC>REF(YC,1),10)/COUNT(YC<REF(YC,1),10); A:=EMA(EMA(EMA(EMA(强弱,2),2),2),2);B:=EMA(EMA(EMA(EMA(强弱,5),5),5),5);快线红:EMA(EMA(EMA(EMA(YC,2),2),2),2),COLORRED,LINETHICK 2;慢线绿:EMA(EMA(EMA(EMA(YC,5),5),5),5),COLORGREEN,LINETHI CK2;STICKLINE(快线红>慢线绿,快线红,慢线绿,1,0),COLORRED; STICKLINE(快线红1.095,C,O,2,0),COLORYELLOW;UP:BOLL+2*STD(CLOSE,20),COLORGREEN;LO:BOLL-2*STD(CLOSE,20),COLORCYAN;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2); VAR2:=REF(VAR1,1) AND CLOSEREF(CLOSE,2);VAR3:=REF(VAR2,1) AND CLOSE>REF(CLOSE,1) AND CLOSEREF(CLOSE,1) AND CLOSEREF(CLOSE,1) AND CLOSEREF(CLOSE,1) AND CLOSEREF(CLOSE,1) AND CLOSEREF(CLOSE,1) AND CLOSEREF(CLOSE,1) AND CLOSEREF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR19:=REF(VARD OR VARE OR VARF OR VAR10 ORVAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 ORVAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD; MTM:=C-REF(C,1);DX1:=100*EMA(EMA(MTM,N),N)/EMA(EMA(ABS(MTM),N),N );买1:=IF(LLV(DX1,2)=LLV(DX1,7) AND COUNT(DX150,2) AND CROSS(MA(DX1,2),DX1),1,0);DRAWTEXT(FILTER(卖1=1,5),HIGH*1.02, ' '),COLOR00FF00; DRAWTEXT(FILTER(买1=1,5),LOW*0.99, ' '),COLORRED; DRAWICON(FILTER(买1=1,5),LOW*0.99,7);DRAWICON(FILTER(卖1=1,5),HIGH*1.04, 8);。
布林买卖点及变盘通达信指标源码公式
布林买卖点及变盘通达信指标源码公式1.计算中轨线(MA):中轨线是布林带的基准线,一般选择20日或者30日的移动平均线作为中轨线。
计算公式如下:MA=MA(CLOSE,N)其中,CLOSE表示收盘价,N表示选择的周期。
2.计算上轨线(UPPER)和下轨线(LOWER):上轨线和下轨线是以中轨线为基础根据标准差计算得到的。
计算公式如下:STDDEV=STD(CLOSE,N)UPPER=MA+k*STDDEVLOWER=MA-k*STDDEV其中,STDDEV表示标准差,N表示选择的周期,k表示标准差的倍数。
3.计算买入点和卖出点:根据股价穿越布林带的方式,可以进一步判断买入点和卖出点。
买入点条件:收盘价上穿下轨线(CLOSE>LOWER)卖出点条件:收盘价下穿上轨线(CLOSE<UPPER)以上就是布林买卖点指标的计算公式和判断条件。
在实际应用中,一般会根据具体的交易品种和交易周期进行参数优化,以提高策略的稳定性和盈利能力。
变盘通达信指标是在布林买卖点的基础上进行进一步改进的指标,主要用于判断股价的变盘点,即趋势的转变点。
变盘通达信指标源码公式如下:1.计算N日内连续上升天数(UP_COUNT)和N日内连续下降天数(DOWN_COUNT):UP_COUNT=IF(CLOSE>REF(CLOSE,1),REF(UP_COUNT,1)+1,0)DOWN_COUNT=IF(CLOSE<REF(CLOSE,1),REF(DOWN_COUNT,1)+1,0)其中,CLOSE表示收盘价,N表示选择的天数。
2.计算N日内涨幅(UP_RATE)和N日内跌幅(DOWN_RATE):UP_RATE=(CLOSE-REF(CLOSE,N))/REF(CLOSEDOWN_RATE=(CLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100其中,CLOSE表示收盘价,N表示选择的天数。
双布林线通达信指标公式源码
双布林线主图源码附带选股公式
这是本人已经剔除的指标,剔除的原因是不知函数STD之究里,自己另根据收盘价,重心,最低价编写出一指标代替了它,自己编写的指标知道其来龙去脉。
因此,把原来自己使用的二条布林线上轨源码奉献出来,五角星是选股指示,如果需要做成选股公式,把二条布林线冒号后面加上等于号,再把XG后面的等于号和最后一行书写文字的函数去掉即可。
另外,这里的选股公式没有另加限制性条件,自己可以酌情再添加,以便更精准一些。
下面源码直接放出。
JH:=(((H+L)/2+(C+O))/3+5*H)/6;
DBLS:ema(eMA(JH,810)+(1+540/720)*STD(JH,540),1);
xBLS:eMA(JH,270)+(1+180/270)*STD(JH,180);
XG:=(CROSS(EMA(C,3),DBLS) AND EMA(C,3)>=xBLS) OR (cross(EMA(C,3),xBLS) AND EMA(C,3)>=DBLS);
DRAWTEXT(XG=1,L*0.95,'★'),COLORRED;。
通达信指标公式源码超级精准布林线
公式源码:S:=2;P:=0;VARA:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 - 100));趋势线:=EMA(((VARA/10)+EMA(CLOSE,10)),3);VARB:=(OPEN+HIGH+LOW)/3;VARC:=EMA(VARB,4);行情线:=VARC;BUY11:=IF(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),1,0);DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.98,'▲'),COLOR0000FF;趋势线),LOW*0.97,'∣'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.975,'‖'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.96,'∣'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.97,'‖'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.95,'∣'),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.030,'∣'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.025,'‖'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.040,'∣'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.03,'‖'),COLOR00FF00;趋势线),HIGH*1.050,'∣'),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);TR1:=MAX(MAX((HIGH - LOW),ABS(REF(CLOSE,1) - HIGH)),ABS(REF(CLOSE,1) - LOW));ATR:=MA(TR1,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 BUY11=0) OR (B2=1 AND 行情线>=趋势线AND BUY11=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 BUY11=0 AND FA=0,3),LOW*0.98,'▲'),COLORFF00FF;加仓:=(B1=1 AND 行情线>=趋势线AND BUY11=0) OR (B2=1 AND 行情线>=趋势线AND BUY11=0) OR FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,Y)) AND 行情线>=趋势线AND BUY11=0 AND FA=0,3);STICKLINE(加仓,C,O,6,1),COLORFF00FF;STICKLINE(加仓,OPEN,CLOSE,4.5,1),COLORFF0099;STICKLINE(加仓,OPEN,CLOSE,3,0),COLORFF00CC;STICKLINE(加仓,OPEN,CLOSE,2,0),COLORFF00FF;VARJ1:=REF(CLOSE,1);VARJ2:=((SMA(MAX(CLOSE-VARJ1,0),6,1))/(SMA(ABS(CLOSE-VARJ1),6,1)))*(100);减仓A:=CROSS(85,VARJ2);DRAWTEXT(减仓A AND 行情线>=趋势线,HIGH*1.02,'▼'),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);DRAWTEXT(减仓B AND 行情线>=趋势线,H*1.02,'▼'),COLORYELLOW;减仓:=减仓A OR 减仓B;DRAWTEXT(FA AND BUY11=0,(LOW * 0.98),'□□'),COLOR0099FF;底背离:=FA AND BUY11=0;{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*REF(VAR 2,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(VAR2,18)+RE F(VAR2,19))/210;空头线:=EMA(多头线,4);STICKLINE(多头线>空头线,多头线,空头线,4,1),COLORYELLOW;STICKLINE(多头线<空头线,多头线,空头线,4,1),COLORCCCCCC;压制:DRAWLINE(C=HHV(C,60),HHV(H,3),C=HHV(C,30) ANDC<HHV(C,45),HHV(HIGH,1),P),COLORYELLOW;依托:DRAWLINE(L=LLV(L,60),LLV(L,3),L=LLV(L,30) ANDL>LLV(L,45),LLV(L,3),P),COLORGREEN;E:=(REF(H,S-1)+REF(L,S-1)+REF(C,S-1))/3;CRTP:=2*E+(REF(H,S-1)-2*REF(L,S-1));CRZL:=2*E-REF(L,S-1);CRZC:=2*E-REF(H,S-1);CRFZ:=2*E-(2*REF(H,S-1)-REF(L,S-1));高:=CONST(CRTP),COLORRED;阻:=CONST(CRZL),COLORC7C9FF;平:=CONST(E),COLORBLUE;支:=CONST(CRZC),COLOR7C9CFF;反:=CONST(CRFZ),COLORDD00DD;AH:DRAWLINE(S>1&&CURRBARSCOUNT=S+1,高,ISLASTBAR,高,1),COLORRED; STICKLINE(ISLASTBAR AND C>(高+阻)*0.5,高,高,22,0),COLORRED;NH:DRAWLINE(S>1&&CURRBARSCOUNT=S,阻,ISLASTBAR,阻,1),COLORC7C9FF; STICKLINE(ISLASTBAR AND C>(支+平)*0.5,阻,阻,18,0),COLORC7C9FF;CDP:DRAWLINE(S>1&&CURRBARSCOUNT=S+3,平,ISLASTBAR,平,1),COLORBLUE; STICKLINE(ISLASTBAR,平,平,27,0),COLORBLUE;NL:DRAWLINE(S>1 &&CURRBARSCOUNT=S,支,ISLASTBAR,支,1),COLOR7C9CFF; STICKLINE(ISLASTBAR AND C<(阻+平)*0.5 ,支,支,18,0),COLOR7C9CFF;AL:DRAWLINE(S>1&&CURRBARSCOUNT=S+1,反,ISLASTBAR,反,1),COLORDD00DD; STICKLINE(ISLASTBAR AND C<(反+支)*0.5,反,反,22,0),COLORDD00DD;TBP:2*REF(C,S)-REF(C,(S+2)),COLORYELLOW,NODRAW;TXR:=MAX(MAX((REF(H,S-1)-REF(L,S-1)),ABS(REF(C,S-1)-REF(H,S))),ABS(REF(C,S-1) - REF(L,S))),NODRAW;TPS:=CONST(E-TXR),NODRAW;TMB:=CONST(E+TXR),NODRAW;PS:DRAWLINE(S>1&&CURRBARSCOUNT=S+2,TPS,ISLASTBAR,TPS,S),COLORLICY AN;STICKLINE(ISLASTBAR AND C<平,TPS,TPS,25,0),COLORLICYAN;MB:DRAWLINE(S>1&&CURRBARSCOUNT=S+2,TMB,ISLASTBAR,TMB,S),COLORLIG RAY;STICKLINE(ISLASTBAR AND C>平,TMB,TMB,25,0),COLORLIGRAY;RMB:=CONST(BBI),NODRAW;RR:DRAWLINE(S>1&&CURRBARSCOUNT=2+2,RMB,ISLASTBAR,RMB,1),COLORLIR ED,CIRCLEDOT;强D:=HHV(((HIGH + REF(C,1)+REF(LOW,1))/3),17),COLORRED,{NODRAW};强K:=HHV(((HIGH+C+REF(LOW,1))/3),17),COLORYELLOW,POINTDOT{MAX(强DNODRAW};QD50:=((强D+强K)*0.5+MAX(强D,强K))*0.5;DRAWBAND(强D,RGB(0,153,0),QD50,RGB(255,0,0));弱D:=LLV(((REF(HIGH,1)+REF(C,1)+LOW)/3),17*(P+1)),COLORGREEN;弱K:=LLV(((HIGH+C+REF(LOW,1))/3),17*(P+1)),COLORYELLOW,POINTDOT;RD50:=((弱D+弱K)*0.5+MIN(弱D,弱K))*0.5;XO:=(强D+弱D)*0.5,COLORMAGENTA;DRAWBAND(弱D,RGB(255,255,53),RD50,RGB(0,102,255));。
布林线顶底指标公式
布林线顶底指标公式布林线顶底指标(Bollinger Bands)是一种常用的技术分析工具,由约翰·布林格(John Bollinger)于20世纪80年代提出。
它通过计算价格的标准差来确定价格的波动范围,从而判断市场的变化趋势和价格的超买超卖情况。
布林线顶底指标的计算公式如下:中轨线(MB)= N日的收盘价的简单移动平均线上轨线(UP)= MB + K倍的N日收盘价的标准差下轨线(DN)= MB - K倍的N日收盘价的标准差其中,N为计算中轨线所用的天数,K为计算上下轨线所用的标准差倍数。
布林线顶底指标的主要作用是判断价格的超买和超卖情况。
当价格上穿上轨线时,意味着市场处于超买状态,可能会出现价格回调或反转的信号;当价格下穿下轨线时,意味着市场处于超卖状态,可能会出现价格反弹或反转的信号。
布林线顶底指标还可以用于判断市场的趋势。
当价格位于中轨线上方时,说明市场处于上升趋势;当价格位于中轨线下方时,说明市场处于下降趋势。
此外,布林线的宽度也可以用来判断市场的波动性,宽度越大表示市场波动越大,宽度越小则表示市场波动越小。
使用布林线顶底指标时,需要注意以下几点:1. 布林线顶底指标只是一种辅助工具,不能单独作为交易的依据。
应该结合其他技术指标和市场情况进行综合分析。
2. 布林线顶底指标对于不同的市场和品种可能有不同的适用性。
在使用之前,需要根据具体情况调整参数,如N和K的取值。
3. 布林线顶底指标在市场行情剧烈波动或走势不明朗时可能失效,此时应谨慎使用或结合其他指标进行判断。
4. 布林线顶底指标并不能预测未来市场走势,只能通过对历史数据的分析来判断当前市场的情况。
总结起来,布林线顶底指标是一种常用的技术分析工具,可以用于判断价格的波动范围、超买超卖情况和市场趋势。
然而,作为一种辅助工具,它并不能单独作为交易的依据,需要结合其他指标和市场情况进行综合分析。
在使用时,应该注意调整参数、避免市场波动剧烈时的失效,并且不能过度依赖它的预测能力。
通达信指标公式源码 收口布林主图指标
{蓝灰底}买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);STICKLINE(买线>=卖线,HHV(H,60),LLV(L,60),5,0),COLOR000045; STICKLINE(买线<卖线,HHV(H,60),LLV(L,60),5,0),COLOR004500;HHH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*R EF(H,5)+14*REF(H,6)+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8* REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*R EF(H,18)+REF(H,20))/210,COLORBLUE,LINETHICK1;LLY:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF( L,5)+14*REF(L,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*RE F(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF (L,18)+REF(L,20))/210,COLORBLUE,LINETHICK1;D90H:=EMA(HHH,90),COLORRED,LINETHICK1;D90L:=EMA(LLY,90),COLORRED,LINETHICK1;DGH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*R EF(H,5)+14*REF(H,6)+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8* REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*R EF(H,18)+REF(H,20))/210,COLORBLUE,LINETHICK1;DDL:=(20*L+19*REF(L,1)+18*REF (L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*RE F(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF (L,18)+REF(L,20))/210,COLORBLUE,LINETHICK1;D90C:=D90H-D90L;D90D:=D90H+ D90C*2,COLORRED,LINETHICK1;D90T:=D90L-D90C*2,COLORRED,LINETHIC K1;G0:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),LI NETHICK1,COLORWHITE;D0:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA (XMA(L,25),25))*1,LINETHICK1,COLORWHITE;DTD:=D0>=D90T ANDG0>=D90D;KTD:=G0<=D90D AND D0<=D90T;ZDD:=D0>=D90T ANDG0<=D90D;BDD0:=(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3+XMA(XMA( H,60),60),LINETHICK2,COLORGREEN;BDT0:=XMA(XMA(L,60),60)-(XMA(XMA( H,60),60)-XMA(XMA(L,60),60))*3,LINETHICK2,COLORGREEN;STICKLINE(DTD =1,G0,D0,5,0),COLOR000066;STICKLINE(KTD=1,G0,D0,5,0),COLOR003300;S TICKLINE(ZDD=1,G0,D0,5,0),COLOR555555;ZK1:(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),COLO RAAAAAA, NODRAW;ZD1:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,COLOR AAAAAA, NODRAW;白色点多定位1:=L<ZD1 AND H>ZD1;白色点空定位1:=H>ZK1 AND L<ZK1;STICKLINE(白色点多定位1=1,L,ZD1,3,0),COLORWHITE;STICKLINE(白色点空定位1=1,H,ZK1,3,0),COLORWHITE;白色点多定位2:=H<ZD1;白色点空定位2:=L>ZK1;STICKLINE(白色点多定位2=1,L,H,0.0,0),COLORWHITE;STICKLINE(白色点多定位2=1,C,O,3,0),COLORWHITE;STICKLINE(白色点空定位2=1,L,H,0.0,0),COLORWHITE;STICKLINE(白色点空定位2=1,C,O,3,0),COLORWHITE;多头多定位:=CROSS(ZD1,L) AND DTD=1;多头平定位:=CROSS(H,ZK1) AND DTD=1 AND ZDD=0;空头空定位:=CROSS(H,ZK1) AND KTD=1;空头平定位:=CROSS(ZD1,L) AND KTD=1 AND ZDD=0;震荡多定位:=CROSS(ZD1,L) AND ZDD=1;震荡空定位:=CROSS(H,ZK1) AND ZDD=1;DRAWICON(空头平定位=1,L,3);DRAWICON(多头平定位=1,H,4);DRAWICON(多头多定位=1 OR 震荡多定位=1,L,3);DRAWICON(空头空定位=1 OR 震荡空定位=1,H,4);MID8:=(3*CLOSE+LOW+OPEN+HIGH)/6;判断1线:(20*MID8+19*REF(MID8,1)+18*REF(MID8,2)+17*REF(MID8,3)+16*REF( MID8,4)+15*REF(MID8,5)+14*REF(MID8,6)+13*REF(MID8,7)+12*REF(MID8 ,8)+11*REF(MID8,9)+10*REF(MID8,10)+9*REF(MID8,11)+8*REF(MID8,12) +7*REF(MID8,13)+6*REF(MID8,14)+5*REF(MID8,15)+4*REF(MID8,16)+3* REF(MID8,17)+2*REF(MID8,18)+REF(MID8,20))/210,COLORYELLOW;判断2线:MA(判断1线,6);DRAWBAND(判断1线,RGB(255,0,0),判断2线,RGB(0,180,0));N9:=120;KP:=BARSLAST(CURRBARSCOUNT=N9);GD:=CONST(IF(ISLASTBAR=1,HHV(H,KP),0));{高点}DDS:=CONST(IF(ISLASTBAR=1,LLV(L,KP),0));{低点}KJ:=GD-DDS;{高低点差值=分区高度}DRAWTEXT(CURRBARSCOUNT=N9/2-58,GD-KJ/12,' 【风险区】--高抛避险'),COLOR555555;DRAWTEXT(CURRBARSCOUNT=N9/2-58,GD-KJ/3.5,' 【警示区】--逢高减仓'),COLOR555555;DRAWTEXT(CURRBARSCOUNT=N9/2-58,GD-KJ/2.23,' 【突破区】--主力拉升'),COLOR555555;DRAWTEXT(CURRBARSCOUNT=N9/2-58,GD-KJ/1.82,' 【拉升区】--强势畜锐'),COLOR555555;DRAWTEXT(CURRBARSCOUNT=N9/2-58,DDS+KJ/3.5,' 【反弹中轨】--低买高休'),COLOR555555;DRAWTEXT(CURRBARSCOUNT=N9/2-58,DDS+KJ/10,' 【低吸区】--大胆买入'),COLOR555555;{大波段操作公式源码}VAR3F:=(2*CLOSE+HIGH+LOW)/4;VAR4F:=LLV(LOW,34);VAR5S:=HHV(HIGH,34);DIFF:EMA((VAR3F-VAR4F)/(VAR5S-VAR4F)*100,13), NODRAW;DEAF:EMA(0.667*REF(DIFF,1)+0.333*DIFF,2), NODRAW;DRAWTEXT(CROSS(DIFF,DEAF) AND DIFF<22,DDS+KJ/15,'谷'),COLOR006600;DRAWTEXT(CROSS(DIFF,30) AND DEAF<DIFF,DDS+KJ/3.5,'初'),COLOR888888;DRAWTEXT(CROSS(DIFF,65) AND DEAF<DIFF,GD-KJ/1.7,'中'),COLOR888888; DRAWTEXT(CROSS(DIFF,75) AND DEAF<DIFF,GD-KJ/2,'高'),COLOR009999; DRAWTEXT(CROSS(DEAF,DIFF) AND DEAF>75,GD-KJ/4.5,'峰'),COLOR006600;AAA7:=STRCAT('换手率:',CON2STR(DYNAINFO(37)*100,2));AAA8:=STRCAT('成交金额:',CON2STR(DYNAINFO(7)/100000000,2)),'(%)'; DRAWTEXT_FIX(1,0.868,0.01,0,AAA7),COLORYELLOW;DRAWTEXT_FIX(1,0.928,0.01,0,AAA8),COLORYELLOW;AAF:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);长期趋势线:=DMA((2*CLOSE+LOW+HIGH)/4,AAF);CCF:=(CLOSE/长期趋势线);MA1F:=MA(CCF*(2*CLOSE+HIGH+LOW)/4,3);MAAA:=((MA1F-长期趋势线)/长期趋势线)/3;TMP:=MA1F-MAAA*MA1F;长期趋势上升:IF(TMP>长期趋势线,长期趋势线,DRAWNULL),LINETHICK2,COLOR880066;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);{N=0 1000 30}{主图}T1U:=FINDLOWBARS(L,0,NM,1);T5:=BARSLAST(CURRBARSCOUNT=CONST(T1U)+1);D1D:REF(L,T5),COLOR00AA00,LINETHICK1;T1:=CONST(LLVBARS(LOW,10));T1HIGH:=CONST(REF(HIGH,T1));CCC:=CONST(CURRBARSCOUNT);T2G:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T1 AND HIGH>T1HIGH)); T2HIGH:=CONST(REF(HIGH,T2G));T3:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T2G AND HIGH>T2HIGH)); T3HIGH:=CONST(REF(HIGH,T3));猎击:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK2,COLOR555555;DRAWTEXT(ISLASTBAR, T3HIGH, '---------------猎击')LINETHICK1,COLOR555555;半分位:=(O+C)/2;昨半分位:=REF(半分位,1);STICKLINE(ISLASTBAR,昨半分位,昨半分位,10,0)COLORAAAA00;H分:=(H+L)/2;昨H分:=REF(H分,1);STICKLINE(ISLASTBAR,昨H分,昨H分,10,0)COLOR996600;前20内高:=HHV(C,20);昨前高:CONST(REF(前20内高,2)),COLORAAAAAA,POINTDOT;JLH:=REF(V,3)>=MA(V,3)*0.8;BP:=L>REF(O,3)*1.01 AND REF(L,1)>REF(O,3)*1.01 ANDREF(L,2)>=REF(O,3)*1.01;BJ:=REF(C,3)>REF(C,4) AND REF(C,3)>REF(O,3);AB:=BJ AND JLH AND BP;TH:=BARSLAST(AB);LLL:=IF(TH=1 OR TH=2 OR TH=3,L,9999);LTH:=BARSLAST(LLL=LLV(LLL,TH));VAR1L:=CONST(LTH)<100 AND LTH>0;VAR2L:=CONST(REF(L,LTH))=CONST(L);XGH:=VAR1L AND VAR2L AND ISLASTBAR;DRAWICON(XGH,L*0.98,1);DRAWLINE(CURRBARSCOUNT=CONST(LTH)+1,L,ISLASTBAR,REF(L,LTH),0),C OLOR00CCCC,DOTLINE;N1E:=10;N2E:=10;DISP:=2;KV:=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,KV*N1E,1);P2:=PEAK(1,KV*N1E,2);WP1:=PEAKBARS(1,KV*N1E,1);WP2:=PEAKBARS(1,KV*N1E,2);T1E:=TROUGH(2,KV*N2E,1);T2G1:=TROUGH(2,KV*N2E,2);WT1:=TROUGHBARS(2,KV*N2E,1);WT2:=TROUGHBARS(2,KV*N2E,2);TJ1:=P1>T1E AND P2>T2G1 ;ZD:=MAX(T1E,T2G1);ZG:=MIN(P1,P2);LL:=MIN(T1E,T2G1);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(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=3,ZIG(1,KV*N1E)),COLORLIBLUE;趋势低:PLOYLINE(DISP=3,ZIG(2,KV*N2E)),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(缺口判断,距前低高保留:=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) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLOR0000AA,LINETHICK4;G:=MA(C,5);D:=MA(C,10);HH8:=REF(H,5)=HHV(H,11);LL8:=REF(L,5)=LLV(L,11);FG01:=BACKSET(HH8,6)>BACKSET(HH8,5) ;FD01:=BACKSET(LL8,6)>BACKSET(LL8,5) ;FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND G>D,FG01,IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0));FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND D>G,FD01,IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0));FG0:=FG02 AND H=HHV(H,BARSLAST(FD02));FD0:=FD02 AND L=LLV(L,BARSLAST(FG02));GP:IF(FG0,H,DRAWNULL),CIRCLEDOT,COLORCYAN;DP:IF(FD0,L,DRAWNULL),CIRCLEDOT,COLORCYAN;GQ:=L>REF(H,1) AND DAY!=REF(DAY,1);DQ:=H<REF(L,1) AND DAY!=REF(DAY,1);GQL:=REF(L,BARSLAST(GQ));DQH:=REF(H,BARSLAST(DQ));FGH:=REF(H,BARSLAST(FG0));FGL:=REF(L,BARSLAST(FG0));FGH1:=REF(H,BARSLAST(FG0)+1);FGL1:=REF(L,BARSLAST(FG0)+1);FGH2:=REF(H,BARSLAST(FG0)+2);FGL2:=REF(L,BARSLAST(FG0)+2);FDH:=REF(H,BARSLAST(FD0));FDL:=REF(L,BARSLAST(FD0));FDH1:=REF(H,BARSLAST(FD0)+1);FDL1:=REF(L,BARSLAST(FD0)+1);FDH2:=REF(H,BARSLAST(FD0)+2);FDL2:=REF(L,BARSLAST(FD0)+2);FGZH:=IF(FGL<=FGL1,FGH2,FGH1);FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1));FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1)); FDZL:=IF(FDH>=FDH1,FDL2,FDL1);FG1:=FGH>FDZH AND FG0;FD1:=FDL<FGZL AND FD0;FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH;BH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) ANDL<=REF(L,1));BHG:=COUNT(BH0,BARSLAST(FD0));BHD:=COUNT(BH0,BARSLAST(FG0));BGQ:=COUNT(GQ,BARSLAST(FD0));BDQ:=COUNT(DQ,BARSLAST(FG0));BK0:=IF(BHG>0,BHG+2+老笔,IF(BHD,BHD+2+老笔,3));BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0));G1X:=(FG AND BARSLAST(FD)>BK);D1X:=(FD AND BARSLAST(FG)>BK);GPB:IF(G1X,H,DRAWNULL),CIRCLEDOT,COLOR008800,LINETHICK1; DPB:IF(D1X,L,DRAWNULL),CIRCLEDOT,COLOR008800,LINETHICK1; AQ1:=REF(V,1);AQ2:=DVOL;AQ3:=AQ2/AQ1;LNX:=AQ3-REF(AQ3,1);E1:=REF(C,1);E2:=DCLOSE;E3:=(E2-E1)/E1*100;QMX:=E3-REF(E3,1);XGG:=CROSS(LNX,500) AND CROSS(QMX,10);DRAWTEXT(XGG=1,L*0.98,'◇'),COLORCBCBC0;{波浪}PL5:=IF(PERIOD>=7,ZIG(3,1),IF(PERIOD=3,ZIG(1,2),ZIG(1,2)));{S说明:如果周月以上的选5%转向,如果日线选3%转向,如果日线以下周期选2%转向}PL10:=IF(PERIOD>=7,ZIG(3,30),IF(PERIOD=3,ZIG(1,10),ZIG(1,10)));{S说明:如果周月以上的选10%转向,如果日线选5%转向,如果日线以下周期选4%转向}PL20:=IF(PERIOD>=7,ZIG(1,10),IF(PERIOD=3,ZIG(1,30),ZIG(1,20)));{S说明:如果周月以上的选15%转向,如果日线选8%转向,如果日线以下周期选7%转向}EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) ANDREF(PL5,2)<=REF(PL5,3);EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) ANDREF(PL5,2)>=REF(PL5,3);EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) ANDREF(PL10,2)<=REF(PL10,3);EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) ANDREF(PL10,2)>=REF(PL10,3);EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) ANDREF(PL20,2)<=REF(PL20,3);EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) ANDREF(PL20,2)>=REF(PL20,3);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱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(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);DRAWTEXT(EN1 AND DTJZ5=1,L*1.02,'(A)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFFFF00; DRAWTEXT(EN2 AND ZTJZ5=1,L*1.02,'(C)'),COLORFFFF00;MID20:MA(CLOSE,20),COLOR888888,LINETHICK1;KMA:MA(CLOSE,1),POINTDOT;MID22:MA(CLOSE,22),COLORCBCBC0,LINETHICK1;UPPER:MID22+2*STD(CLOSE,20),COLOR00BBBB,LINETHICK1;LOWER:MID22-2*STD(CLOSE,20),COLORAA00BB,LINETHICK1; {STICKLINE(CLOSE,HIGH,LOW,0.1,1),COLOR0000FF;STICKLINE(CLOSE,CLOSE,CLOSE,4,1),COLOR0000FF;}RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);DD:=SMA(K,3,1);DRAWICON(CROSS(C,MID22) AND CROSS(K,DD),L-0.05,1);{共振信号为1号图标,显示红脸};A1A:=MA(C,5);A2A:=MA(C,15);A3A:=MA(C,30);A4A:=CROSS(A1A,A2A);A5A:=CROSS(A2A,A3A);A6A:=CROSS(A1A,A3A);FD11:=A1A>=MA(C,120) AND A2A>=MA(C,120);Q6:=ATAN((MA(C,120)/REF(MA(C,120),1)-1)*100)*57.3;Q7:=ATAN((MA(C,250)/REF(MA(C,250),1)-1)*100)*57.3;麻花:A6A AND COUNT(A4A,3)>=1 AND COUNT(A5A,3)>=1 AND FD11 ANDQ6>0 AND Q7>0,NODRAW;DRAWTEXT(麻花,MID22,'麻花'),COLORYELLOW;中轨:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;上轨:=中轨+3*STD(中轨,13);下轨:=中轨-3*STD(中轨,13);收口大小:=(上轨-中轨)/中轨*100;XD:=上轨>=REF(上轨,1) AND 下轨>=REF(下轨,1);XE:=FILTER(XD=1 AND EXIST(收口大小<2.1,2) AND C>=REF(C,1)*0.981,7); XF:=XD=1 AND EXIST(收口大小<2.1,2) AND C>=REF(C,1)*0.981;XF2:=EXIST(XD=1,3) AND 收口大小<2 AND C>=中轨ANDC>=REF(C,1)*0.981;收口:XF OR XF2,NODRAW;DRAWTEXT(收口,LOWER,'I');P:CROSS(收口,0.1) AND REF(C,1)<=MID22 AND REF(C,2)<=MID22,NODRAW; DRAWTEXT(P,MID22,'I'),LINETHICK2;Q:CROSS(收口,0.1) AND CROSS(MID22*1.001,REF(L,1)),NODRAW; DRAWTEXT(Q,UPPER,'I');{钱袋指标}VAR113:=HHV(HIGH,60);VAR114:=LLV(LOW,30);VAR115:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;VAR116:=(VAR113+VAR114+VAR115)/3;VAR117:=EMA(VAR116,5);K01:=EMA(VAR117,5)*2, COLORFF00FF;D01:=EMA(K01,5), COLORWHITE;J01:=K01*3-D01*2, COLORYELLOW;ENTERLONG:=CROSS(K01,D01);EXITLONG:=CROSS(D01,K01);B01:=(DRAWICON((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)),L*0.98,1))*D01*2/3;B02:=IF(TROUGHBARS(3,15,1)=1 AND HIGH>LOW+0.01,20,0);必买:=(B01 AND B02);DRAWICON(必买,L*0.98,38);VAR2X:=TROUGHBARS(3,15,1)<10;VAR3X:=PEAKBARS(3,15,1)<10;VAR4X:=IF(VAR2X=1,50,0);底部:=IF(VAR4X=50,10,0);多头能量:=0;买入J:=IF(底部=10 AND REF(底部,1)=10 AND REF(底部,2)=0,50,0); {买入延迟线:底部,LINETHICK1 ,COLOR00CCFF;}DRAWTEXT(买入J=50,L*0.98,'●'),COLORWHITE;HJ_1A:=CLOSE>REF(CLOSE,4);HJ_2A:=BARSLASTCOUNT(HJ_1A);HJ_3A:=HJ_2A=9;HJ_4A:=HJ_2A=13;HJ_5A:=HJ_2A=18;HJ_6A:=ISLASTBAR AND BETWEEN(HJ_2A,1,8);HJ_7A:=ISLASTBAR AND BETWEEN(HJ_2A,10,12);HJ_8A:=ISLASTBAR AND BETWEEN(HJ_2A,14,17);HJ_9A:=(BACKSET(HJ_4A>0,13) OR BACKSET(HJ_3A>0,9) OR BACKSET(HJ_5A>0,18) OR BACKSET(HJ_6A>0,HJ_2A) ORBACKSET(HJ_7A>0,HJ_2A) OR BACKSET(HJ_8A>0,HJ_2A))*HJ_2A; DRAWTEXT(HJ_9A>0 ANDHJ_9A<18,HIGH*1.01,VAR2STR(HJ_9A,0)),COLOR555555; DRAWTEXT(HJ_9A>0 AND (HJ_2A=9 OR HJ_2A=13 ORHJ_2A=18),HIGH*1.01,VAR2STR(HJ_9A,0)),COLOR009900;HJ_10A:=CLOSE<REF(CLOSE,4);HJ_11A:=BARSLASTCOUNT(HJ_10A);HJ_12A:=HJ_11A=9;HJ_13A:=HJ_11A=13;HJ_14A:=HJ_11A=18;HJ_15A:=ISLASTBAR AND BETWEEN(HJ_11A,1,8);HJ_16A:=ISLASTBAR AND BETWEEN(HJ_11A,10,12);HJ_17A:=ISLASTBAR AND BETWEEN(HJ_11A,14,17);HJ_18A:=(BACKSET(HJ_12A>0,9) OR BACKSET(HJ_13A>0,13) OR BACKSET(HJ_14A>0,18) OR BACKSET(HJ_15A>0,HJ_11A) OR BACKSET(HJ_16A>0,HJ_11A) OR BACKSET(HJ_17A>0,HJ_11A))*HJ_11A; DRAWTEXT(HJ_18A>0 ANDHJ_18A<18,LOW*0.99,VAR2STR(HJ_18A,0)),COLOR555555;DRAWTEXT(HJ_18A>0 AND (HJ_11A=9 OR HJ_11A=13 OR HJ_11A=18),LOW*0.99,VAR2STR(HJ_18A,0)),COLOR990099; 操:=MA(C,5);分界:HHV(操,13),LINETHICK1,COLORAAAAAA,DOTLINE;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
这个是几年前优化过的一个自己常用主图指标,由于我们水平有限未来函数的问题始终没有解决了,但是用着依然是优于系统自带的boll,发上来指标编辑高手可以去尝试去掉未来函数,未来函数确实是害人但是知道了以后,避开它我感觉也没有多么大的杀伤力,指标是死的人是活的,不能过分的依赖指标去炒股票,只能够作为参考而已
布林中线:MA(CLOSE,21);
布林上线:布林中线+2*STD(CLOSE,21) COLORGREEN;
布林下线:布林中线-2*STD(CLOSE,21) COLORRED;
局部低点预选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);
局部极点A:=局部低点预选C+局部高点预选C;
AAAA:IF(局部低点预选C=-1,L,IF(局部高点预选C=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;
缺口判断:=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);
AAAD:=IF(高保留=1 AND 低保留=-1 AND H>REF(H,REF(距前高天,1)+2),1,IF(高保留=1 AND 低保留=-1 AND L<REF(L,REF(距前低天,1)+2),-1,0));
极点保留:=IF(AAAD=0,高保留+低保留,AAAD);
局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW; DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORBLUE;
DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORBLUE;。