趋势持股通达信主图指标 开源通达信指标 主图 源码附图
VAR1:=EMA(CLOSE,30);
VAR2:=EMA(CLOSE,35);
VAR3:=EMA(CLOSE,40);
VAR4:=EMA(CLOSE,45);
DRAWBAND(VAR1,RGB(173,173,39),VAR4,RGB(173,173,39));
VAR5:=EMA(CLOSE,90);
VAR6:=EMA(CLOSE,98);
VAR7:=EMA(CLOSE,106);
VAR8:=EMA(CLOSE,114);
DRAWBAND(VAR5,RGB(45,106,168),VAR8,RGB(45,106,168));
VAR9:=EMA(CLOSE,140);
VAR10:=EMA(CLOSE,148);
VAR11:=EMA(CLOSE,156);
VAR12:=EMA(CLOSE,164);
DRAWBAND(VAR9,RGB(185,49,151),VAR12,RGB(185,49,151));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
VAR13:=HHV(EMA(CLOSE,21),2);
NOTEXT20:EMA(CLOSE,21),COLORRED,LINETHICK2;
NOTEXT30:IF(VAR13=NOTEXT20 AND UPNDAY(VAR13,3),VAR13,DRAWNULL),COLORRED,LINETHICK2;
NOTEXT40:IF(REF(VAR13,2)>NOTEXT20,NOTEXT20,DRAWNULL),COLORGREEN,LINETHICK2;
VAR14:=EMA(CLOSE,12)-EMA(CLOSE,26);
VAR15:=EMA(VAR14,9);
STICKLINE(VAR14>=VAR15,CLOSE,OPEN,3.1,0),COLORYELLOW;
STICKLINE(VAR14>=VAR15,HIGH,LOW,0.00009,0),COLORYELLOW;
VAR16:=VAR14>=VAR15;
VAR17:=REF(CLOSE,1);
VAR18:=SMA(MAX(CLOSE-VAR17,0),9,1)/SMA(Abs(CLOSE-VAR17),9,1)*100;
STICKLINE(VAR18>=75,OPEN,CLOSE,3.1,0),COLORRED;
STICKLINE(VAR18>=75,HIGH,LOW,0.00009,0),COLORRED;
VAR19:=VAR18>=75;
VAR20:=(CLOSE-LLV(LOW,6))/(HHV(HIGH,6)-LLV(LOW,6))*100;
VAR21:=SMA(VAR20,3,1);
VAR22:=SMA(VAR21,3,1);
STICKLINE(crOSS(VAR21,VAR22) AND VAR22<=55,CLOSE,OPEN,3.1,0),COLORBLUE;
STICKLINE(CROSS(VAR21,VAR22) AND VAR22<=55,HIGH,LOW,0.00009,0),COLORBLUE;
VAR23:=CROSS(VAR21,VAR22) AND VAR22<=55;
STICKLINE(NOT(VAR23) AND NOT(VAR16) AND NOT(VAR19),OPEN,CLOSE,3.1,0),COLORCYAN;
STICKLINE(NOT(VAR23) AND NOT(VAR16) AND NOT(VAR19),HIGH,LOW,0.00009,0),COLORCYAN;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:收盘价的30日指数移动平均
VAR2赋值:收盘价的35日指数移动平均
VAR3赋值:收盘价的40日指数移动平均
VAR4赋值:收盘价的45日指数移动平均
DRAWBAND(VAR1,RGB(173,173,39),VAR4,RGB(173,173,39))
VAR5赋值:收盘价的90日指数移动平均
VAR6赋值:收盘价的98日指数移动平均
VAR7赋值:收盘价的106日指数移动平均
VAR8赋值:收盘价的114日指数移动平均
DRAWBAND(VAR5,RGB(45,106,168),VAR8,RGB(45,106,168))
VAR9赋值:收盘价的140日指数移动平均
VAR10:=收盘价的148日指数移动平均
VAR11:=收盘价的156日指数移动平均
VAR12:=收盘价的164日指数移动平均
DRAWBAND(VAR9,RGB(185,49,151),VAR12,RGB(185,49,151))
DRAWKLINE(最高价,开盘价,最低价,收盘价)
VAR13:=2日内收盘价的21日指数移动平均最高值
输出NOTEXT20:收盘价的21日指数移动平均,画红色, 线宽为2
输出NOTEXT30:IF(VAR13=NOTEXT20 AND UPNDAY(VAR13,3),VAR13,DRAWNULL),画红色, 线宽为2
输出NOTEXT40:IF(2日前的VAR13>NOTEXT20,NOTEXT20,DRAWNULL),画绿色, 线宽为2
VAR14:=收盘价的12日指数移动平均-收盘价的26日指数移动平均
VAR15:=VAR14的9日指数移动平均
当满足条件VAR14>=VAR15时,在收盘价和开盘价之间画柱状线
当满足条件VAR14>=VAR15时,在最高价和最低价之间画柱状线
VAR16:=VAR14>=VAR15
VAR17:=1日前的收盘价
VAR18:=SMA(收盘价-VAR17和0较大值,9,1)/SMA(收盘价-VAR17的绝对值,9,1)*100
当满足条件VAR18>=75时,在开盘价和收盘价之间画柱状线
当满足条件VAR18>=75时,在最高价和最低价之间画柱状线
VAR19:=VAR18>=75
VAR20:=(收盘价-6日内最低价最低值)/(6日内最高价最高值-6日内最低价最低值)*100
VAR20的3日[1日权重]移动平均
VAR21的3日[1日权重]移动平均
STICKLINE(VAR21上穿VAR22 AND VAR22<=55,收盘价,开盘价,3.1,0), 画蓝色
STICKLINE(VAR21上穿VAR22 AND VAR22<=55,最高价,最低价,0.00009,0), 画蓝色
VAR23:=VAR21上穿VAR22 AND VAR22<=55
STICKLINE(NOT(VAR23) AND NOT(VAR16) AND NOT(VAR19),开盘价,收盘价,3.1,0),画青色
STICKLINE(NOT(VAR23) AND NOT(VAR16) AND NOT(VAR19),最高价,最低价,0.00009,0),画青色