快慢线通达信公式 副图 源码附图
VAR6:=(2*CLOSE+HIGH+LOW)/4;
VAR7:=LLV(LOW,13);
VAR8:=HHV(HIGH,13);
VAR9:=EMA((VAR6-VAR7)/(VAR8-VAR7)*100,13);
VARA:=EMA(0.667*REF(VAR9,1)+0.333*VAR9,2);
RSV:= (CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
FASTK:=SMA(RSV,5,1);
K:=SMA(FASTK,5,1);
D:=SMA(K,3,1);
AA1:=K-REF(K,1);
STICKLINE(VAR9>VARA,VARA,VARA+(1/5)*(VAR9-VARA),4,0),COLOR00FFFF;
STICKLINE(VAR9>VARA,VARA+(1/5)*(VAR9-VARA),VARA+(2/5)*(VAR9-VARA),4,0),COLOR00CCFF;
STICKLINE(VAR9>VARA,VARA+(2/5)*(VAR9-VARA),VARA+(3/5)*(VAR9-VARA),4,0),COLOR0099FF;
STICKLINE(VAR9>VARA,VARA+(3/5)*(VAR9-VARA),VARA+(4/5)*(VAR9-VARA),4,0),COLOR0066FF;
STICKLINE(VAR9>VARA,VARA+(4/5)*(VAR9-VARA),VARA+(5/5)*(VAR9-VARA),4,0),COLOR0033FF;
STICKLINE(VAR9<=VARA,VARA,VARA-(1/5)*(VAR9-VARA),4,0),COLOR00FF33;
STICKLINE(VAR9<=VARA,VARA-(1/5)*(VAR9-VARA),VARA-(2/5)*(VAR9-VARA),4,0),COLOR33FF33;
STICKLINE(VAR9<=VARA,VARA-(2/5)*(VAR9-VARA),VARA-(3/5)*(VAR9-VARA),4,0),COLOR66FF33;
STICKLINE(VAR9<=VARA,VARA-(3/5)*(VAR9-VARA),VARA-(4/5)*(VAR9-VARA),4,0),COLOR99FF33;
STICKLINE(VAR9<=VARA,VARA-(4/5)*(VAR9-VARA),VARA-(5/5)*(VAR9-VARA),4,0),COLORCCFF33;
STICKLINE(AA1>0,REF(K,1),REF(K,1)+(1/5)*(K-REF(K,1)),6,0),COLOR0000FF;
STICKLINE(AA1>0,REF(K,1)+(1/5)*(K-REF(K,1)),REF(K,1)+(2/5)*(K-REF(K,1)),6,0),COLOR3300FF;
STICKLINE(AA1>0,REF(K,1)+(2/5)*(K-REF(K,1)),REF(K,1)+(3/5)*(K-REF(K,1)),6,0),COLOR6600FF;
STICKLINE(AA1>0,REF(K,1)+(3/5)*(K-REF(K,1)),REF(K,1)+(4/5)*(K-REF(K,1)),6,0),COLOR9900FF;
STICKLINE(AA1>0,REF(K,1)+(4/5)*(K-REF(K,1)),REF(K,1)+(5/5)*(K-REF(K,1)),6,0),COLORCC00FF;
STICKLINE(AA1<=0,REF(K,1),K,6,0),COLORFFFF00;
快速涨:IFF(VAR9>VARA,(VAR9+VARA)/2,DRAWNULL),NODRAW,COLOR00FFFF;
快速跌:IFF(VAR9<=VARA,(VAR9+VARA)/2,DRAWNULL),NODRAW,COLOR00FF33;
慢速涨:IFF(AA1>0,K,DRAWNULL),NODRAW,COLORCC00FF;
慢速跌:IFF(AA1<=0,K,DRAWNULL),NODRAW,COLORFFFF00;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR6赋值:(2*收盘价+最高价+最低价)/4
VAR7赋值:13日内最低价最低值
VAR8赋值:13日内最高价最高值
VAR9赋值:EMA((VAR6-VAR7)/(VAR8-VAR7)*100,13)
VARA赋值:E0.667*1日前的VAR9+0.333*VAR9的2日简单移动平均
RSV赋值: (收盘价-30日内最低价最低值)/(30日内最高价最高值-30日内最低价最低值)*100
RSV的5日[1日权重]移动平均
FASTK的5日[1日权重]移动平均
K的3日[1日权重]移动平均
AA1赋值:K-1日前的K
STICKLINE(VAR9>VARA,VARA,VARA+(1/5)*(VAR9-VARA),4,0),COLOR00FFFF
STICKLINE(VAR9>VARA,VARA+(1/5)*(VAR9-VARA),VARA+(2/5)*(VAR9-VARA),4,0),COLOR00CCFF
STICKLINE(VAR9>VARA,VARA+(2/5)*(VAR9-VARA),VARA+(3/5)*(VAR9-VARA),4,0),COLOR0099FF
STICKLINE(VAR9>VARA,VARA+(3/5)*(VAR9-VARA),VARA+(4/5)*(VAR9-VARA),4,0),COLOR0066FF
STICKLINE(VAR9>VARA,VARA+(4/5)*(VAR9-VARA),VARA+(5/5)*(VAR9-VARA),4,0),COLOR0033FF
STICKLINE(VAR9<=VARA,VARA,VARA-(1/5)*(VAR9-VARA),4,0),COLOR00FF33
STICKLINE(VAR9<=VARA,VARA-(1/5)*(VAR9-VARA),VARA-(2/5)*(VAR9-VARA),4,0),COLOR33FF33
STICKLINE(VAR9<=VARA,VARA-(2/5)*(VAR9-VARA),VARA-(3/5)*(VAR9-VARA),4,0),COLOR66FF33
STICKLINE(VAR9<=VARA,VARA-(3/5)*(VAR9-VARA),VARA-(4/5)*(VAR9-VARA),4,0),COLOR99FF33
STICKLINE(VAR9<=VARA,VARA-(4/5)*(VAR9-VARA),VARA-(5/5)*(VAR9-VARA),4,0),COLORCCFF33
STICKLINE(AA1>0,1日前的K,1日前的K+(1/5)*(K-1日前的K),6,0),COLOR0000FF
STICKLINE(AA1>0,1日前的K+(1/5)*(K-1日前的K),1日前的K+(2/5)*(K-1日前的K),6,0),COLOR3300FF
STICKLINE(AA1>0,1日前的K+(2/5)*(K-1日前的K),1日前的K+(3/5)*(K-1日前的K),6,0),COLOR6600FF
STICKLINE(AA1>0,1日前的K+(3/5)*(K-1日前的K),1日前的K+(4/5)*(K-1日前的K),6,0),COLOR9900FF
STICKLINE(AA1>0,1日前的K+(4/5)*(K-1日前的K),1日前的K+(5/5)*(K-1日前的K),6,0),COLORCC00FF
STICKLINE(AA1<=0,1日前的K,K,6,0),COLORFFFF00
输出
快速涨:IFF(VAR9>VARA,(VAR9+VARA)/2,DRAWNULL),NODRAW,COLOR00FFFF
输出
快速跌:IFF(VAR9<=VARA,(VAR9+VARA)/2,DRAWNULL),NODRAW,COLOR00FF33
输出
慢速涨:IFF(AA1>0,K,DRAWNULL),NODRAW,COLORCC00FF
输出
慢速跌:IFF(AA1<=0,K,DRAWNULL),NODRAW,COLORFFFF00