通达信多指标趋势指标公式
2021/3/15 21:50:16
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*400-200;
DRAWBAND(RSI1,RGB(180,140,10),-60,RGB(130,130,130));
RSI:SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100,NODRAW;
DI:=(EMA(CLOSE,12) - EMA(CLOSE,26))*100;
DE:=EMA(DI,9);
MACD:=2*(DI-DE);
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*400-200;
K1:=SMA(RSV,3,1),COLORMAGENTA,LINETHICK2;
D1:=SMA(K1,3,1),COLORGREEN,NODRAW;
J1:=3*K1-2*D1,COLORYELLOW,LINETHICK2;
DRAWBAND(K1,RGB(0,50,224),J1,RGB(225,50,240));
DRAWBAND(D1,RGB(0,224,224),K1,RGB(255,255,0));
DIFF:(EMA(CLOSE,12) - EMA(CLOSE,26)),COLORBB0000,NODRAW;
DEA:EMA(DIFF,9),COLORWHITE,NODRAW;
RSV1:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K:SMA(RSV1,3,1),COLOR330700,NODRAW;
D:SMA(K,3,1),COLORCYAN,NODRAW;
J:3*K-2*D,COLORMAGENTA,NODRAW;
{红柱}
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,3,0),COLOR0000AA;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2.7,0),COLOR0000BB;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2.3,0),COLOR0000CC;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2,0),COLOR0000CC;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,1.6,0),COLOR0000DD;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,1.2,0),COLOR0000EE;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.8,0),COLOR0000FF;
{STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.5,0),COLORRED;}
{黄柱}
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,3,0),COLOR0090FF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2.7,0),COLOR009FFF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2.3,0),COLOR00A6FF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2,0),COLOR00B5FF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,1.6,0),COLOR00C4FF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,1.2,0),COLOR00D3FF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,0.8,0),COLOR00E2FF;
{STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,0.5,0),COLOR00FFFF;}
{蓝柱}
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,3,0),COLORFF0000;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,2.7,0),COLORFF3300;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,2.3,0),COLORFF5500;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,2,0),COLORFF7700;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,1.6,0),COLORFF9900;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,1.2,0),COLORFFBB00;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,0.8,0),COLORFFDD00;
{STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,0.5,0),COLORFFFF00;}
{粉柱}
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,3,0),COLORFF00A9;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,2.7,0),COLORFF00A1;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,2.3,0),COLORFF00AA;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,2,0),COLORFF00BB;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,1.6,0),COLORFF00CC;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,1.2,0),COLORFF00DD;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,0.8,0),COLORFF00EE;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,0.5,0),COLORFF00FF;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),LINETHICK2,COLORGREEN;
DRAWICON(CROSS(K1,D1),D1,1);
DRAWICON(CROSS(D1,K1),D1,2);
IF(DI>=DE OR DI<DE,DI,DRAWNULL),COLORBB0000,LINETHICK2;
IF(DI>=DE OR DI<DE,DE,DRAWNULL),COLORWHITE,LINETHICK1;
200,COLORGREEN,POINTDOT;
150,COLORWHITE,POINTDOT;
100,COLORWHITE,POINTDOT;
0,COLORGRAY,LINETHICK2;
-100,COLORWHITE,POINTDOT;
-150,COLORWHITE,POINTDOT;
-200,COLORRED,POINTDOT;
投股票 网 w ww.tou18.cn
[源码翻译]通达信软件动态翻译的结果
赋值: 1日前的收盘价
RSI1赋值:收盘价-LC和0的较大值的14日[1日权重]移动平均/收盘价-LC的绝对值的14日[1日权重]移动平均*400-200
画带状线
输出RSI:收盘价-LC和0的较大值的14日[1日权重]移动平均/收盘价-LC的绝对值的14日[1日权重]移动平均*100,NODRAW
DI赋值:(收盘价的12日指数移动平均 - 收盘价的26日指数移动平均)*100
DE赋值:DI的9日指数移动平均
MACD赋值:2*(DI-DE)
RSV赋值:(收盘价-13日内最低价的最低值)/(13日内最高价的最高值-13日内最低价的最低值)*400-200
K1赋值:RSV的3日[1日权重]移动平均,画洋红色,线宽为2
D1赋值:K1的3日[1日权重]移动平均,画绿色,NODRAW
J1赋值:3*K1-2*D1,画黄色,线宽为2
画带状线
画带状线
输出DIFF:(收盘价的12日指数移动平均 - 收盘价的26日指数移动平均),COLORBB0000,NODRAW
输出DEA:DIFF的9日指数移动平均,画白色,NODRAW
RSV1赋值:(收盘价-13日内最低价的最低值)/(13日内最高价的最高值-13日内最低价的最低值)*100
输出K:RSV1的3日[1日权重]移动平均,COLOR330700,NODRAW
输出D:K的3日[1日权重]移动平均,画青色,NODRAW
输出J:3*K-2*D,画洋红色,NODRAW
当满足条件MACD>0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLOR0000AA
当满足条件MACD>0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2.7,0不为0则画空心柱.,COLOR0000BB
当满足条件MACD>0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2.3,0不为0则画空心柱.,COLOR0000CC
当满足条件MACD>0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR0000CC
当满足条件MACD>0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为1.6,0不为0则画空心柱.,COLOR0000DD
当满足条件MACD>0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为1.2,0不为0则画空心柱.,COLOR0000EE
当满足条件MACD>0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为0.8,0不为0则画空心柱.,COLOR0000FF
当满足条件MACD>0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLOR0090FF
当满足条件MACD>0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2.7,0不为0则画空心柱.,COLOR009FFF
当满足条件MACD>0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2.3,0不为0则画空心柱.,COLOR00A6FF
当满足条件MACD>0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR00B5FF
当满足条件MACD>0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为1.6,0不为0则画空心柱.,COLOR00C4FF
当满足条件MACD>0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为1.2,0不为0则画空心柱.,COLOR00D3FF
当满足条件MACD>0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为0.8,0不为0则画空心柱.,COLOR00E2FF
当满足条件MACD<0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLORFF0000
当满足条件MACD<0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2.7,0不为0则画空心柱.,COLORFF3300
当满足条件MACD<0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2.3,0不为0则画空心柱.,COLORFF5500
当满足条件MACD<0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLORFF7700
当满足条件MACD<0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为1.6,0不为0则画空心柱.,COLORFF9900
当满足条件MACD<0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为1.2,0不为0则画空心柱.,COLORFFBB00
当满足条件MACD<0ANDMACD<1日前的MACD时,在MACD和0位置之间画柱状线,宽度为0.8,0不为0则画空心柱.,COLORFFDD00
当满足条件MACD<0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLORFF00A9
当满足条件MACD<0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2.7,0不为0则画空心柱.,COLORFF00A1
当满足条件MACD<0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2.3,0不为0则画空心柱.,COLORFF00AA
当满足条件MACD<0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLORFF00BB
当满足条件MACD<0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为1.6,0不为0则画空心柱.,COLORFF00CC
当满足条件MACD<0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为1.2,0不为0则画空心柱.,COLORFF00DD
当满足条件MACD<0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为0.8,0不为0则画空心柱.,COLORFF00EE
当满足条件MACD<0ANDMACD>1日前的MACD时,在MACD和0位置之间画柱状线,宽度为0.5,0不为0则画空心柱.,COLORFF00FF
TYP赋值:(最高价+最低价+收盘价)/3
输出CCI:(TYP-TYP的14日简单移动平均)/(0.015*TYP的14日平均绝对偏差),线宽为2,画绿色
当满足条件K1上穿D1时,在D1位置画1号图标
当满足条件D1上穿K1时,在D1位置画2号图标
如果DI>=DEORDI<DE,返回DI,否则返回无效数,COLORBB0000,线宽为2
如果DI>=DEORDI<DE,返回DE,否则返回无效数,画白色,线宽为1
200,画绿色,POINTDOT
150,画白色,POINTDOT
100,画白色,POINTDOT
0,画深灰色,线宽为2
-100,画白色,POINTDOT
-150,画白色,POINTDOT
-200,画红色,POINTDOT
股市公式下载推荐