通达信顺势擒龙主图指标
AAA:=(3*C+H+L+O)/6;
VAR1:=WMA(AAA,8);
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
龙线:VAR1,COLORRED;
渊线:VAR6,COLORYELLOW;
龙跃于渊:IFF(龙线>渊线,龙线,DRAWNULL),NODRAW,COLORRED;
潜龙勿用:IFF(VAR1==VAR6,VAR6,DRAWNULL),COLORGREEN;
MA20:=EMA(CLOSE,20);
MA40:=EMA(CLOSE,40);
MA60:=EMA(C,60);
{股票指标网}
AA:=BARSLAST(MA40>MA60 AND (MA20==MA40 OR MA20>MA40));
BB:=REF(COUNT(C<MA60,AA)==AA,1);
CC:=CROSS(C,MA60) AND VOL>MA(VOL,5) AND (C-REF(C,1))/REF(C,1)*100>3;
顺势擒龙:IFF((BB AND CC),龙线,0),NODRAW,COLORYELLOW;
上线:=MAX(CLOSE,OPEN);
下线:=MIN(CLOSE,OPEN);
{股票指标网}
STICKLINE(顺势擒龙,H,L,0,0),COLORYELLOW;
STICKLINE(顺势擒龙,上线,下线,8,0),COLOR00FFFF;
STICKLINE(顺势擒龙,上线-0.10*ABS(上线-下线),下线+0.10*ABS(上线-下线),8,0),COLOR00DDFF;
STICKLINE(顺势擒龙,上线-0.15*ABS(上线-下线),下线+0.15*ABS(上线-下线),8,0),COLOR00BBFF;
STICKLINE(顺势擒龙,上线-0.20*ABS(上线-下线),下线+0.20*ABS(上线-下线),8,0),COLOR0099FF;
STICKLINE(顺势擒龙,上线-0.25*ABS(上线-下线),下线+0.25*ABS(上线-下线),8,0),COLOR0077FF;
STICKLINE(顺势擒龙,上线-0.30*ABS(上线-下线),下线+0.30*ABS(上线-下线),8,0),COLOR0055FF;
STICKLINE(顺势擒龙,上线-0.35*ABS(上线-下线),下线+0.35*ABS(上线-下线),8,0),COLOR0033FF;
STICKLINE(顺势擒龙,上线-0.40*ABS(上线-下线),下线+0.40*ABS(上线-下线),8,0),COLOR0022FF;
STICKLINE(顺势擒龙,上线-0.45*ABS(上线-下线),下线+0.45*ABS(上线-下线),8,0),COLOR0000FF;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
AAA赋值:(3*C+H+L+O)/6
VAR1赋值:WAAA的8日简单移动平均
VAR2赋值:(5日内VAR1最高值+10日内VAR1最高值+20日内VAR1最高值)/3
VAR3赋值:(5日内VAR1最低值+10日内VAR1最低值+20日内VAR1最低值)/3
VAR4赋值:(5日内VAR2最高值+10日内VAR2最高值+20日内VAR2最高值)/3
VAR5赋值:(5日内VAR3最低值+10日内VAR3最低值+20日内VAR3最低值)/3
VAR6赋值:(2日内VAR1最低值+4日内VAR1最低值+6日内VAR1最低值)/3
输出
龙线:VAR1,画红色
输出
渊线:VAR6,画黄色
输出
龙跃于渊:IFF(龙线>渊线,龙线,DRAWNULL),NODRAW,画红色
输出
潜龙勿用:IFF(VAR1==VAR6,VAR6,DRAWNULL),画绿色
MA20赋值:收盘价的20日指数移动平均
MA40赋值:收盘价的40日指数移动平均
MA60赋值:C的60日指数移动平均
{股票指标网}
AA赋值:上次MA40>MA60 AND (MA20==MA40 OR MA20>MA40距今天数)
BB赋值:1日前的统计AA日满足C
CC赋值:C上穿MA60 AND 成交量>成交量的5日简单移动平均 AND (C-1日前的C)/1日前的C*100>3
输出
顺势擒龙:IFF((BB AND CC),龙线,0),NODRAW,画黄色
上线赋值:收盘价和开盘价较大值
下线赋值:收盘价和开盘价的较小值
当满足条件顺势擒龙时,在H和L之间画柱状线
当满足条件顺势擒龙时,在上线和下线之间画柱状线
STICKLINE(顺势擒龙,上线-0.10*上线-下线的绝对值,下线+0.10*上线-下线的绝对值,8,0),COLOR00DDFF
STICKLINE(顺势擒龙,上线-0.15*上线-下线的绝对值,下线+0.15*上线-下线的绝对值,8,0),COLOR00BBFF
STICKLINE(顺势擒龙,上线-0.20*上线-下线的绝对值,下线+0.20*上线-下线的绝对值,8,0),COLOR0099FF
STICKLINE(顺势擒龙,上线-0.25*上线-下线的绝对值,下线+0.25*上线-下线的绝对值,8,0),COLOR0077FF
STICKLINE(顺势擒龙,上线-0.30*上线-下线的绝对值,下线+0.30*上线-下线的绝对值,8,0),COLOR0055FF
STICKLINE(顺势擒龙,上线-0.35*上线-下线的绝对值,下线+0.35*上线-下线的绝对值,8,0),COLOR0033FF
STICKLINE(顺势擒龙,上线-0.40*上线-下线的绝对值,下线+0.40*上线-下线的绝对值,8,0),COLOR0022FF
STICKLINE(顺势擒龙,上线-0.45*上线-下线的绝对值,下线+0.45*上线-下线的绝对值,8,0),COLOR0000FF