罗刹股市通达信指标 副图 源码 测试图
短线:=20*(CLOSE-MA(CLOSE,3))/MA(CLOSE,3)*20,LINETHICK0,COLORYELLOW;
中线:=20*(CLOSE-MA(CLOSE,3))/MA(CLOSE,3)*20,LINETHICK0,COLORWHITE;
红柱持股:SMA(短线,3,1),COLORRED,NODRAW;
蓝柱持币:SMA(中线,3,1),COLORFFFF00,NODRAW;
VAR1:=红柱持股;
VAR2:=蓝柱持币;
STICKLINE(VAR1< REF(VAR1,0.5)AND VAR1>0,0,VAR1,3,0),COLOR0000AA;
STICKLINE(VAR1< REF(VAR1,0.5)AND VAR1>0,0,VAR1,2.3,0),COLOR0000BB;
STICKLINE(VAR1< REF(VAR1,0.5)AND VAR1>0,0,VAR1,2,0),COLOR0000CC;
STICKLINE(VAR1< REF(VAR1,0.5)AND VAR1>0,0,VAR1,1.6,0),COLOR0000DD;
STICKLINE(VAR1< REF(VAR1,0.5)AND VAR1>0,0,VAR1,1.3,0),COLOR0000EE;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1>0,0,VAR1,1,0),COLOR0000FF;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1>0,0,VAR1,0.65,1),COLORRED;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1>0,0,VAR1,1,0),COLOR00FF00;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1>0,0,VAR1,3,0),COLOR0000AA;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1>0,0,VAR1,2.3,0),COLOR0000BB;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1>0,0,VAR1,2,0),COLOR0000CC;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1>0,0,VAR1,1.6,0),COLOR0000DD;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1>0,0,VAR1,1.3,0),COLOR0000EE;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1>0,0,VAR1,1,0),COLOR0000FF;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1>0,0,VAR1,0.65,0),COLORRED;
STICKLINE(VAR2< REF(VAR2,1) AND VAR2>0,0,VAR2,9,0),COLOR0000FF;
STICKLINE(VAR2< REF(VAR2,1) AND VAR2>0,0,VAR2,2.3,0),COLOR0033FF;
STICKLINE(VAR2< REF(VAR2,1) AND VAR2>0,0,VAR2,2,0),COLOR0055FF;
STICKLINE(VAR2< REF(VAR2,1) AND VAR2>0,0,VAR2,1.6,0),COLOR0077FF;
STICKLINE(VAR2< REF(VAR2,1) AND VAR2>0,0,VAR2,1.3,0),COLOR0099FF;
STICKLINE(VAR2< REF(VAR2,1) AND VAR2>0,0,VAR2,1,0),COLOR00BBFF;
STICKLINE(VAR2< REF(VAR2,1) AND VAR2>0,0,VAR2,0.65,0),COLOR00DDFF;
STICKLINE(VAR2< REF(VAR2,1) AND VAR2>0,0,VAR2,1,0),COLOR00FFFF;
STICKLINE(VAR1>REF(VAR1,0)AND VAR1< 0,0,VAR1,3,0),COLORFF0000;
STICKLINE(VAR1>REF(VAR1,0)AND VAR1< 0,0,VAR1,2.3,0),COLORFF3300;
STICKLINE(VAR1>REF(VAR1,0)AND VAR1< 0,0,VAR1,2,0),COLORFF5500;
STICKLINE(VAR1>REF(VAR1,0)AND VAR1< 0,0,VAR1,1.6,0),COLORFF7700;
STICKLINE(VAR1>REF(VAR1,0)AND VAR1< 0,0,VAR1,1.3,0),COLORFF9900;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1< 0,0,VAR1,1,0),COLORFFBB00;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1< 0,0,VAR1,0.65,0),COLORFFDD00;
STICKLINE(VAR1>REF(VAR1,1)AND VAR1< 0,0,VAR1,1,1),COLORFF00FF;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1< 0,0,VAR1,3,0),COLORFF0000;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1< 0,0,VAR1,2.3,0),COLORFF3300;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1< 0,0,VAR1,2,0),COLORFF5500;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1< 0,0,VAR1,1.6,0),COLORFF7700;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1< 0,0,VAR1,1.3,0),COLORFF9900;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1< 0,0,VAR1,1,0),COLORFFBB00;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1< 0,0,VAR1,0.65,0),COLORFFDD00;
STICKLINE(VAR1< REF(VAR1,1)AND VAR1< 0,0,VAR1,0,0),COLORFFFF00;
STICKLINE(VAR2>REF(VAR2,1)AND VAR2< 0,0,VAR2,3.5,0),COLOR990099;
STICKLINE(VAR2>REF(VAR2,1)AND VAR2< 0,0,VAR2,2,0),COLORBB00BB;
STICKLINE(VAR2>REF(VAR2,1)AND VAR2< 0,0,VAR2,1,0),COLORDD00DD;
STICKLINE(VAR2>REF(VAR2,1)AND VAR2< 0,0,VAR2,0,0),COLORFF00FF;
DRAWTEXT(CROSS(VAR1,0),0-0,'追'),COLORFF00FF;
DRAWTEXT(CROSS(VAR2,0),0-0,'买'),COLORGREEN;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
短线赋值:20*(收盘价-收盘价的3日简单移动平均)/收盘价的3日简单移动平均*20,LINETHICK0,画黄色
中线赋值:20*(收盘价-收盘价的3日简单移动平均)/收盘价的3日简单移动平均*20,LINETHICK0,画白色
短线的3日[1日权重]移动平均
中线的3日[1日权重]移动平均
VAR1赋值:红柱持股
VAR2赋值:蓝柱持币
STICKLINE(VAR1< 0.5日前的VAR1AND VAR1>0,0,VAR1,3,0),COLOR0000AA
STICKLINE(VAR1< 0.5日前的VAR1AND VAR1>0,0,VAR1,2.3,0),COLOR0000BB
STICKLINE(VAR1< 0.5日前的VAR1AND VAR1>0,0,VAR1,2,0),COLOR0000CC
STICKLINE(VAR1< 0.5日前的VAR1AND VAR1>0,0,VAR1,1.6,0),COLOR0000DD
STICKLINE(VAR1< 0.5日前的VAR1AND VAR1>0,0,VAR1,1.3,0),COLOR0000EE
STICKLINE(VAR1< 1日前的VAR1AND VAR1>0,0,VAR1,1,0),COLOR0000FF
STICKLINE(VAR1< 1日前的VAR1AND VAR1>0,0,VAR1,0.65,1),画红色
STICKLINE(VAR1< 1日前的VAR1AND VAR1>0,0,VAR1,1,0),COLOR00FF00
STICKLINE(VAR1>1日前的VAR1AND VAR1>0,0,VAR1,3,0),COLOR0000AA
STICKLINE(VAR1>1日前的VAR1AND VAR1>0,0,VAR1,2.3,0),COLOR0000BB
STICKLINE(VAR1>1日前的VAR1AND VAR1>0,0,VAR1,2,0),COLOR0000CC
STICKLINE(VAR1>1日前的VAR1AND VAR1>0,0,VAR1,1.6,0),COLOR0000DD
STICKLINE(VAR1>1日前的VAR1AND VAR1>0,0,VAR1,1.3,0),COLOR0000EE
STICKLINE(VAR1>1日前的VAR1AND VAR1>0,0,VAR1,1,0),COLOR0000FF
STICKLINE(VAR1>1日前的VAR1AND VAR1>0,0,VAR1,0.65,0),画红色
STICKLINE(VAR2< 1日前的VAR2 AND VAR2>0,0,VAR2,9,0),COLOR0000FF
STICKLINE(VAR2< 1日前的VAR2 AND VAR2>0,0,VAR2,2.3,0),COLOR0033FF
STICKLINE(VAR2< 1日前的VAR2 AND VAR2>0,0,VAR2,2,0),COLOR0055FF
STICKLINE(VAR2< 1日前的VAR2 AND VAR2>0,0,VAR2,1.6,0),COLOR0077FF
STICKLINE(VAR2< 1日前的VAR2 AND VAR2>0,0,VAR2,1.3,0),COLOR0099FF
STICKLINE(VAR2< 1日前的VAR2 AND VAR2>0,0,VAR2,1,0),COLOR00BBFF
STICKLINE(VAR2< 1日前的VAR2 AND VAR2>0,0,VAR2,0.65,0),COLOR00DDFF
STICKLINE(VAR2< 1日前的VAR2 AND VAR2>0,0,VAR2,1,0),COLOR00FFFF
STICKLINE(VAR1>0日前的VAR1AND VAR1< 0,0,VAR1,3,0),COLORFF0000
STICKLINE(VAR1>0日前的VAR1AND VAR1< 0,0,VAR1,2.3,0),COLORFF3300
STICKLINE(VAR1>0日前的VAR1AND VAR1< 0,0,VAR1,2,0),COLORFF5500
STICKLINE(VAR1>0日前的VAR1AND VAR1< 0,0,VAR1,1.6,0),COLORFF7700
STICKLINE(VAR1>0日前的VAR1AND VAR1< 0,0,VAR1,1.3,0),COLORFF9900
STICKLINE(VAR1>1日前的VAR1AND VAR1< 0,0,VAR1,1,0),COLORFFBB00
STICKLINE(VAR1>1日前的VAR1AND VAR1< 0,0,VAR1,0.65,0),COLORFFDD00
STICKLINE(VAR1>1日前的VAR1AND VAR1< 0,0,VAR1,1,1),COLORFF00FF
STICKLINE(VAR1< 1日前的VAR1AND VAR1< 0,0,VAR1,3,0),COLORFF0000
STICKLINE(VAR1< 1日前的VAR1AND VAR1< 0,0,VAR1,2.3,0),COLORFF3300
STICKLINE(VAR1< 1日前的VAR1AND VAR1< 0,0,VAR1,2,0),COLORFF5500
STICKLINE(VAR1< 1日前的VAR1AND VAR1< 0,0,VAR1,1.6,0),COLORFF7700
STICKLINE(VAR1< 1日前的VAR1AND VAR1< 0,0,VAR1,1.3,0),COLORFF9900
STICKLINE(VAR1< 1日前的VAR1AND VAR1< 0,0,VAR1,1,0),COLORFFBB00
STICKLINE(VAR1< 1日前的VAR1AND VAR1< 0,0,VAR1,0.65,0),COLORFFDD00
STICKLINE(VAR1< 1日前的VAR1AND VAR1< 0,0,VAR1,0,0),COLORFFFF00
STICKLINE(VAR2>1日前的VAR2AND VAR2< 0,0,VAR2,3.5,0),COLOR990099
STICKLINE(VAR2>1日前的VAR2AND VAR2< 0,0,VAR2,2,0),COLORBB00BB
STICKLINE(VAR2>1日前的VAR2AND VAR2< 0,0,VAR2,1,0),COLORDD00DD
STICKLINE(VAR2>1日前的VAR2AND VAR2< 0,0,VAR2,0,0),COLORFF00FF
DRAWTEXT(VAR1上穿0,0-0,'追'),COLORFF00FF
DRAWTEXT(VAR2上穿0,0-0,'买'),画绿色