同花顺牛熊买卖图副图指标 源码分享 附图
买线:EMA(C,3),colorred;
卖线:EMA(SLOPE(C,21)*20+C,55),colorgreen,LINETHICK4;
IF(卖线>=REF(卖线,1),卖线,DRAWNULL),colormagenta,LINETHICK4;
买卖差:=买线-卖线;
STICKLINE(买卖差>=0,(买线-买卖差*0.05),(买线-买卖差*0.15),2,0) ,COLOR00FFFF;
STICKLINE(买卖差>=0,(买线-买卖差*0.2),(买线-买卖差*0.35),2,0) ,COLOR00CCFF;
STICKLINE(买卖差>=0,(买线-买卖差*0.4),(买线-买卖差*0.55),2,0) ,COLOR0099FF;
STICKLINE(买卖差>=0,(买线-买卖差*0.6),(买线-买卖差*0.75),2,0) ,COLOR0066FF;
STICKLINE(买卖差>=0,(买线-买卖差*0.8),(买线-买卖差*0.95),2,0) ,COLOR0000CC;
STICKLINE(买卖差<0,(卖线+买卖差*0.05),(卖线+买卖差*0.15),2,0) ,COLOR006600;
STICKLINE(买卖差<0,(卖线+买卖差*0.2),(卖线+买卖差*0.35),2,0) ,COLOR009900;
STICKLINE(买卖差<0,(卖线+买卖差*0.4),(卖线+买卖差*0.55),2,0) ,COLOR00CC00;
STICKLINE(买卖差<0,(卖线+买卖差*0.6),(卖线+买卖差*0.75),2,0) ,COLOR00FF00;
STICKLINE(买卖差<0,(卖线+买卖差*0.8),(卖线+买卖差*0.95),2,0) ,COLOR66FF00;
走牛期:BARSLASTCOUNT(买线>卖线 AND 卖线>REF(卖线,1) ),coloryellow,NODRAW;
走牛利润:(CLOSE/REF(CLOSE,走牛期)-1)*100,COLOR00FFFF,NODRAW;
来函数检测结果如下:
该公式没有未来函数
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出买线:C的3日指数移动平均,画红色
输出卖线:EMA(SLOPE(C,21)*20+C,55),画绿色,LINETHICK4
IF(卖线>=1日前的卖线,卖线,DRAWNULL),画洋红色,LINETHICK4
买卖差赋值:买线-卖线
STICKLINE(买卖差>=0,(买线-买卖差*0.05),(买线-买卖差*0.15),2,0) ,COLOR00FFFF
STICKLINE(买卖差>=0,(买线-买卖差*0.2),(买线-买卖差*0.35),2,0) ,COLOR00CCFF
STICKLINE(买卖差>=0,(买线-买卖差*0.4),(买线-买卖差*0.55),2,0) ,COLOR0099FF
STICKLINE(买卖差>=0,(买线-买卖差*0.6),(买线-买卖差*0.75),2,0) ,COLOR0066FF
STICKLINE(买卖差>=0,(买线-买卖差*0.8),(买线-买卖差*0.95),2,0) ,COLOR0000CC
STICKLINE(买卖差<0,(卖线+买卖差*0.05),(卖线+买卖差*0.15),2,0) ,COLOR006600
STICKLINE(买卖差<0,(卖线+买卖差*0.2),(卖线+买卖差*0.35),2,0) ,COLOR009900
STICKLINE(买卖差<0,(卖线+买卖差*0.4),(卖线+买卖差*0.55),2,0) ,COLOR00CC00
STICKLINE(买卖差<0,(卖线+买卖差*0.6),(卖线+买卖差*0.75),2,0) ,COLOR00FF00
STICKLINE(买卖差<0,(卖线+买卖差*0.8),(卖线+买卖差*0.95),2,0) ,COLOR66FF00
输出走牛期:BARSLASTCOUNT(买线>卖线 AND 卖线>1日前的卖线 ),画黄色,NODRAW
输出走牛利润:(收盘价/走牛期日前的收盘价-1)*100,COLOR00FFFF,NODRAW