通达信精选指标【涨中乾坤】副图 捕捉市场中的微妙变化 源码附图
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1:=EMA(DIFF,9);
MACD:=IF(2*(DIFF-DEA1)*60>0,2*(DIFF-DEA1)*60,0);
GSKZ1:=(C*2+H+L)/4*10;
GSKZ2:=EMA(GSKZ1,13)-EMA(GSKZ1,34);
GSKZ3:=EMA(GSKZ2,5);
GSKZ4:=IF(GSKZ2-GSKZ3>0,2*(GSKZ2-GSKZ3)*5.5,0);
超主吃:=IF(GSKZ4>=100,100,GSKZ4);
量价线:=((CLOSE-MA(CLOSE,21))/MA(CLOSE,21))*100;
MNC:=C#YEAR;
MNO:=O#YEAR;
MNH:=H#YEAR;
MNL:=L#YEAR;
MJC:=C#SEASON;
MJO:=O#SEASON;
MJH:=H#SEASON;
MJL:=L#SEASON;
MYO:=O#MONTH;
MYH:=H#MONTH;
MYL:=L#MONTH;
MYC:=C#MONTH;
Z开:=O#WEEK;
Z高:=H#WEEK;
Z低:=L#WEEK;
Z收:=C#WEEK;
Z期共振:=MNC>=MNO AND MJC>=MJO AND MYC>=MYO AND Z收>=Z开;
SG:=EMA(HHV(HIGH,1),8);
X1:=EMA(CLOSE,8);
X30:=((X1 < REF(X1,1)) AND (CLOSE < X1));
X31:=IF(((SG < REF(SG,1)) OR X30),1,0);
LC:=REF(CLOSE,1);
操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100,COLORRED,LINETHICK2;
趋势线:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100,COLORGRAY;
震仓线:=45,COLORMAGENTA;
震仓线2:=50,COLORGRAY;
逃命线:=80,COLORRED;
抄底线:=20,COLORGREEN;
绝底线:=5,COLORBLUE;
PP2:=操作线< 震仓线2 AND REF(操作线,1)>震仓线2 ;
PP:=操作线< 震仓线 AND REF(操作线,1)>震仓线 ;
PP3:=操作线< 抄底线 AND REF(操作线,1)>抄底线;
涨中:Z期共振 AND(((((COUNT((X31 = 1),4) = 3) AND (X31 = 0))AND O< C AND (((C-REF(C,1))/REF(C,1))>0.085))*89) >=89)OR((C-REF(C,1))/REF(C,1)>0.085 AND (REF(PP3,1) OR REF(PP,1))),COLORYELLOW,NODRAW;
STICKLINE(超主吃>=REF(超主吃,1) AND 量价线>-1.2 AND 涨中,3,2,1,0),COLORRED;
STICKLINE(超主吃>=REF(超主吃,1) AND 量价线>-1.2 AND 涨中,2,1,2,0),COLORYELLOW;
STICKLINE(超主吃>=REF(超主吃,1) AND 量价线>-1.2 AND 涨中,1,0,4,0),COLORMAGENTA;
未来函数检测结果如下:
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
该公式包含未来函数:#YEAR
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
DIFF赋值:收盘价的12日指数移动平均 - 收盘价的26日指数移动平均
DEA1赋值:DIFF的9日指数移动平均
MACD赋值:IF(2*(DIFF-DEA1)*60>0,2*(DIFF-DEA1)*60,0)
GSKZ1赋值:(C*2+H+L)/4*10
GSKZ2赋值:GSKZ1的13日指数移动平均-GSKZ1的34日指数移动平均
GSKZ3赋值:GSKZ2的5日指数移动平均
GSKZ4赋值:IF(GSKZ2-GSKZ3>0,2*(GSKZ2-GSKZ3)*5.5,0)
如果GSKZ4>=100返回100否则返回GSKZ4
量价线赋值:((收盘价-收盘价的21日简单移动平均)/收盘价的21日简单移动平均)*100
MNC赋值:C#YEAR
MNO赋值:O#YEAR
MNH赋值:H#YEAR
MNL赋值:L#YEAR
MJC赋值:C#SEASON
MJO赋值:O#SEASON
MJH赋值:H#SEASON
MJL赋值:L#SEASON
MYO赋值:O#MONTH
MYH赋值:H#MONTH
MYL赋值:L#MONTH
MYC赋值:C#MONTH
Z开赋值:O#WEEK
Z高赋值:H#WEEK
Z低赋值:L#WEEK
Z收赋值:C#WEEK
Z期共振赋值:MNC>=MNO AND MJC>=MJO AND MYC>=MYO AND Z收>=Z开
SG赋值:E1日内最高价最高值的8日简单移动平均
X1赋值:收盘价的8日指数移动平均
X30赋值:((X1 < 1日前的X1) AND (收盘价 < X1))
X31赋值:IF(((SG < 1日前的SG) OR X30),1,0)
LC赋值:1日前的收盘价
操作线赋值:SMA(收盘价-LC和0较大值,2,1)/SMA(收盘价-LC的绝对值,2,1)*100,画红色, 线宽为2
趋势线赋值:SMA(收盘价-LC和0较大值,14,1)/SMA(收盘价-LC的绝对值,14,1)*100,COLORGRAY
震仓线赋值:45,画洋红色
震仓线2:=50,COLORGRAY
逃命线赋值:80,画红色
抄底线赋值:20,画绿色
绝底线赋值:5, 画蓝色
PP2赋值:操作线< 震仓线2 AND 1日前的操作线>震仓线2
PP赋值:操作线< 震仓线 AND 1日前的操作线>震仓线
PP3:=操作线< 抄底线 AND 1日前的操作线>抄底线
输出涨中:Z期共振 AND(((((COUNT((X31 = 1),4) = 3) AND (X31 = 0))AND O< C AND (((C-1日前的C)/1日前的C)>0.085))*89) >=89)OR((C-1日前的C)/1日前的C>0.085 AND (1日前的PP3 OR 1日前的PP)),画黄色,NODRAW
STICKLINE(超主吃>=1日前的超主吃 AND 量价线>-1.2 AND 涨中,3,2,1,0),画红色
STICKLINE(超主吃>=1日前的超主吃 AND 量价线>-1.2 AND 涨中,2,1,2,0),画黄色
STICKLINE(超主吃>=1日前的超主吃 AND 量价线>-1.2 AND 涨中,1,0,4,0),画洋红色