通达信SY买与卖指标副图源码
T1R:=XMA(XMA(XMA(EMA(CLOSE,1),2),2),2);
TR1:=EMA((T1R-REF(T1R,1))/REF(T1R,1),1)*1000,COLORFF00FF,NODRAW;
净:=XMA(TR1,11);
流:=EMA(净,11);
主力动向:=EMA(净+流,1)-XMA(净-流,2),COLORFF00FF,NODRAW;
MA1:XMA(主力动向,11),COLORFF00FF,NODRAW;
MA3:EMA(MA1,2);
STICKLINE(CROSS(MA3,MA1),(MA3 *2.12),'抛',6,0),coloryellow;
DRAWTEXT(CROSS(0,MA1),2,'空'),COLOR00FFFF;
STICKLINE(CROSS(MA1,0),-4,'买',6,0),colorFF00FF;
STICKLINE(CROSS(MA1,MA3),(MA3 *2.2),'吸',6,0),colorliblue;
STICKLINE(MA1>=0 AND MA1>=REF(MA1,1),0,MA1,1.2,1),colorred;
STICKLINE(MA1>=0 AND MA1<REF(MA1,1),0,MA1,1.2,0),coloryellow;
STICKLINE(MA1<0 AND MA1>=REF(MA1,1),0,MA1,1.5,0),COLORFF00FF;
STICKLINE(MA1<0 AND MA1<REF(MA1,1),0,MA1,1.2,1),colorblue;
STICKLINE(MA1<=0 AND MA1>=REF(MA1,1),0 ,MA1,3,0),COLORFF6600;
STICKLINE(MA1<=0 AND MA1>=REF(MA1,1),0,MA1,2,0),COLORFF9900;
STICKLINE(MA1<=0 AND MA1>=REF(MA1,1),0,MA1,1.5,0),COLORFFCC00;
STICKLINE(MA1<=0 AND MA1>=REF(MA1,1),0,MA1,0.5,0),colorcyan;
STICKLINE(MA1>=0 AND MA1>=REF(MA1,1),0,MA1,3,0),COLOR000099;
STICKLINE(MA1>=0 AND MA1>=REF(MA1,1),0,MA1,2,0),COLOR0000CC;
STICKLINE(MA1>=0 AND MA1>=REF(MA1,1),0,MA1,1.5,0),COLOR0000FF;
STICKLINE(MA1>=0 AND MA1>=REF(MA1,1),0,MA1,0.5,0),COLORCC66FF;
未来函数检测结果如下:
该公式包含未来函数:XMA
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
T1R赋值:XXX收盘价的1日指数移动平均的2日简单移动平均,2),2)
TR1赋值:EMA((T1R-1日前的T1R)/1日前的T1R,1)*1000,COLORFF00FF,NODRAW
净赋值:XTR1的11日简单移动平均
流赋值:净的11日指数移动平均
主力动向赋值:净+流的1日指数移动平均-X净-流的2日简单移动平均,COLORFF00FF,NODRAW
输出MA1:X主力动向的11日简单移动平均,COLORFF00FF,NODRAW
输出MA3:MA1的2日指数移动平均
STICKLINE(MA3上穿MA1,(MA3 *2.12),'抛',6,0),画黄色
DRAWTEXT(0上穿MA1,2,'空'),COLOR00FFFF
STICKLINE(MA1上穿0,-4,'买',6,0),COLORFF00FF
STICKLINE(MA1上穿MA3,(MA3 *2.2),'吸',6,0),COLORLIBLUE
STICKLINE(MA1>=0 AND MA1>=1日前的MA1,0,MA1,1.2,1),画红色
STICKLINE(MA1>=0 AND MA1<1日前的MA1,0,MA1,1.2,0),画黄色
STICKLINE(MA1<0 AND MA1>=1日前的MA1,0,MA1,1.5,0),COLORFF00FF
STICKLINE(MA1<0 AND MA1<1日前的MA1,0,MA1,1.2,1), 画蓝色
STICKLINE(MA1<=0 AND MA1>=1日前的MA1,0 ,MA1,3,0),COLORFF6600
STICKLINE(MA1<=0 AND MA1>=1日前的MA1,0,MA1,2,0),COLORFF9900
STICKLINE(MA1<=0 AND MA1>=1日前的MA1,0,MA1,1.5,0),COLORFFCC00
STICKLINE(MA1<=0 AND MA1>=1日前的MA1,0,MA1,0.5,0),画青色
STICKLINE(MA1>=0 AND MA1>=1日前的MA1,0,MA1,3,0),COLOR000099
STICKLINE(MA1>=0 AND MA1>=1日前的MA1,0,MA1,2,0),COLOR0000CC
STICKLINE(MA1>=0 AND MA1>=1日前的MA1,0,MA1,1.5,0),COLOR0000FF
STICKLINE(MA1>=0 AND MA1>=1日前的MA1,0,MA1,0.5,0),COLORCC66FF