通达信特准多空变色主图同时适合大A和期货市场
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(COUNT((VARE>VARF),6)>=1 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),LOW,'●买进'),COLOR00FFFF;
VAR10:=(MA(CLOSE,80)-(MA(CLOSE,10))/(3));
DRAWTEXT(CLOSE>(REF(CLOSE,1))*(1.08) AND (CLOSE<(MA(CLOSE,13))*(1.3)),LOW,'●抄底'),COLOR0000FF;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:20
N1:=7
N2:=69
T1赋值:IF((DATE<=1341231),1,0)
M3赋值:收盘价的3日指数移动平均
输出M8:收盘价的8日指数移动平均,COLOR008000
输出M13:M8的13日指数移动平均,COLOR0000FF
输出M62:M8的55日指数移动平均,COLORF0F000
VAR1赋值:M13的62日指数移动平均
M81:M62的81日指数移动平均,COLOR00FFFF
输出M144:VAR1的144日指数移动平均,LINETHICK2,COLOR0000FF
输出M250:VAR1的250日指数移动平均,POINTDOT,LINETHICK2,COLORF00FF0
VAR2赋值:(收盘价+最高价+最低价)/(3)
VAR3赋值:(VAR2的10日指数移动平均)*(T1)
VAR4赋值:(1日前的VAR3)*(T1)
STICKLINE((VAR3>VAR4),VAR3,VAR4,4,0),COLOR00FFFF
STICKLINE((VAR3VAR5赋值:((1日前的最高价+1日前的最低价)/(2))*(T1)
VAR6赋值:收盘价的N日简单移动平均+((2)*(收盘价的N估算标准差))*(T1)
DRAWTEXT(VAR3上穿VAR4,(VAR3)*(0.98),''),COLOR00FFFF
DRAWTEXT(VAR5上穿VAR6,(最高价)*(1.04),'↓卖'),COLOR008000
VAR7赋值:1日前的收盘价
VAR8赋值:((SMA(收盘价-VAR7和0较大值,N1,1))/(SMA(收盘价-VAR7的绝对值,N1,1)))*(100)
VAR9赋值:N2上穿VAR8
VARA赋值:(VAR9的4过滤)*(T1)
DRAWTEXT(VARA,(最高价)*(1.04),'↓卖'),COLORFFFFFF
VARB赋值:((2)*(收盘价)+最高价+最低价)/(4)
VARC赋值:34日内最低价最低值
VARD赋值:34日内最高价最高值
VARE赋值:(EMA(((VARB-VAR1)/(VAR5-VAR1))*(100),7))*(T1)
VARF赋值:(EMA((0.667)*(1日前的VARE)+(0.333)*(VARE),5))*(T1)
DRAWTEXT(COUNT((VARE>VARF),6)>=1 AND 5日前的最低价=120日内最低价最低值 AND REF((收盘价>=OPEN),4) AND REF((收盘价>OPEN),3) AND REF((收盘价>OPEN),2) AND REF((OPEN>收盘价),1) AND OPEN>REF(收盘价,1),最低价,'●买进'),COLOR00FFFF
VAR10:=(收盘价的80日简单移动平均-(收盘价的10日简单移动平均)/(3))
DRAWTEXT(收盘价>(1日前的收盘价)*(1.08) AND (收盘价<(收盘价的13日简单移动平均)*(1.3)),最低价,'●抄底'),COLOR0000FF