同花顺多空趋势线副图指标源码
A1:=(EMA(((O+H+L+C)/4),3)+EMA(((O+H+L+C)/4),6)+EMA(((O+H+L+C)/4),9))/3;
A3:=(EMA(((O+H+L+C)/4),7)+EMA(((O+H+L+C)/4),14)+EMA(((O+H+L+C)/4),28))/3;
A5:=(EMA(((O+H+L+C)/4),11)+EMA(((O+H+L+C)/4),22)+EMA(((O+H+L+C)/4),44))/3;
A:(EMA(((O+H+L+C)/4),21)+EMA(((O+H+L+C)/4),34)+EMA(((O+H+L+C)/4),55))/3;
PARTLINE(A2,A2>REF(A2,1),RGB(255,0,255),A2<REF(A2,1),RGB(0,255,0));
PARTLINE(A4,A4>REF(A4,1),RGB(255,0,255),A4<REF(A4,1),RGB(0,255,0));
PARTLINE(A6,A6>REF(A6,1),RGB(255,0,255),A6<REF(A6,1),RGB(0,255,0));
DRAWICON(CROSS(A1,A),A1+0.0,'buy');
A2:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,5)+EMA((OPEN+HIGH+LOW+CLOSE)/4,10)+EMA((OPEN+HIGH+LOW+CLOSE)/4,20))/3;
A4:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,9)+EMA((OPEN+HIGH+LOW+CLOSE)/4,18)+EMA((OPEN+HIGH+LOW+CLOSE)/4,36))/3;
A6:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,13)+EMA((OPEN+HIGH+LOW+CLOSE)/4,26)+EMA((OPEN+HIGH+LOW+CLOSE)/4,52))/3;
mA1:=FORCAST(A1,6);
mA3:=FORCAST(A3,6);
mA5:=FORCAST(A5,6);
mA7:=FORCAST(A7,6),Colorfooffo,Linethick1;
DIRECTIONMAX:=MAX(REF(TOWERC,1),REF(TOWERC,1));
STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,DIRECTIONMAX,8,1),COLOR0000FF;
STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,DIRECTIONMIN,8,1),COLOR00FF00;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A1赋值:(EMA(((O+H+L+C)/4),3)+EMA(((O+H+L+C)/4),6)+EMA(((O+H+L+C)/4),9))/3
A3赋值:(EMA(((O+H+L+C)/4),7)+EMA(((O+H+L+C)/4),14)+EMA(((O+H+L+C)/4),28))/3
A5赋值:(EMA(((O+H+L+C)/4),11)+EMA(((O+H+L+C)/4),22)+EMA(((O+H+L+C)/4),44))/3
输出A:(EMA(((O+H+L+C)/4),21)+EMA(((O+H+L+C)/4),34)+EMA(((O+H+L+C)/4),55))/3
PARTLINE(A2,A2>1日前的A2,RGB(255,0,255),A2<1日前的A2,RGB(0,255,0))
PARTLINE(A4,A4>1日前的A4,RGB(255,0,255),A4<1日前的A4,RGB(0,255,0))
PARTLINE(A6,A6>1日前的A6,RGB(255,0,255),A6<1日前的A6,RGB(0,255,0))
DRAWICON(A1上穿A,A1+0.0,'BUY')
A2:=(EMA((开盘价+最高价+最低价+收盘价)/4,5)+EMA((开盘价+最高价+最低价+收盘价)/4,10)+EMA((开盘价+最高价+最低价+收盘价)/4,20))/3
A4:=(EMA((开盘价+最高价+最低价+收盘价)/4,9)+EMA((开盘价+最高价+最低价+收盘价)/4,18)+EMA((开盘价+最高价+最低价+收盘价)/4,36))/3
A6:=(EMA((开盘价+最高价+最低价+收盘价)/4,13)+EMA((开盘价+最高价+最低价+收盘价)/4,26)+EMA((开盘价+最高价+最低价+收盘价)/4,52))/3
MA1赋值:FORCAST(A1,6)
MA3赋值:FORCAST(A3,6)
MA5赋值:FORCAST(A5,6)
MA7:=FORCAST(A7,6),COLORFOOFFO,LINETHICK1
DIRECTIONMAX:=1日前的TOWERC和1日前的TOWERC较大值
STICKLINE(TOWERC>=1日前的TOWERC,TOWERC,DIRECTIONMAX,8,1),COLOR0000FF
STICKLINE(TOWERC<1日前的TOWERC,TOWERC,DIRECTIONMIN,8,1),COLOR00FF00