通达信20日均线买卖主图源码通达信指标源码

合集下载

买卖明确通达信指标公式源码

买卖明确通达信指标公式源码

买卖明确通达信指标公式源码通达信指标是国内最常用的股票技术指标之一,被广泛用于股票市场的分析和交易。

以下是一些常见的通达信指标的源码。

1.移动平均线(MA)移动平均线是股票市场中最常用的技术指标之一,用于平滑价格走势。

以下是通达信中计算简单移动平均线的源码:```pythondef MA(close, n):ma = []for i in range(n-1):ma.append(None)for i in range(n-1, len(close)):sum = 0for j in range(n):sum += close[i-j]ma.append(sum/n)return ma```2.相对强弱指标(RSI)相对强弱指标用于测量价格走势的强弱程度,可以帮助判断股票是否超买或超卖。

以下是通达信中计算相对强弱指标的源码:```pythondef RSI(close, n):rsi = []for i in range(n-1):rsi.append(None)for i in range(n-1, len(close)):up_sum = 0down_sum = 0for j in range(n):if close[i-j] > close[i-j-1]:up_sum += close[i-j] - close[i-j-1]elif close[i-j] < close[i-j-1]:down_sum += close[i-j-1] - close[i-j]if up_sum + down_sum == 0:rsi.append(50)else:rsi.append(100 * up_sum / (up_sum + down_sum))return rsi```3.指数移动平均线(EMA)指数移动平均线是对价格走势进行指数加权平均的技术指标,可以反映价格走势的动态变化。

以下是通达信中计算指数移动平均线的源码:```pythondef EMA(close, n):ema = []k=2/(n+1)for i in range(n-1):ema.append(None)ema.append(close[n-1])for i in range(n, len(close)):ema.append((1-k)*ema[i-1] + k*close[i])return ema```4.随机指标(KDJ)随机指标是通过比较最高价、最低价和收盘价来反映价格走势强弱的技术指标。

通达信指标公式源码超准超准的买卖指标

通达信指标公式源码超准超准的买卖指标

通达信指标公式源码超准超准的买卖指标通达信是国内股市行情软件中比较常用的一个,其中包含了很多常用的指标,包括MACD、RSI、KDJ等等。

下面列举几个常用的指标的源码:1.MACD指标:其中包含了两个变量:参数快线天数和参数慢线天数。

```MA1:=(CLOSE-REF(CLOSE,参数快线天数))/(参数快线天数-1);DIF:=(CLOSE-REF(CLOSE,参数慢线天数))/(参数慢线天数-1);DEA:EMA(DIF,参数横坐标);MACD:(REF(DIF-DEA,1)*2));```2.RSI指标:参数N代表计算RSI的周期。

```LC:=REF(CLOSE,1);AA:=CLOSE-LC;AVG1:=SMA(IF(AA>0,AA,0),参数N,1);AVG2:=SMA(IF(AA<0,-AA,0),参数N,1);RSI:100-100/(1+AVG1/AVG2);```3.KDJ指标:参数N代表计算KDJ的周期,参数M1和参数M2分别代表K线的移动平均线的周期。

```LC:=REF(CLOSE,1);HD:=HHV(HIGH,参数N);LD:=LLV(LOW,参数N);RSV:=(CLOSE-LD)*100/(HD-LD);K:SMA(RSV,参数M1,1);D:SMA(K,参数M2,1);J:3*K-2*D;```以上是部分常用指标的源码,其中还有很多其他指标的源码未一一列举。

这些指标的使用可以帮助投资者进行技术分析,辅助股票的买卖决策。

但需要注意的是,指标仅仅是辅助工具,不能单独作为投资的决策依据,投资者在使用指标的同时,还需要结合其他的市场因素进行综合分析。

买卖明确通达信指标公式源码

买卖明确通达信指标公式源码

买卖明确通达信指标公式源码
1.移动平均线(MA):
移动平均线是股票技术分析中常用的指标之一,计算股票收盘价的n
日平均值。

在通达信中,计算n日移动平均线的公式源码如下:MA(CLOSE,N):REF(MA(CLOSE,N),1)*(N-1)/N+CLOSE/N;
其中CLOSE表示收盘价,N表示移动平均的周期。

2.相对强弱指标(RSI):
相对强弱指标是衡量股票市场上涨和下跌压力的指标,计算公式如下:LC:=REF(CLOSE,1);
RSI:SMA(MAX(A,0),N,1)/SMA(ABS(A),N,1)*100;
其中A表示当日股价与前一日的差值,N表示RSI的计算周期。

3.随机指标(KDJ):
随机指标是一种超买超卖指标,计算公式如下:
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
J:3*K-2*D;
其中LLV表示最低价的最小值,HHV表示最高价的最大值,N表示计
算KDJ的周期,而M1和M2表示计算KDJ的平滑周期。

4.平均真实波幅(ATR):
平均真实波幅是一种衡量股票波动性的指标,计算公式如下:TR1=MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1)));
ATR:MA(TR1,M);
其中TR1表示真实波幅,M表示计算ATR的周期。

通达信布林买卖点主图公式源码

通达信布林买卖点主图公式源码

通达信布林买卖点主图公式源码用这个做短线操作还是不错的,开盘在当天买入价上方开盘买入,盘中出现买入先观望,尾盘还有买入信号尾盘买入,开盘提示卖,主导动能指标绿色,开盘就卖,盘中出现卖出信号时,也要看主导动能,如果是绿色,就执行{买卖点}JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;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,2));<="" p=""> 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);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);红色持股:VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB ORVARC,COLOR0000FF,NODRAW;卖:=IF(红色持股,JRL,DRAWNULL);明卖价:=卖,COLORFF99FF,NODRAW;今卖价:REF(卖,1)COLOR0000FF,NODRAW;青色观望:VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:REF(明进场价,1),COLORYELLOW,NODRAW;买:VAR19,COLOR33AACC,NODRAW;品红卖:VAR1A,COLORFF99FF,NODRAW;急速超跌:(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORFFFFFF,NODRAW;上市日期年:REF(YEAR,BARSCOUNT(CLOSE)-1),NODRAW,COLOR0000FF;月:REF(MONTH,BARSCOUNT(CLOSE)-1),NODRAW,COLORFF00FF;日:REF(DAY,BARSCOUNT(CLOSE)-1),NODRAW,COLOR00FFFF;STICKLINE(ISLASTBAR AND (红色持股OR REF(红色持股,1)=1),今卖价,今卖价,30,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (青色观望OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<o,l,h,0,0),color999900;< p="">STICKLINE(1,C,O,3.5,0),COLOR858500;STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5;STICKLINE(红色持股,CLOSE,O,2.8,0),COLOR000055;STICKLINE(红色持股,CLOSE,O,2,0),COLOR000088;STICKLINE(红色持股,CLOSE,O,1.5,0),COLOR0000AA;STICKLINE(红色持股,CLOSE,O,1,0),COLOR0000CC;STICKLINE(红色持股,CLOSE,O,0.5,0),COLOR0000EE;STICKLINE(青色观望,CLOSE,O,2.8,0),COLOR555500;STICKLINE(青色观望,CLOSE,O,2,0),COLOR888800;STICKLINE(青色观望,CLOSE,O,1.5,0),COLORAAAA00;STICKLINE(青色观望,CLOSE,O,1,0),COLORCCCC00;STICKLINE(青色观望,CLOSE,O,0.5,0),COLOREEEE00;CO:=(C-O);STICKLINE(急速超跌,O,C-CO/2,2.8,0),COLOR555555;STICKLINE(急速超跌,O,C-CO/2,2,0),COLOR888888;STICKLINE(急速超跌,O,C-CO/2,1.5,0),COLORAAAAAA;STICKLINE(急速超跌,O,C-CO/2,1,0),COLORCCCCCC;STICKLINE(急速超跌,O,C-CO/2,0.5,0),COLOREEEEEE;STICKLINE(买,O,O+CO/3,2.8,0),COLOR335555; STICKLINE(买,O,O+CO/3,2,0),COLOR338888; STICKLINE(买,O,O+CO/3,1.5,0),COLOR33AAAA; STICKLINE(买,O,O+CO/3,1,0),COLOR33CCCC; STICKLINE(买,O,O+CO/3,0,0),COLOR33EEEE; DRAWICON(买,REF(CLOSE,1),1),COLORYELLOW; DRAWTEXT(买,REF(CLOSE,1),' 买'),COLORYELLOW; STICKLINE(品红卖,O,O+CO/3,2.8,0),COLOR550055; STICKLINE(品红卖,O,O+CO/3,2,0),COLOR880088; STICKLINE(品红卖,O,O+CO/3,1.5,0),COLORAA00AA; STICKLINE(品红卖,O,O+CO/3,1,0),COLORCC00CC; STICKLINE(品红卖,O,O+CO/3,0.5,0),COLOREE00EE; DRAWICON(品红卖,REF(CLOSE,1)+0.1,2),COLORGREEN; DRAWTEXT(品红卖,REF(CLOSE,1)+0.1,' 卖'),COLORGREEN; {布林-M}{参数N: 2 250 20 }MID:=MA(C,N);VARTA:=POW((C-MID),2); VARTB:=MA(VARTA,N); VARTC:=SQRT(VARTB); UPPER:=MID+2*VARTC; LOWER:=MID-2*VARTC;BOLL:REF(MID,1),COLORWHITE; UB:REF(UPPER,1),COLORYELLOW; LB:REF(LOWER,1),COLORMAGENTA; </o,l,h,0,0),color999900;<>。

BS买卖通达信指标公式源码

BS买卖通达信指标公式源码
出bbuy买入出ssell卖出红色k线红色持有绿色k线绿色休息
使用方法: 出 B(buy)买入,出 S(sell)卖出,红色(K 线红色)持有,绿色(K 线绿色)休息。 说明: 实话实说,BS 主图买卖指标还是益盟的好,不信不行。
BS 买卖指标源码-通达信主图
P1(0,10000,5,1); P2(0,10000,10,1); P3(0,10000,20,1); P4(0,10000,30,1); P5(0,10000,60,1); P6(0,10000,250,1);
ቤተ መጻሕፍቲ ባይዱ
MA1:MA(CLOSE,P1); MA2:MA(CLOSE,P2); MA3:MA(CLOSE,P3); MA4:MA(CLOSE,P4); MA5:MA(CLOSE,P5); MA6:MA(CLOSE,P6); VAR1:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14)))); VAR2:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14)))); VAR3:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34)); DIR1:=ABS(CLOSE-REF(CLOSE,5)); VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
STICKLINE(VAR2<MA(VAR3,6),LOW,HIGH,0,1); STICKLINE(VAR2>MA(VAR3,6),LOW,HIGH,0,1),COLORRED; STICKLINE(((OPEN>CLOSE)AND(VAR2<MA(VAR3,6))),(CLOSE-0.03),OPEN,2.9,0),COLOR CYAN; STICKLINE(((OPEN<CLOSE)AND(VAR2<MA(VAR3,6))),CLOSE,OPEN,2.9,1),COLORCYAN; STICKLINE(((OPEN>CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,(CLOSE-0.03),2.9,0),COLOR RED; STICKLINE(((OPEN<CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,CLOSE,2.9,1),COLORRED; DRAWICON(CROSS(VAR2,MA(VAR3,2)),(LOW-(LOW*0.02)),7); DRAWICON(CROSS(MA(VAR3,2),VAR1),(HIGH+(HIGH*0.02)),8);

买卖强主图通达信指标公式源码

买卖强主图通达信指标公式源码

此指标在出现'★'时买进后再等到出现“卖”时卖出必有丰厚的回报;黄柱出现时买进一路持有至绿柱时卖出,不要理会一时的得失,做足波段。

N:=20;N1:=7;N2:=69;T1:=IF((DATE<=1341231),1,0);M3:=EMA(CLOSE,3);M8:EMA(CLOSE,8),COLOR008000;M13:EMA(M8,13),COLOR0000FF;M62:EMA(M8,55),COLORF0F000;VAR1:=EMA(M13,62);M81:EMA(M62,81),COLOR00FFFF;M144:EMA(VAR1,144),LINETHICK2,COLOR0000FF;M250:EMA(VAR1,250),POINTDOT,LINETHICK2,COLORF00FF0;VAR2:=(CLOSE+HIGH+LOW)/(3);VAR3:=(EMA(VAR2,10))*(T1);VAR4:=(REF(VAR3,1))*(T1);STICKLINE((VAR3>VAR4),VAR3,VAR4,4,0),COLOR00FFFF;STICKLINE((VAR3<VAR4),VAR3,VAR4,4,0),COLORFF0000;VAR5:=((REF(HIGH,1)+REF(LOW,1))/(2))*(T1);VAR6:=MA(CLOSE,N)+((2)*(STD(CLOSE,N)))*(T1);DRAWTEXT(CROSS(VAR3,VAR4),(VAR3)*(0.98),'★'),COLOR00FFFF;DRAWTEXT(CROSS(VAR5,VAR6),(HIGH)*(1.04),'↓卖'),COLOR008000;VAR7:=REF(CLOSE,1);VAR8:=((SMA(MAX(CLOSE-VAR7,0),N1,1))/(SMA(ABS(CLOSE-VAR7),N1,1)))*(100); VAR9:=CROSS(N2,VAR8);VARA:=(FILTER(VAR9,4))*(T1);DRAWTEXT(VARA,(HIGH)*(1.04),'↓卖'),COLORFFFFFF;VARB:=((2)*(CLOSE)+HIGH+LOW)/(4);VARC:=LLV(LOW,34);VARD:=HHV(HIGH,34);VARE:=(EMA(((VARB-VAR1)/(VAR5-VAR1))*(100),7))*(T1);VARF:=(EMA((0.667)*(REF(VARE,1))+(0.333)*(VARE),5))*(T1);DRAWTEXT(IF(((COUNT((CLOSE<REF(CLOSE,1)),8))/(8)>0.6) AND (VOL>=(1.5)*(MA(VOL,5))) AND COUNT((VARE>=VARF),3) AND (REF(LOW,1)=LLV(LOW,120)),1,0),LOW,'●买进'),COLORFF00FF;DRAWTEXT(IF(((COUNT((CLOSE<REF(CLOSE,1)),13))/(13)>0.6) AND COUNT((VARE>VARF),6) AND (REF(LOW,5)=LLV(LOW,120)) AND REF((CLOSE>=OPEN),4) AND REF((CLOSE>OPEN),3) AND REF((CLOSE>OPEN),2) AND REF((OPEN>CLOSE),1) AND (OPEN>REF(CLOSE,1)),1,0),LOW,'●买进'),COLOR00FFFF;VAR10:=(MA(CLOSE,80)-(MA(CLOSE,10))/(3))*(T1);DRAWTEXT(IF((CLOSE<VAR10) AND ((VOL)/(240)>(MA(VOL,5))/(240)) AND (CLOSE>(REF(CLOSE,1))*(1.08)) AND (CLOSE<(MA(CLOSE,13))*(1.3)),1,0),LOW,'●抄底'),COLOR0000FF;。

通达信布林买卖点主图公式源码

通达信布林买卖点主图公式源码

用这个做短线操作还是不错的,开盘在当天买入价上方开盘买入,盘中出现买入先观望,尾盘还有买入信号尾盘买入,开盘提示卖,主导动能指标绿色,开盘就卖,盘中出现卖出信号时,也要看主导动能,如果是绿色,就执行{买卖点}JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;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);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);红色持股:VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;卖:=IF(红色持股,JRL,DRAWNULL);明卖价:=卖,COLORFF99FF,NODRAW;今卖价:REF(卖,1)COLOR0000FF,NODRAW;青色观望:VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:REF(明进场价,1),COLORYELLOW,NODRAW;买:VAR19,COLOR33AACC,NODRAW;品红卖:VAR1A,COLORFF99FF,NODRAW;急速超跌:(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORFFFFFF,NODRAW;上市日期年:REF(YEAR,BARSCOUNT(CLOSE)-1),NODRAW,COLOR0000FF;月:REF(MONTH,BARSCOUNT(CLOSE)-1),NODRAW,COLORFF00FF;日:REF(DAY,BARSCOUNT(CLOSE)-1),NODRAW,COLOR00FFFF;STICKLINE(ISLASTBAR AND (红色持股OR REF(红色持股,1)=1),今卖价,今卖价,30,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (青色观望OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<O,L,H,0,0),COLOR999900;STICKLINE(1,C,O,3.5,0),COLOR858500;STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5;STICKLINE(红色持股,CLOSE,O,2.8,0),COLOR000055;STICKLINE(红色持股,CLOSE,O,2,0),COLOR000088;STICKLINE(红色持股,CLOSE,O,1.5,0),COLOR0000AA;STICKLINE(红色持股,CLOSE,O,1,0),COLOR0000CC;STICKLINE(红色持股,CLOSE,O,0.5,0),COLOR0000EE;STICKLINE(青色观望,CLOSE,O,2.8,0),COLOR555500;STICKLINE(青色观望,CLOSE,O,2,0),COLOR888800;STICKLINE(青色观望,CLOSE,O,1.5,0),COLORAAAA00;STICKLINE(青色观望,CLOSE,O,1,0),COLORCCCC00;STICKLINE(青色观望,CLOSE,O,0.5,0),COLOREEEE00;CO:=(C-O);STICKLINE(急速超跌,O,C-CO/2,2.8,0),COLOR555555;STICKLINE(急速超跌,O,C-CO/2,2,0),COLOR888888;STICKLINE(急速超跌,O,C-CO/2,1.5,0),COLORAAAAAA;STICKLINE(急速超跌,O,C-CO/2,1,0),COLORCCCCCC;STICKLINE(急速超跌,O,C-CO/2,0.5,0),COLOREEEEEE;STICKLINE(买,O,O+CO/3,2.8,0),COLOR335555; STICKLINE(买,O,O+CO/3,2,0),COLOR338888; STICKLINE(买,O,O+CO/3,1.5,0),COLOR33AAAA; STICKLINE(买,O,O+CO/3,1,0),COLOR33CCCC; STICKLINE(买,O,O+CO/3,0,0),COLOR33EEEE; DRAWICON(买,REF(CLOSE,1),1),COLORYELLOW; DRAWTEXT(买,REF(CLOSE,1),' 买'),COLORYELLOW; STICKLINE(品红卖,O,O+CO/3,2.8,0),COLOR550055; STICKLINE(品红卖,O,O+CO/3,2,0),COLOR880088; STICKLINE(品红卖,O,O+CO/3,1.5,0),COLORAA00AA; STICKLINE(品红卖,O,O+CO/3,1,0),COLORCC00CC; STICKLINE(品红卖,O,O+CO/3,0.5,0),COLOREE00EE; DRAWICON(品红卖,REF(CLOSE,1)+0.1,2),COLORGREEN; DRAWTEXT(品红卖,REF(CLOSE,1)+0.1,' 卖'),COLORGREEN; {布林-M}{参数N: 2 250 20 }MID:=MA(C,N);VARTA:=POW((C-MID),2);VARTB:=MA(VARTA,N);VARTC:=SQRT(VARTB);UPPER:=MID+2*VARTC;LOWER:=MID-2*VARTC;BOLL:REF(MID,1),COLORWHITE;UB:REF(UPPER,1),COLORYELLOW;LB:REF(LOWER,1),COLORMAGENTA;。

通达信指标公式源码 精准的K线主图公式源码

通达信指标公式源码 精准的K线主图公式源码

BBI:(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;MA(C,N1);MA(C,N2);MA(C,N3),LINETHICK2;MA(C,N4),COLORLIRED,LINETHICK2; 买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);中:=(MA(CLOSE,30)+MA(C,72))/2,COLOR999999,LINETHICK0;HLY1:=中*1.1,POINTDOT,COLOR999999,LINETHICK0;VAR61:=(CLOSE*2+HIGH+LOW)/4;VAR62:=EMA(VAR61,3);VAR63:=EMA(VAR62,6);L1:=EMA(VAR61,3),LINETHICK0;L2:=EMA(VAR62,4),LINETHICK0;L3:=EMA(VAR63,5),LINETHICK0;{正常上涨}STICKLINE(C>=O,H,L,0,0 ),COLOR0000FF; {红色}STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3.2,0) ,COLOR000055;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2.6,0) ,COLOR000077;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.9,0) ,COLOR000099;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.1,0) ,COLOR0000BB;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.2,0) ,COLOR0000FF; {STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.2,0) ,COLOR0000EE;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.4,0) ,COLOR0000FF;}{正常下跌}STICKLINE(OPEN>=CLOSE,H,L,0,0 ),COLORFFFF00; {天蓝}STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3.2,0 ),COLORFF5500;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.6,0 ),COLORFF7700;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.9,0 ),COLORFF9900;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.1,0 ),COLORFFBB00;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.2,0 ),COLORFFDD00; {STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.2,0 ),COLORFFEE00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.4,0 ),COLORFFFF00;}{整理下跌区}{STICKLINE(L1<L2,H,LOW,0 ,0 ),COLORFFFFFF;{灰色}{STICKLINE(L1<L2,CLOSE ,OPEN,3.0,0 ),COLOR555555;STICKLINE(L1<L2,CLOSE ,OPEN,2.5,0 ),COLOR777777;STICKLINE(L1<L2,CLOSE ,OPEN,1.9,0 ),COLOR999999;STICKLINE(L1<L2,CLOSE ,OPEN,1.2,0 ),COLORBBBBBB;STICKLINE(L1<L2,CLOSE ,OPEN,0.4,0 ),COLORDDDDDD;}{STICKLINE(L1<L2,CLOSE ,OPEN,3,0 ),COLORFFEE00;STICKLINE(L1<L2,CLOSE ,OPEN,2,0 ),COLORFFFF00;}{下跌开始}VAR44:=REF(L1,1)>L1 AND L1>L2;STICKLINE(VAR44,H,LOW,0,0 ),COLORFF0000; {蓝色}{STICKLINE(VAR44,CLOSE,OPEN,3.0,0) ,COLOR550000;STICKLINE(VAR44,CLOSE,OPEN,2.5,0) ,COLOR660000;}STICKLINE(VAR44,CLOSE,OPEN,3.2,0) ,COLOR660000;STICKLINE(VAR44,CLOSE,OPEN,2.6,0) ,COLORAA0000;STICKLINE(VAR44,CLOSE,OPEN,1.9,0) ,COLOREE1100;STICKLINE(VAR44,CLOSE,OPEN,1.1,0) ,COLORFF3300;STICKLINE(VAR44,CLOSE,OPEN,0.2,0) ,COLORFF5500;{顶部钝化区}STICKLINE((CLOSE >= HLY1),H,LOW,0 ,0),COLORFF00FF;{粉色}STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,3.2,0),COLOR770077;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,2.6,0),COLORAA00AA;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,1.9,0),COLORDD00DD;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,1.1,0),COLORFF22FF;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,0.2,0),COLORFF66FF;{STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,3,0),COLORFFDDFF;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,2,0),COLORFFEEFF;}{单边下跌}STICKLINE(买线<卖线,H,LOW,0,0 ),COLOR00FF00; {绿色}STICKLINE(买线<卖线,CLOSE ,OPEN,3.2,0),COLOR004400;STICKLINE(买线<卖线,CLOSE ,OPEN,2.6,0),COLOR005500;STICKLINE(买线<卖线,CLOSE ,OPEN,1.9,0),COLOR007700;STICKLINE(买线<卖线,CLOSE ,OPEN,1.1,0),COLOR009900;STICKLINE(买线<卖线,CLOSE ,OPEN,0.2,0),COLOR00CC00;{STICKLINE(买线<卖线,CLOSE ,OPEN,3,0),COLOR00DD00;STICKLINE(买线<卖线,CLOSE ,OPEN,2,0),COLOR00FF00;}{向上变盘}STICKLINE(CROSS(买线,卖线),H,L,0,0),COLOR0033DD;{橘黄}STICKLINE(CROSS(买线,卖线),C,OPEN,3.2,0),COLOR000077;STICKLINE(CROSS(买线,卖线),C,OPEN,2.6,0),COLOR003399;STICKLINE(CROSS(买线,卖线),C,OPEN,1.9,0),COLOR0033DD;STICKLINE(CROSS(买线,卖线),C,OPEN,1.1,0),COLOR0055FF;STICKLINE(CROSS(买线,卖线),C,OPEN,0.2,0),COLOR0099FF;{向下变盘}STICKLINE(CROSS(卖线,买线),H,L,0,0),COLOR00FFFF;{黄色}STICKLINE(CROSS(卖线,买线),C,OPEN,3.2,0),COLOR008888;STICKLINE(CROSS(卖线,买线),C,OPEN,2.6,0),COLOR00AAAA;STICKLINE(CROSS(卖线,买线),C,OPEN,1.9,0),COLOR00CCCC;STICKLINE(CROSS(卖线,买线),C,OPEN,1.1,0),COLOR00EEEE;STICKLINE(CROSS(卖线,买线),C,OPEN,0.2,0),COLOR44FFFF;N1,N2,N3,N4:分别为:5,10,30,60。

通达信指标公式源码回踩20均线主图 选股 副图

通达信指标公式源码回踩20均线主图 选股 副图

回踩20均线主图选股副图这个指标是应几个同学要求,说20线是生命线,很多庄家都喜欢打压回踩到这个地方在启动。

我的思路1 K线上穿20均线后必须有一波涨幅大于N%,然后再回调。

2 K线不能远离均线太远,或者区间涨幅不能太大翻倍了的票容易站岗。

3 20线趋势整体向上4 回踩这根K线形成单针。

主图M20:MA(C,20),COLORGREEN,LINETHICK2;A:=H/MAX(C,O);B:=MAX(C,O)/MIN(C,O);D:=MIN(C,O)/L;T:=BARSLAST(CROSS(C,M20));HH:=HHVBARS(H,T+1);LL:=FINDLOWBARS(L,HH=0,T+1,1);HC:=REF(C,HH);LC:=REF(C,LL+1);ZF:=(HC-LC)/LC*100;TJ:=B>A AND D>B AND B>A;TJ1:=M20>=REF(M20,1) AND L*0.98>M20;TJ2:=RANGE(L/M20,0.95,1.01) AND MIN(C,O)>=M20;TJ3:=TJ AND TJ2;TJ4:=EVERY(C>=M20,T+1);NH:=HHV(MAX(C,O)/M20,T+1);XG:=REF(TJ1,2) AND TJ3 AND ZF>15 AND TJ4 AND T>9 AND NH<1.11; STICKLINE(XG,H,L,0,1),COLORGREEN;STICKLINE(XG,C,O,3.2,0),COLOR006600;STICKLINE(XG,C,O,2.6,0),COLOR008800;STICKLINE(XG,C,O,1.9,0),COLOR00AA00;STICKLINE(XG,C,O,1.1,0),COLOR00CC00;STICKLINE(XG,C,O,0.3,0),COLOR00FF00;DRAWICON(XG,L*0.94,16);幅图M20:=MA(C,20);A:=H/MAX(C,O);B:=MAX(C,O)/MIN(C,O);D:=MIN(C,O)/L;T:=BARSLAST(CROSS(C,M20));HH:=HHVBARS(H,T+1);LL:=FINDLOWBARS(L,HH=0,T+1,1);HC:=REF(C,HH);LC:=REF(C,LL+1);ZF:=(HC-LC)/LC*100;TJ:=B>A AND D>B AND B>A;TJ1:=M20>=REF(M20,1) AND L*0.98>M20;TJ2:=RANGE(L/M20,0.95,1.01) AND MIN(C,O)>=M20;TJ3:=TJ AND TJ2;TJ4:=EVERY(C>=M20,T+1);NH:=HHV(MAX(C,O)/M20,T+1);XG:=REF(TJ1,2) AND TJ3 AND ZF>15 AND TJ4 AND T>9 AND NH<1.11; STICKLINE(XG,0,8,3.2,0),COLOR006600;STICKLINE(XG,0,8,2.6,0),COLOR008800;STICKLINE(XG,0,8,1.9,0),COLOR00AA00;STICKLINE(XG,0,8,1.1,0),COLOR00CC00;STICKLINE(XG,0,8,0.3,0),COLOR00FF00;选股M20:=MA(C,20);A:=H/MAX(C,O);B:=MAX(C,O)/MIN(C,O);D:=MIN(C,O)/L;T:=BARSLAST(CROSS(C,M20));HH:=HHVBARS(H,T+1);LL:=FINDLOWBARS(L,HH=0,T+1,1);HC:=REF(C,HH);LC:=REF(C,LL+1);ZF:=(HC-LC)/LC*100;TJ:=B>A AND D>B AND B>A;TJ1:=M20>=REF(M20,1) AND L*0.98>M20;TJ2:=RANGE(L/M20,0.95,1.01) AND MIN(C,O)>=M20;TJ3:=TJ AND TJ2;TJ4:=EVERY(C>=M20,T+1);NH:=HHV(MAX(C,O)/M20,T+1);XG:REF(TJ1,2) AND TJ3 AND ZF>15 AND TJ4 AND T>9 AND NH<1.11;这个公式如果喜欢短线或者喜欢出票多一点就将最后一句去掉and NH<1.1;将三个公式中的xg这一句换成XG:REF(TJ1,2) AND TJ3 AND ZF>15 AND TJ4 AND T>9;或者不动源码直接删掉and nh<1.1 就行了。

通达信指标公式源码移动筹码分布主图指标

通达信指标公式源码移动筹码分布主图指标

使用方法:公式的左上角写明的不同周期内量和价的情况。

如果背景色是红色,预示着对应周期内的均线指标会上涨。

如果背景颜色是绿色,预示着对应周期内均线指标会下跌。

只有当对应周期内的价和量都预示为上涨或者都预示为下跌的时候。

才会在右边出现文字,提示这条均价线是助长涨(支撑),还是领跌(压力)的作用。

DRAWTEXT(CURRBARSCOUNT=5,HIGH*1.01,'5日');{DRAWLINE(扣抵5,C,C,MA(C,5),0),COLORWHITE,LINETHICK2;} DRAWTEXT(CURRBARSCOUNT=10,HIGH*1.01,'10日');{DRAWLINE(扣抵10,C,C, MA(C,10),0),COLORYELLOW,LINETHICK2;} DRAWTEXT(CURRBARSCOUNT=20,HIGH*1.01,'20日');{DRAWLINE(扣抵20,C,C, MA(C,20),0),COLORMAGENTA,LINETHICK2;} DRAWTEXT(CURRBARSCOUNT=60,HIGH*1.01,'60日');{DRAWLINE(扣抵60,C,C, MA(C,60),0),COLORRED,LINETHICK2;} DRAWTEXT(CURRBARSCOUNT=120,HIGH*1.01,'120日');{DRAWLINE(扣抵120,C,C, MA(C,120),0),COLORGRAY,LINETHICK2;} DRAWTEXT(CURRBARSCOUNT=250,HIGH*1.01,'250日');{DRAWLINE(扣抵250,C,C, MA(C,250),0),COLORBLUE,LINETHICK2;} {DRAWICON(CURRBARSCOUNT=5,HIGH,14);DRAWICON(CURRBARSCOUNT=10,HIGH,14);DRAWICON(CURRBARSCOUNT=20,HIGH,14);DRAWICON(CURRBARSCOUNT=60,HIGH,14);DRAWICON(CURRBARSCOUNT=120,HIGH,14);DRAWICON(CURRBARSCOUNT=250,HIGH,14);}MA5:MA(CLOSE,5);MA10:MA(CLOSE,10);MA20:MA(CLOSE,20);MA60:MA(CLOSE,60);MA120:MA(CLOSE,120);MA250:MA(CLOSE,250);DRAWRECTREL(0,0,240,350,RGB(0,0,1));DRAWTEXT_FIX(C>0,0.04 ,0.07,1,'当前情况:'),COLORYELLOW; DRAWTEXT_FIX(C>0,0.04 ,0.11,1,'005日扣抵:'),COLORYELLOW; DRAWTEXT_FIX(C>0,0.04 ,0.15,1,'010日扣抵:'),COLORYELLOW; DRAWTEXT_FIX(C>0,0.04 ,0.19,1,'020日扣抵:'),COLORYELLOW; DRAWTEXT_FIX(C>0,0.04 ,0.23,1,'060日扣抵:'),COLORYELLOW; DRAWTEXT_FIX(C>0,0.04 ,0.27,1,'120日扣抵:'),COLORYELLOW; DRAWTEXT_FIX(C>0,0.005 ,0.090,0,'----------------------------------------------------------------------------------------'),COLORGRAY;DRAWTEXT_FIX(C>0,0.065 ,0.03,1,'价(元)'),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>0,0.065 ,0.07,1,VAR2STR(C,2)),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,4),0.065 ,0.11,1,VAR2STR(REF(C,4),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,4),0.065 ,0.11,1,VAR2STR(REF(C,4),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,4),0.065 ,0.11,1,VAR2STR(REF(C,4),2)),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,9),0.065 ,0.15,1,VAR2STR(REF(C,9),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,9),0.065 ,0.15,1,VAR2STR(REF(C,9),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,9),0.065 ,0.15,1,VAR2STR(REF(C,9),2)),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,19),0.065 ,0.19,1,VAR2STR(REF(C,19),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,19),0.065 ,0.19,1,VAR2STR(REF(C,19),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,19),0.065 ,0.19,1,VAR2STR(REF(C,19),2)),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,59),0.065 ,0.23,1,VAR2STR(REF(C,59),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,59),0.065 ,0.23,1,VAR2STR(REF(C,59),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,59),0.065 ,0.23,1,VAR2STR(REF(C,59),2)),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,119),0.065 ,0.27,1,VAR2STR(REF(C,119),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,119),0.065 ,0.27,1,VAR2STR(REF(C,119),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,119),0.065 ,0.27,1,VAR2STR(REF(C,119),2)),COLORGREEN; VART1:=ABS((C-REF(C,4)))*100/C,NODRAW;VART1_1:=IF(VART1>999,999.9,VART1),NODRAW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,4),0.09 ,0.11,1,STRCAT(VAR2STR(VART1_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,4),0.09 ,0.11,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,4),0.09 ,0.11,1,STRCAT(VAR2STR(VART1_1,1),'%')),COLORGREEN; VART2:=ABS((C-REF(C,9)))*100/C,NODRAW;VART2_1:=IF(VART2>999,999.9,VART2),NODRAW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,9),0.09 ,0.15,1,STRCAT(VAR2STR(VART2_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,9),0.09 ,0.15,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,9),0.09 ,0.15,1,STRCAT(VAR2STR(VART2_1,1),'%')),COLORGREEN; VART3:=ABS((C-REF(C,19)))*100/C,NODRAW;VART3_1:=IF(VART3>999,999.9,VART3),NODRAW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,19),0.09 ,0.19,1,STRCAT(VAR2STR(VART3_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,19),0.09 ,0.19,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,19),0.09 ,0.19,1,STRCAT(VAR2STR(VART3_1,1),'%')),COLORGREEN ;VART4:=ABS((C-REF(C,59)))*100/C,NODRAW;VART4_1:=IF(VART4>999,999.9,VART4),NODRAW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,59),0.09 ,0.23,1,STRCAT(VAR2STR(VART4_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,59),0.09 ,0.23,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,59),0.09 ,0.23,1,STRCAT(VAR2STR(VART4_1,1),'%')),COLORGREEN ;VART5:=ABS((C-REF(C,119)))*100/C,NODRAW;VART5_1:=IF(VART5>999,999.9,VART5),NODRAW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>REF(C,119),0.09 ,0.27,1,STRCAT(VAR2STR(VART5_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC=REF(C,119),0.09 ,0.27,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC<REF(C,119),0.09 ,0.27,1,STRCAT(VAR2STR(VART5_1,1),'%')),COLORGREE N;DRAWTEXT_FIX(C>0,0.12 ,0.03,1,'量(万)'),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDC>0,0.12 ,0.07,1,VAR2STR(V/10000,2)),COLORYELLOW;TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60, IF(PERIOD=5,TOTALFZNUM,1))))),NODRAW;MTIME:=MOD(FROMOPEN,TOTAL),NODRAW;CTIME:=IF(MTIME<0.5,TOTAL,MTIME),NODRAW;VVOL:=IF((CURRBARSCOUNT=1 ANDDYNAINFO(8)>1),VOL*(TOTAL+3)/(CTIME+3),0),NODRAW; DRAWTEXT_FIX(C>0,0.18 ,0.03,1,'虚拟量(万)'),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDVVOL>0,0.18 ,0.07,1,VAR2STR(VVOL/10000,2)),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,4),0.12 ,0.11,1,VAR2STR(REF(V/10000,4),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,4),0.12 ,0.11,1,VAR2STR(REF(V/10000,4),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,4),0.12 ,0.11,1,VAR2STR(REF(V/10000,4),2)),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,9),0.12 ,0.15,1,VAR2STR(REF(V/10000,9),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,9),0.12 ,0.15,1,VAR2STR(REF(V/10000,9),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,9),0.12 ,0.15,1,VAR2STR(REF(V/10000,9),2)),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,19),0.12 ,0.19,1,VAR2STR(REF(V/10000,19),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,19),0.12 ,0.19,1,VAR2STR(REF(V/10000,19),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,19),0.12 ,0.19,1,VAR2STR(REF(V/10000,19),2)),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,59),0.12 ,0.23,1,VAR2STR(REF(V/10000,59),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,59),0.12 ,0.23,1,VAR2STR(REF(V/10000,59),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,59),0.12 ,0.23,1,VAR2STR(REF(V/10000,59),2)),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,119),0.12 ,0.27,1,VAR2STR(REF(V/10000,119),2)),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,119),0.12 ,0.27,1,VAR2STR(REF(V/10000,119),2)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,119),0.12 ,0.27,1,VAR2STR(REF(V/10000,119),2)),COLORGREEN; VART21:=ABS((V-REF(V,4)))*100/V;VART21_1:=IF(VART21>999,999.9,VART21),NODRAW;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,4),0.155 ,0.11,1,STRCAT(VAR2STR(VART21_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,4),0.155 ,0.11,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,4),0.155 ,0.11,1,STRCAT(VAR2STR(VART21_1,1),'%')),COLORGREE N;VART22:=ABS((V-REF(V,9)))*100/V;VART22_1:=IF(VART22>999,999.9,VART22);DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,9),0.155 ,0.15,1,STRCAT(VAR2STR(VART22_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,9),0.155 ,0.15,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,9),0.155 ,0.15,1,STRCAT(VAR2STR(VART22_1,1),'%')),COLORGREE N;VART23:=ABS((V-REF(V,19)))*100/V;VART23_1:=IF(VART23>999,999.9,VART23);DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,19),0.155 ,0.19,1,STRCAT(VAR2STR(VART23_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,19),0.155 ,0.19,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,19),0.155 ,0.19,1,STRCAT(VAR2STR(VART23_1,1),'%')),COLORGRE EN;VART24:=ABS((C-REF(C,59)))*100/C;VART24_1:=IF(VART24>999,999.9,VART24);DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,59),0.155 ,0.23,1,STRCAT(VAR2STR(VART24_1,1),'%')),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,59),0.155 ,0.23,1,VAR2STR(0,2)),COLORWHITE;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,59),0.155 ,0.23,1,STRCAT(VAR2STR(VART24_1,1),'%')),COLORGRE EN;VART25:=ABS((C-REF(C,119)))*100/C;VART25_1:=IF(VART25>999,999.9,VART25);DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV>REF(V,119),0.155 ,0.27,1,STRCAT(VAR2STR(VART25_1,1),'%')),COLORRE D;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV=REF(V,119),0.155 ,0.27,1,VAR2STR(0,2)),COLORWHITE;{W } DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDV<REF(V,119),0.155 ,0.27,1,STRCAT(VAR2STR(VART25_1,1),'%')),COLORGR EEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C>REF(C,4) ANDVVOL>REF(V,4),0.16 ,0.11,0,'5日均线助涨'),COLORRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C<REF(C,4) ANDVVOL<REF(V,4),0.16 ,0.11,0,'5日均线领跌'),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C>REF(C,9) ANDVVOL>REF(V,9),0.16 ,0.15,0,'10日均线助涨'),COLORRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C<REF(C,9) ANDVVOL<REF(V,9),0.16 ,0.15,0,'10日均线领跌'),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C>REF(C,19) ANDVVOL>REF(V,19),0.16 ,0.19,0,'20日均线助涨'),COLORRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C<REF(C,19) ANDVVOL<REF(V,19),0.16 ,0.19,0,'20日均线领跌'),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C>REF(C,59) ANDVVOL>REF(V,59),0.16 ,0.23,0,'60日均线助涨'),COLORRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C<REF(C,59) ANDVVOL<REF(V,59),0.16 ,0.23,0,'60日均线领跌'),COLORGREEN; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C>REF(C,119) ANDVVOL>REF(V,119),0.16 ,0.27,0,'120日均线助涨'),COLORRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND C<REF(C,119) ANDVVOL<REF(V,119),0.16 ,0.27,0,'120日均线领跌'),COLORGREEN;。

通达信指标公式源码(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);。

【通达信】精确买卖指标公式源码

【通达信】精确买卖指标公式源码

【通达信】精确买卖指标公式源码DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26); {选股设JC=10即可} DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);A:=IF(CROSS(0,DEA),1,0);A1:=IF(DIFF<0 AND CROSS(DIFF,DEA),1,0);SS:=IF(A,SUM(A1,0),0);SSB:=HHV(SS,0);SSS:=SUM(A1,0);W底选股:IF(SSS-SSB=2 AND SSS>REF(SSS,1),-22,0),LINETHICK2,COLORFFFF00;IF(SSS-SSB=2 AND SSS>REF(SSS,1),-12,0),LINETHICK2,COLORFFFF00;DRAWTEXT(A1,-10,'W底'),COLORYELLOW;N:=20;MID:=MA(C,N);VART1:=POW((C-MID),2);VART2:=MA(VART1,N);VART3:=SQRT(VART2);UPPER:=MID+2*VART3;LOWER:=MID-2*VART3;BOLL:=REF(MID,1);UB:=REF(UPPER,1);LB:=REF(LOWER,1);LOWER1:=MID-VART3;LB1:=REF(LOWER1,1);股价线:(C-LB1)/(UB-LB)*100,COLORGREEN, LINETHICK1;趋势线:MA(股价线,6),COLORRED, LINETHICK3;90,COLORGREEN, LINETHICK1;50,COLORWHITE, LINETHICK1;0,COLORWHITE, LINETHICK1;VARC:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1);准备建仓:EMA(IF(L<= LLV(L,30),VARC,0),3),COLORFF00FF,LINETHICK2;VARO5:=LLV(LOW,27);VARO6:=HHV(HIGH,34);VARO7:=EMA((CLOSE-VARO5)/(VARO6-VARO5)*4,4)*25;建仓区: IF((VARO7<10),80,100) ,COLORFFFF00,LINETHICK3;IF((VARO7<10),85,100) ,COLORBLACK,LINETHICK2;下单: IF(CROSS(3*SMA((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100,5,1),3,1),10),38,0),STICK ,COLORYELLOW, LINETHICK4;DRAWTEXT(下单,40,'下单'),COLORGREEN;BIAS1:=(C-MA(C,6))/MA(C,6)*100;BIAS2:=(C-MA(C,12))/MA(C,12)*100;BIAS3:=(C-MA(C,24))/MA(C,24)*100;BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;乖离1:=MA(BIAS,3);低买:IF(CROSS(BIAS,乖离1) AND 乖离1<-9,28,0),COLORRED,LINETHICK2;IF(CROSS(BIAS,乖离1) AND 乖离1<-9,18,0),COLORRED,LINETHICK2;STICKLINE(CROSS(BIAS,乖离1) AND 乖离1<-9,-12,0,8,0),COLORYELLOW;DRAWTEXT(低买,33,'低买'),COLORRED;TTR:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),5);HD:=(HIGH - REF(HIGH,1));LD:=(REF(LOW,1) - LOW);DMP:=(SUM(IF(((HD > 0) AND (HD > LD)),HD,0),5) );DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),5);神偷线:=(((DMP ) * 100) /TTR);辅助线:=((DMM * 100) /TTR);动向趋势线:=(MA(((ABS((辅助线 - 神偷线)) / (辅助线 + 神偷线)) * 100),3));ADXR:=((动向趋势线 + REF(动向趋势线,3)) / 2);VAR3:=MA(CLOSE,2);VAR7:=REF(VAR3,1);【强弱】:=((SMA(MAX((VAR3 - VAR7),0),5,1) / SMA(ABS((VAR3 - VAR7)),5,1)) * 100);准备:(IF(((动向趋势线> 88) AND (神偷线< 5.8)),68,0)),LINETHICK1,COLORFF00FF;(IF(((动向趋势线> 88) AND (神偷线< 5.8)),48,0)),LINETHICK1,COLORFF00FF;DRAWTEXT(准备,60,'准备'),COLORFF00FF;TYP := (HIGH + LOW + CLOSE)/3;CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*500-250;K:=SMA(RSV,3,1);LC := REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*500-250;X:CROSS(CCI,-100) AND K<-100 ;X改成:CROSS(CCI,-100) AND K<-100 AND CROSS(RSI1,-90);MA2:=EMA(C,2);MA5:=EMA(C,5);MA13:=EMA(C,13);MA34:=EMA(C,34);MA55:=EMA(C,55);YCX:=MA5>=REF(MA5,1);H1:=MAX(MAX(MA5,MA13),MA34);L1:=MIN(MIN(MA5,MA13),MA34);一阳穿三线:= H1<C AND O<L1 AND YCX AND MA2>REF(MA2,1);满仓选股:IF(一阳穿三线,88,0),COLORFFFF00,LINETHICK2;IF(一阳穿三线,58,0),COLORFFFF00,LINETHICK2;DRAWTEXT(一阳穿三线,88,'满仓'),COLORYELLOW;VAR2:=0.0001*AMOUNT,;MA1:=0.0001*MA(AMOUNT,5);M2:=0.0001*MA(AMOUNT,10);百日地量:(VAR2,100)=VAR2,STICK,COLORRED,LINETHICK0;DRAWTEXT(百日地量,-12,'地量'),COLORRED;VAR1:=(CLOSE*2+HIGH+LOW)/4;SK:= EMA(VAR1,13)-EMA(VAR1,73);SD:= EMA(SK,2);买点选股:(CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03)OR (CROSS(SK,SD) AND SK<=-0.14 ) OR (CROSS(SK,SD) AND SK<=0.05AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035));IF(买点选股,28,0),COLORYELLOW,LINETHICK2;IF(买点选股,18,0),COLORYELLOW,LINETHICK2;DRAWTEXT(买点选股,28,'买点'),COLORYELLOW;AA05:=MA(C,5);五日乖离率:=(C-AA05)/AA05*100;BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);加速度5:=EMA((速度5-REF(速度5,1)),3);AA10:=MA(C,10);AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;AA30:=MA(C,30);三拾日乖离率:=(C-AA30)/AA30*100;(AA20-AA30)>REF((AA20-AA30),1) AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) AND AA30<REF(AA30,1);BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;强势狙击选股:FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA10>REF(AA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30;青云直上选股:IF(FILTER(MR,10),30,0),COLORGREEN,LINETHICK2;IF(FILTER(MR,10),20,0),COLORGREEN,LINETHICK2;DRAWTEXT(青云直上选股,30,'青云直上'),COLORGREEN;QUANCLOSE:=(DMA(CLOSE,VOL/SUM(VOL,13)))/DMA(CLO SE,VOL/SUM(VOL,13))*100<=-28 AND (CLOSE-DMA(CLOSE,VOL/SUM(VOL,34)))/DMA(CLOSE,VOL/SUM(VOL,34 ))*100<=-19AND C/REF(C,25)<=1.1 AND IF((((HIGH > (LOW * 1.051)) AND (COUNT((HIGH > (LOW * 1.051)),5) > 1)) AND ((((CLOSE / MA(CLOSE,40)) * 100) < 78) OR(((CLOSE / MA(CLOSE,60)) * 100) < 74))),2,0) AND(SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100)<15 AND IF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1)>REF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),1)AND REF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),1)<REF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),2)AND SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1)<23 ,1.5,0) AND FILTER((C/MA(C,48))<0.75 AND (C/MA(C,70))<0.70 AND((C-L)/C>0.02 OR C>REF(C,1)*1.01) AND V<REF(V,1)*2.8 AND (COUNT(C<O*0.93,2)=2 OR COUNT(H/L>1.1,5)>3),3) ;DRAWTEXT(QUANCLOSE,88,'弱市百发百中'),COLORFFFF00;IF(QUANCLOSE,88,0),COLORFFFF00,LINETHICK2;IF(QUANCLOSE,60,0),COLORFFFF00,LINETHICK2;AA:=1;BB:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;CC:=IF(AMOUNT/C/HHV(AMOUNT,9)/HHV(C,9)*100>100,1 00,AMOUNT/C/HHV(AMOUNT,9)/HHV(C,9)*100);DD:=CC/BB;量异动:IF(AA,DD/REF(DD,1),0);STICKLINE(量异动>=0,0,量异动,8,0);STICKLINE(量异动>=0,0,量异动,4,0);选股:DD/REF(DD,1);CROSS(-100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55)),-45)AND CLOSE>SMA(CLOSE,60,5) AND SMA(CLOSE,23,5)>REF(SMA(CLOSE,23,5),1)AND SMA(SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,13,1),23,1)>REF(SMA(SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,13,1),23,1),1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;逃顶:CROSS(80,RSI)*88,LINETHICK2 ,COLORGREEN;CROSS(80,RSI)*58,LINETHICK2 ,COLORGREEN;DRAWTEXT(CROSS(80,RSI),88,'逃顶 '),COLORGREEN;CROSS(-100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55)),-45)AND CLOSE>SMA(CLOSE,60,5) AND SMA(CLOSE,23,5)>REF(SMA(CLOSE,23,5),1)AND SMA(SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,13,1),23,1)>REF(SMA(SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,13,1),23,1),1)COLORBLUE,LINETHICK2;{W1:=C=HHV(C,20);W2:=BARSLAST(W1);W3:=IF(W2>0,REF(C,W2),REF(C,W2));W4:=CROSS(C,REF(W3,1));W4 AND COUNT(W4,5)=1; };。

通达信主图指标黑马(附源码)

通达信主图指标黑马(附源码)

通达信主图指标黑马(附源码){获利盘:WINNER(CLOSE)*100,NODRAW;DRAWBAND(MA(CLOSE,20),RGB(33,0,0),MA(CLOSE,60),RGB(0,0,0));DRAWBAND(MA(CLOSE,5),RGB(150,150,0),MA(CLOSE,10),RGB(0,0,150));DRAWKLINE(H,O,L,C);}上:=(SMA(HIGH,21,2) * 1.05);DRAWTEXT(FILTER(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > 上)) AND (CLOSE < 上)),5),HIGH*1.02,'减仓'),COLORFFFFFF;下轨道:(SMA(LOW,21,2) * 0.969),POINTDOT,COLOR00FFFF;BMA:=MA(CLOSE,118);阻挡:=(SMA(HIGH,21,2) * 1.05);RSV:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=((3 * K) - (2 * D));RSV12:=(((CLOSE - LLV(LOW,34)) / (HHV(HIGH,34) - LLV(LOW,34))) * 100);K12:=SMA(RSV12,3,1);D12:=SMA(K12,3,1);J12:=((3 * K12) - (2 * D12));RSV24:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);K24:=SMA(RSV24,3,1);D24:=SMA(K24,3,1);J24:=((3 * K24) - (2 * D24));支撑位:=IF(CROSS(J,J24),LOW,REF(LOW,BARSLAST(CROSS(J,J24))));压力位:IF(CROSS(J24,J),HIGH,REF(HIGH,BARSLAST(CROSS(J24,J)))),COLOR00FF00;CB:=((AMOUNT / VOL) / 100);CD:=((CB > HIGH) OR (CB < LOW));黑马趋势:=MA(CLOSE,3);MA8:MA(CLOSE,8),COLORWHITE;MA13:MA(CLOSE,13),COLORRED;BB8:=((ATAN((MA8 - REF(MA8,1))) * 3.1416) * 10);DRAWTEXT(FILTER(((((((CLOSE / OPEN) > 1.04) AND ((CLOSE - REF(CLOSE,1)) > 0)) AND (CLOSE > 下轨道)) AND ((MA8 - REF(MA8,1)) > 0)) AND (CLOSE < 上)),3),LOW*0.98,'追击'),COLORD1E768; VARD:=((((OPEN + LOW) + HIGH) + CLOSE) / 4);支撑:=EMA(VARD,5);短期底部0:=LLV(OPEN,30);X1:=(((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6);X2:=EMA(X1,10);X3:=REF(X2,1);X4:=((REF(HIGH,1) + REF(LOW,1)) / 2);X5:=(MA(CLOSE,21) + (2 * STD(CLOSE,21)));X6:=REF(CLOSE,1);X7:=((SMA(MAX((CLOSE - X6),0),7,1) / SMA(ABS((CLOSE - X6)),7,1)) * 100);X8:=CROSS(79,X7);X9:=FILTER(X8,4);MAP1:=MA(CLOSE,60);均线30:=MA(CLOSE,30);均线89:=MA(CLOSE,89);均线:=MA(CLOSE,16);均线34:=MA(CLOSE,34);均线55:=MA(CLOSE,55);VAR1:=EMA(CLOSE,8);VAR2:=EMA(VAR1,20);VAR3:=CROSS(VAR1,VAR2);VAR4:=(VAR1 < MA(CLOSE,60));VAR5:=(((HHV(HIGH,36) - CLOSE) / (HHV(HIGH,36) - LLV(LOW,36))) * 100);VAR6:=SMA(VAR5,5,1);VAR7:=SMA(VAR6,8,1);VAR8:=(CROSS(VAR6,VAR7) AND (VAR7 < 16));VAR9:=((CLOSE > (LLV(CLOSE,60) + (0.3 * LLV(CLOSE,60)))) AND VAR8);VARA:=IF((CLOSE > 1000),VAR8,VAR9);黑马起步:=(VAR3 AND VAR4);逃遁:=VARA;均线20:=MA(CLOSE,20);均线120:=MA(CLOSE,120);牛熊线:=MA(CLOSE,250);VA:=CROSS(MA(CLOSE,19),MA(CLOSE,120));VB:=(MA(CLOSE,20) > MA(CLOSE,120));VC:=CROSS(MA(CLOSE,120),MA(CLOSE,89));VD:=(MA(CLOSE,20) < MA(CLOSE,120));VE:=CROSS(MA(CLOSE,20),MA(CLOSE,250));VF:=(MA(CLOSE,20) > MA(CLOSE,250));VG:=CROSS(MA(CLOSE,250),MA(CLOSE,20));DRAWTEXT((((((均线- REF(均线,1)) > 0) AND CROSS(均线20,均线120)) AND (LOW <= 均线120)) AND (CLOSE >= 均线120)),LOW,'三线开花'),COLORFFFFFF;短期底部:LLV(HIGH,30),COLOR0000FF;上轨:(SMA(HIGH,21,2) * 1.092),POINTDOT,COLORFFFFFF;中轨道:(SMA(HIGH,21,2) * 1.017),POINTDOT,COLORFFFFFF;DRAWTEXT(FILTER(((((LOW < 下轨道) AND (CLOSE > MA(CLOSE,15))) AND (CLOSE > 短期底部)) AND (HIGH < 压力位)),10),LOW,'★短线5%'),COLOR9DC522;DRAWTEXT(((((((HIGH >= 均线120) AND (CLOSE < REF(CLOSE,1))) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > 上)) AND (CLOSE < 上)) AND (CLOSE < 均线120)),HIGH*1.02,'减仓'),COLOR00FF00;DRAWTEXT(FILTER(((HIGH > 阻挡) AND (CLOSE < 阻挡)),5),HIGH*1.02,'逃命');DRAWTEXT(((VE > VG) AND (HIGH < 阻挡)),LOW*0.96,'★短线'),COLOR00FFFF;DRAWTEXT(FILTER(((((((((((OPEN < X2) AND (CLOSE > X2)) AND ((支撑- REF(支撑,1)) > 0)) AND ((支撑- REF(支撑,1)) > 0)) AND (CLOSE < 阻挡)) AND ((均线- REF(均线,1)) > 0)) AND (CLOSE >= 均线)) AND (HIGH < 阻挡)) AND ((MA8 -REF(MA8,1)) > 0)) AND ((阻挡-REF(阻挡,2)) > 0)),11),LOW*0.98,'★快马加鞭'),COLOR0000FF;DRAWTEXT(FILTER(((((((OPEN < X2) AND (WINNER(CLOSE) < 0.2)) AND (CLOSE > X2)) AND ((X2 -REF(X2,1)) > 0)) AND (HIGH < 阻挡)) AND ((CLOSE - REF(CLOSE,1)) > 0.35)),4),LOW*0.98,'★狂奔'),COLORD18073;DRAWTEXT((((((((CROSS(支撑,均线) AND (HIGH < 中轨道)) AND (WINNER(CLOSE) < 0.2)) AND (CLOSE < 阻挡)) AND (CLOSE > OPEN)) AND (LOW <= X2)) AND (CLOSE >= X2)) AND CROSS(支撑,X2)),LOW,'★起步'),COLOR00FFFF;DRAWTEXT(CROSS(X4,X5),HIGH,'●减仓'),COLOR00B4FF;DRAWTEXT(X9,(HIGH * 1.03),'出货'),COLOR9000F5;DRAWTEXT((((黑马起步> 0) AND (LOW <= X2)) AND ((均线- REF(均线,1)) > 0)),(LOW*0.98),'★黑马起步'),COLOR00FF00;DRAWTEXT((逃遁> 0),(HIGH * 1.03),'●逃命'),COLOR0000FF;RDV:=SMA(LOW,8,1);DRAWTEXT(((((CROSS(K,D) AND (CLOSE >= OPEN)) AND ((X2 -REF(X2,1)) > 0)) AND ((RDV -REF(RDV,1)) > 0)) AND (K <= 33)),(LOW *0.98),'★黑马初现'),COLOR8500DE;DRAWTEXT(FILTER((((((((LOW <= 短期底部0) AND (WINNER(CLOSE) < 0.2)) AND (CLOSE < 牛熊线)) AND (HIGH < 阻挡)) AND ((X2 -REF(X2,1)) > 0)) AND (CLOSE > OPEN)) AND (HIGH >= X3)),5),LOW*0.98,'筑底'),COLOR85B256;RCK:=(SMA(LOW,21,2) * 0.95);趋势线:=SMA(LOW,5,1);大胆买入:DRAWTEXT(((CROSS(趋势线,RCK) AND (LOW <= X2)) AND ((X2 - REF(X2,1)) > 0)),LOW,'★大胆买入'),COLORE50000;B1:=(((HIGH + LOW) + CLOSE) / 3);B6:=HHV(B1,(4 * 15));B7:=LLV(B1,(4 * 15));B8:=(B6 - B7);飞龙顶底线:=(MA(((B1 - B7) / B8),2) * 80);DRAWTEXT(FILTER(((((((飞龙顶底线<= 1) AND (WINNER(CLOSE) < 0.02)) AND (HIGH < 趋势线)) AND (CLOSE > OPEN)) AND (LOW <= 短期底部0)) AND (CLOSE > 短期底部0)),8),LOW*0.99,'黑马寻底'),COLORE7DD1F;DRAWTEXT(FILTER((((((((LOW <= 短期底部0) AND (WINNER(CLOSE) < 0.015)) AND ((OPEN / CLOSE) > 0.99)) AND ((J -REF(J,1)) > 0)) AND (CLOSE > OPEN)) AND (HIGH < 支撑位)) AND (CLOSE > 短期底部0)),25),LOW*0.98,'开始建仓'),COLOR00FFFF;DRAWTEXT(FILTER((((((((LOW <= 均线30) AND ((MA8 - REF(MA8,1)) > 0)) AND ((均线- REF(均线20,1)) > 0)) AND ((趋势线- REF(趋势线,1)) > 0)) AND (CLOSE >= 均线30)) AND (WINNER(CLOSE) < 0.15)) AND ((CLOSE / OPEN) > 1.01)),3),LOW,'★天马奔月'),COLOR76B0FC;DRAWTEXT((((((OPEN <= 均线) AND ((均线30 - REF(均线30,1)) > 0)) AND (CLOSE > 均线89)) AND (BB8 > 1)) AND ((CLOSE / OPEN) > 1.04)),LOW,'★天马过桥'),COLORCC99FF;VAR001:=(CLOSE*2+HIGH+LOW)/4;SK:= EMA(VAR001,13)-EMA(VAR001,73);SD:= EMA(SK,2);DRAWTEXT((CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03) OR (CROSS(SK,SD) AND SK<=-0.14 )OR (CROSS(SK,SD) AND SK<=0.05 AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035)) ,LOW,'黑马短线'),COLORGREEN;。

20个极品通达信指标公式源码

20个极品通达信指标公式源码

公式1(未来函数)代码N1:=5;N2:=10;N3:=20;N4:=30;P:=2;M:=20;N:=250;M1:=55;W:=21;P3:=500;N9:=90; HR:=HHV(HIGH,M1);HRY:=LLV(LOW,M1);HRY11:=HR*HRY;HRY33:SQRT(HRY11),COLORGREEN,LINETHICK2;IF(C>HRY33 AND HRY33 >=REF(HRY33 ,1), HRY33 ,DRAWNULL),LINETHICK2,COLORRED; MA1:EMA(CLOSE,N1);MA2:EMA(CLOSE,N2);MA3:EMA(CLOSE,N3),COLOR00FFFF;MA4:EMA(CLOSE,N4),LINETHICK2;TJ1:=CROSS(MA1,MA2) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018OR CROSS(MA1,MA4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018OR CROSS(MA2,MA3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018OR CROSS(MA1,MA3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018;TJ2:=(MAX(MA1,MAX(MA2,MA3))-MIN(MA1,MIN(MA2,MA3)))/MIN(MA1,MIN(MA2,MA3))*100<=P;XG:=TJ1 AND TJ2;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);MACD:=2*(DIFF-DEA);做多:=IF(K>D AND MACD>0 AND V>1,2,0),COLORRED;做空:=IF(K<D AND MACD<0 AND V>1,-2,0),COLOR00FF00;强洗:=IF(MACD>0 AND K<D AND V>1,1,0),COLOR0099FF;弱升:=IF(MACD<0 AND K>D AND V>1,-1,0),COLORFFFF00;STICKLINE(做多AND C>=O,C,O,3,1),COLORRED;STICKLINE(做多AND C<O,C,O,3,0),COLOR990099;STICKLINE(做多AND C<O,C,O,1,0),COLORCC00CC;STICKLINE(做多AND C<O,C,O,0.3,0),COLORFF00FF;STICKLINE(做多AND C>=O,C,O,3,1),COLOR0000FF;{STICKLINE(做多AND C>=O,C,O,1.5,0),COLOR0000DD;STICKLINE(做多AND C>=O,C,O,0.4,0),COLOR0000FF;}STICKLINE(做空AND C>=O,L,H,0.1,0),COLOR0000FF;STICKLINE(做空AND C>=O,C,O,3,1),COLOR00FF00;{STICKLINE(做空AND C<O,C,O,3,0),COLOR00FF00;STICKLINE(做空AND C<O,C,O,0.3,0),COLOR00FF00;STICKLINE(做空AND C<O,C,O,0.3,0),COLOR00FF00;}STICKLINE(强洗AND C>=O,L,H,0.1,0),COLOR0000FF;STICKLINE(强洗AND C>=O,C,O,3,1),COLORFFFFFF;STICKLINE(强洗AND C<O,C,O,3,0),COLOR999999;STICKLINE(强洗AND C<O,C,O,1,0),COLORCCCCCC;STICKLINE(强洗AND C<O,C,O,0.3,0),COLORFFFFFF;STICKLINE(弱升AND C>=O,C,O,3,1),COLOR00FFFF;STICKLINE(弱升AND C<O,C,O,3,0),COLOR009999;STICKLINE(弱升AND C<O,C,O,0.3,0),COLOR00FFFF;STICKLINE(FILTER(TJ1,3),C,O,4,0),COLOR0000FF;DRAWICON(FILTER(XG,3),L*0.985,23);GET:=ZIG(3,3),COLORYELLOW;PL5:=ZIG(3,5);EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);PL10:=ZIG(3,10);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,20);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,40);走强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*0.98,'(A)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFF00FF;DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'(C)'),COLOR0000FF;DRAWTEXT(EN2 AND DTJZ10=1,L*0.93,'Ⅰ'),COLORFF00FF;DRAWTEXT(EX2 AND DTJD10=2,H*1.05,'Ⅱ'),COLORFFFF00;DRAWTEXT(EN3 AND ZTJZ10=1,L*0.93,'Ⅲ'),COLOR0000FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.03,'①'),LINETHICK3,COLOR00FFFF; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.95,'②'),LINETHICK3,COLOR00FFFF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2)AND EX2,H*1.03,'③'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.95,'④'),LINETHICK3,COLOR00FFFF;TJ11:=EN2 AND ZTJZ5=1;TJ22:=EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2;TJ33:=EN2 AND DTJZ10=1;TJ44:=EN3 AND ZTJZ10=1;TJ55:=EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2;XG22:=TJ11 OR TJ22 OR TJ33 OR TJ44 OR TJ55;MM:=C>HRY33 AND HRY33 >=REF(HRY33 ,1);QQ:=HRY33>=REF(HRY33 ,1);XG11:=CROSS(C,HRY33) AND QQ AND MM;BUY1:=LAST(CLOSE>MA(CLOSE,55),0,5);BUY2:=EXIST(CLOSE<MA(CLOSE,55),5);BUY:=CLOSE>MA(CLOSE,55)&&BUY1&&BUY2;W18:=FILTER(EXIST(XG11 OR BUY,1),5);STICKLINE(W18,C,(C+O)/2,4,0),COLORFF00FF;DRAWTEXT(W18,L*0.97,'牛'),COLOR00FFFF;X1:=REF(C,1)/HHV(H,20)<0.82;X2:=(MIN(C,O)-L)/(H-L)>0.67;X3:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)<0.33;X4:=ABS(C-O)/C<0.01;DOWN:=O>C;X5:=COUNT(DOWN,7)>=5;XG8:=X1 AND X2 AND X3 AND X4 AND X5;DRAWTEXT(XG8,L*0.98,'螺'),COLOR00FFFF;AA:=REF(C,1)/REF(O,1)<0.96;BB:=C/O>1.03;CC:=C>REF(O,1);TJ81:=AA AND BB AND CC;X81:=REF(C,1)/HHV(H,20)<0.82;DN:=O>C;X82:=COUNT(DN,7)>=5;X83:=C=HHV(C,3);XG81:=TJ81 AND X81 AND X82;XG82:=X81 AND X82 AND X83;XG88:=XG81 OR XG82;DRAWTEXT(XG88,L*0.96,'反'),COLOR00FFFF;X01:=REF(C,1)/HHV(H,21)<0.77;{DOWN1:=O>C;X02:=COUNT(DOWN1,9)>=6;}X03:=ABS(C-O)/C<0.008;X04:=(H-L)/C>0.025;XG0:=X01 AND X03 AND X04;DRAWTEXT(XG0,L*0.97,'星'),COLOR00FFFF;S1:=REF(C,1)/LLV(L,W)>1.30;S2:=(H-MAX(C,O))/(H-L)>0.60;S3:=ABS(C-O)/C<0.03;S4:=(H-O)/C>0.05 AND C<O;SAL1:=S1 AND S2 AND S3;SAL2:=S1 AND ABS(C-O)/C>0.05 AND C<O;SAL3:=S1 AND ABS(C-O)/C<0.001;SAL4:=S1 AND S4;SAL5:=(H-MAX(C,O))/(H-L)>0.67 AND C<O AND S3;SAL:=SAL1 OR SAL2 OR SAL3 OR SAL4 OR SAL5;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),4.1,1)/SMA(ABS(CLOSE-LC),4.1,1)*100;黄买:=FILTER((REF(CLOSE,2)<CLOSE AND RSI<25),7);黄卖:=FILTER((REF(CLOSE,2)>CLOSE AND RSI>80),7);红买:=FILTER(CROSS(RSI,11),7);红卖:=FILTER(CROSS(89,RSI),7);绿买:=FILTER(CROSS(RSI,20),7);绿卖:=FILTER(CROSS(80,RSI),7);SL1:=红卖AND 绿卖;SL2:=红卖AND 绿卖AND 黄卖;BU:=红买AND 绿买;SS1:=CROSS(MA(C,5),C);SS2:=(REF(C,1)-C)/REF(C,1)>0.04;SS3:=O<REF(C,1);JJ1:=SS1 AND SS2 AND SS3;SSL:=JJ1 AND S1;SAL8:=FILTER(SAL OR SSL,5);DRAWTEXT(SAL8 OR SL1 OR SL2,H*1.02,'卖'),COLOR00FF00; STICKLINE(SAL8 OR SL1 OR SL2,C,O,1,0),COLORFF0000; DRAWTEXT(SAL8 AND SL1 AND SL2,H*1.02,'必卖'),COLOR00FF00; MA20:=MA(CLOSE,20);AA10:=MA(CLOSE,8);中期大底:=LLV(LOW,30);支撑:=HHV(EMA(((((OPEN + LOW) + HIGH) + CLOSE) / 4),5),60);压力一:=HHV(LOW,20);中线:=MA(CLOSE,3);天:=(MA(LOW,15) * 0.985);人:=(MA(LOW,15) * 0.96);地:=(((HIGH + LOW) + CLOSE) / 3);B1:=HHV(地,(4 * 15));B6:=LLV(地,(4 * 15));B7:=(B1 - B6);B8:=(MA(((地- B6) / B7),2) * 80);短期底部:=(LLV(HIGH,30) * 0.93);MA80:=LLV(HIGH,30);压力二:=(SMA(HIGH,21,2) * 1.035);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RSV8:=SMA(下档线,3,1);K8:=SMA(RSV8,3,1);D8:=((3 * RSV8) - (2 * K8));J12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);K24:=SMA(SMA(J12,3,1),3,1);D24:=((3 * SMA(J12,3,1)) - (2 * K24));压力位:=IF(CROSS(D24,D),HIGH,L);长期底部:=LLV(HIGH,30);X18:=EMA((((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6),10);逃遁:=(SMA(HIGH,21,2) * 1.05);TJ18:=FILTER(((((LLV(LOW,0) AND ((MA(CLOSE,37) - REF(MA(CLOSE,37),1)) > 0)) AND (LOW <= 短期底部)) AND (WINNER(CLOSE) < 0.05)) AND ((CLOSE / OPEN)> 0.13)),7);图公式2代码PJJ:=DMA((H + L + C * 2) / 4,0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=VOL / ((H - L) * 2 - ABS(C - O));XVL:=IF(C > O,QJJ * (H - L),IF(C < O,QJJ * (H - O + (C - L)),VOL / 2))+ IF(C > O,0 - QJJ * (H - C + (O - L)),IF(C < O,0 - QJJ * (H - L),0 - VOL / 2)); HSL:=XVL / 20 / 1.15;攻击流量:=HSL * 0.55 + REF(HSL,1) * 0.33 + REF(HSL,2) * 0.22;GJJ:=EMA(攻击流量,2);DIFF:=(EMA(GJJ,12)-EMA(GJJ,26)),COLORGREEN;DEA:=MA(DIFF,2),COLORYELLOW;VA2:=LLV(LOW,33);VA3:=HHV(HIGH,21);VA4:=EMA((CLOSE-VA2)/(VA3-VA2)*100,10)*-1+100;趋势:=100-EMA(0.191*REF(VA4,1)+0.809*VA4,1);趋势线:=100-EMA(0.191*REF(VA4,1)+0.809*VA4,1);STICKLINE(DIFF>DEA AND 趋势线>REF(趋势线,1),HHV(H,5)*1.05,LLV(L,5)*0.95,4,0),COLOR781836;DRAWKLINE(H,O,L,C);V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);V2:=(1-7/100)*(DMA(CLOSE,V1));V3:=(1+7/100)*(DMA(CLOSE,V1));V5:=MA((LOW+HIGH+CLOSE)/3,5);支撑:REFDATE(V2,DATE),POINTDOT,LINETHICK3,COLORCC66FF;阻力:REFDATE(V3,DATE),POINTDOT,LINETHICK3,COLORGREEN;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,L,L*0.98,3,0),COLORYELLOW;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,H*1.01,H,3,0),COLOR00FF00{98FD};MA3:MA(C,3);MA5:MA(C,5),COLORWHITE;MA10:=MA(C,10),NODRAW;MA30:MA(C,34),NODRAW;五日乖离率:=(C-MA5)/MA5*100;BB5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;IF(BB5>30 AND MA5>REF(MA5,1), MA5,DRAWNULL),LINETHICK1,COLORRED;BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;IF(BB5<0 AND MA5<REF(MA5,1), MA5,DRAWNULL),LINETHICK1,COLORGREEN;DD5:=MA5<REF(MA5,1);IF(DD5,MA5,DRAWNULL),COLOR00FF00;X0:=(3*C+L+O+H)/6;多空线: (20*X0+19*REF(X0,1)+18*REF(X0,2)+17*REF(X0,3)+16*REF(X0,4)+15*REF(X0,5)+14*REF(X0,6)+13*REF(X0,7)+12*REF(X0,8)+11*REF(X0,9)+10*REF(X0,10)+9*REF(X0,11)+8*REF(X0,12)+7*REF(X0,13)+6*REF(X0,14)+5*REF(X0,15)+4*REF(X0,16)+3*REF(X0,17)+2*REF(X0,18)+REF(X0,20))/210,COLORFF00FF,LINETHICK1;{用法:黄托底买进,绿压顶买出。

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

为了方便大家看盘,特在20日均线加上买卖点,20日均线又称为万能均线,它的意义在于周期不是很长也不是很短,所以能够真实反映出股价的最为接近的趋势,他的低位拐弯意味着短期内趋势有好转的迹象,股价如果能够即时站稳于上就说明股价未来看涨,否则只能代表趋势纯技术上的空头趋势。

这一均线是经过长时间验证其在股价间的变化作用,能在任何时候任何位置给出一个明确的操作买卖信号,这也是"万能"二字所在的真实含义。

万能均线之所以万能是因为它在股价的任何时间和位置都能准确的给出操作信号。

它的操作要点在于只要股价上穿万能均线并且有成交量放大的配合被认为买入信号,股价下破万能均线被认为卖出信号。

在周期组合上被认为是一个综合周期,因此无论是长线投资或者短线投资均适用。

战法操作:
20日均线在低位走平时关注,20日均线开始向上拐头、股价站上20日均线之上时买入,回调确认时加仓,均线向上移动一路持有,当20日均线在高位走平时要警惕,一旦收盘时股价跌破20日均线立即清仓,日后如果20日均线继续上移,股价再次站上20日均线时再买入,如此反复操作,直到股价不再创新高并跌破前低,而且20日均线调头向下时结束该操作,在20日均线向下移动和横盘整理中,保持空仓观望,耐心等待新一轮上升趋势形成后再择机介入。

考虑到每天股价在盘中波动,主力运作的意图只有到收盘时才明朗,因此坚持到每天最后一刻﹙2点45分以后﹚买卖。

20日均线操作是安全可靠的,它既能有效地控制风险,又能百分百的抓住主升段,获取利润最大化。

目前来说,中短线操作成功率超过60%的人还不多,我们追求的是较大的成功概率,甚至连成功概率都无所谓,关键是要抓住大涨,回避大跌,要盯住一只股票操作,直到获得满意的盈利或趋势已经变坏时方可换股操作。

对于移动平均线的应用,各人偏好不同,有的用18日均线,有的用20日均线,有的用30日均线,还有的用60日均线,各有利弊。

我按我的操作标准﹙20日均线拐头向上,股价站稳20日均线之上买入,股价跌20日破均线卖出,20日均线向下和横向整理时空仓观望﹚同时分别对10日、20日、30日、60日,120日,250日均线进行了大量测算,结果发现,均线周期越短,稳定性越差,交易的次数越多,成功率越低,收益率却并没有因频繁操作而增加,相反的均线周期越长,稳定性越好,交易次数越少,收益率也不低,特别是60日均线,趋势清晰,操作简洁,收益率较高,值得心态好的人参考。

MA5:MA(CLOSE,5),LINETHICK1,COLORWHITE;
MA10:MA(CLOSE,10),LINETHICK1,COLORYELLOW;
MA20:MA(CLOSE,20),LINETHICK2,COLORMAGENTA;
MA60:MA(CLOSE,60),LINETHICK1,COLORGREEN;
买线:=EMA(C,4);
卖线:=EMA(SLOPE(C,20)*10+C,35);
DRAWTEXT(CROSS(买线,卖线),LOW*1.00,'←买'),COLORRED,LINETHICK2; DRAWTEXT(CROSS(卖线,买线),HIGH*1.01,'←卖'),COLORGREEN;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT(CROSS(90,RSI) , HIGH*1.01,'←逢高出局!'),COLOR00FF00 ;
A:=(3*C+ L+ O+ H)/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*RE F(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;
主力成本:EMA(X,13),COLORFF00FF,LINETHICK0;
ZZ:=(O H L)/3;
YC:=(H L)/2;
YCHJX:=(EMA(ZZ,4))+(YC-REF(ZZ,3))/4;
今日买点:EMA(ZZ,3),COLORYELLOW,LINETHICK0;
明日买点:YCHJX,LINETHICK0;
昨测今日买点:REF(YCHJX,1),LINETHICK0;
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(MA15,FF),(HIGH * 1.02),'←拐点卖'),COLOR00FF00; DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'←拐点买'),COLOR00FFFF;
注意:如不需要拐点买卖的,就删除后面的四行。

相关文档
最新文档