通达信【牛牪犇战法】主副图 胜率96% 源码 附图
{牛牪犇主图源码如下}
龙头线:MA(CLOSE,3),COLORGREEN;
趋势线:EMA(CLOSE,17),COLORMAGENTA,LINETHICK2;
MA3:EMA(趋势线,4),COLOR111111;
X_1:=IF(REF(CLOSE,1)*1.1-CLOSE<0.01,1,0);
STICKLINE(X_1,OPEN,CLOSE,3,0),COLOR66EEEE;
STICKLINE(X_1,OPEN,CLOSE,2,0),COLOR8800FF;
DRAWBAND(趋势线,RGB(255,0,255),MA3,RGB(0,0,0));
DRAWTEXT_FIX(CLOSE>OPEN,0.01,0.9,0,4),COLOR99EEEE;
X_2:=EMA(趋势线,1);
主力足迹:EMA(CLOSE,89),DOTLINE,COLOR99EEEE;
X_3:=EMA(主力足迹,10);
{牛牪犇副图源码如下}
X_1:=MACD.DIF#MONTH;
X_2:=MACD.DEA#MONTH;
X_3:=MACD.DIF#WEEK;
X_4:=MACD.DEA#WEEK;
X_5:=MACD.DIF;
X_6:=MACD.DEA;
X_7:=CROSS(X_5,X_6);
X_8:=CROSS(X_3,X_4);
X_9:=CROSS(X_1,X_2);
X_10:=IF(CROSS(X_3,X_4),MACD.DIF+0.1,0);
X_11:=IF(X_5>X_6 AND X_3>X_4 AND X_9 OR (X_3>X_4 AND X_1>X_2 AND X_7) AND CLOSE/REF(CLOSE,1)>1.08 OR (X_1>X_2 AND X_5>X_6 AND X_8) OR (X_7 AND X_8 AND X_9),MACD.DIF+0.2,0);
STICKLINE(X_10 AND CLOSE/REF(CLOSE,1)>1.05,0,100,3.2,0),COLOR0077FF;
STICKLINE(X_10 AND CLOSE/REF(CLOSE,1)>1.05,0,100,2.5,0),COLOR0099FF;
STICKLINE(X_10 AND CLOSE/REF(CLOSE,1)>1.05,0,100,1.9,0),COLOR00BBFF;
STICKLINE(X_10 AND CLOSE/REF(CLOSE,1)>1.05,0,100,1.2,0),COLOR00DDFF;
STICKLINE(X_10 AND CLOSE/REF(CLOSE,1)>1.05,0,100,0.3,0),COLORYELLOW;
STICKLINE(X_11 AND CLOSE/REF(CLOSE,1)>1.08,0,100,3,0),COLOR000099;
STICKLINE(X_11 AND CLOSE/REF(CLOSE,1)>1.08,0,100,2.2,0),COLOR0000CC;
STICKLINE(X_11 AND CLOSE/REF(CLOSE,1)>1.08,0,100,1.5,0),COLORRED;
STICKLINE(X_11 AND CLOSE/REF(CLOSE,1)>1.08,0,100,0.5,0),COLORCC66FF;
STICKLINE(X_11 AND CLOSE/REF(CLOSE,1)>1.08,0,100,0.5,0),COLORYELLOW;
DRAWTEXT(X_11 AND CLOSE/REF(CLOSE,1)>1.08,80,1862),COLORYELLOW;
DRAWTEXT(X_10 AND CLOSE/REF(CLOSE,1)>1.05,60,1863),COLORRED;
DRAWTEXT(X_11 AND X_10 AND CLOSE/REF(CLOSE,1)>1.05,40,1864),COLORMAGENTA;
未来函数检测结果如下:
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出{牛牪犇主图源码如下}龙头线:收盘价的3日简单移动平均,画绿色
输出趋势线:收盘价的17日指数移动平均,画洋红色, 线宽为2
输出MA3:趋势线的4日指数移动平均,COLOR111111
X_1赋值:IF(1日前的收盘价*1.1-收盘价<0.01,1,0)
当满足条件X_1时,在开盘价和收盘价之间画柱状线
当满足条件X_1时,在开盘价和收盘价之间画柱状线
DRAWBAND(趋势线,RGB(255,0,255),MA3,RGB(0,0,0))
当满足条件收盘价>开盘价时,在横轴0.01纵轴0.9位置书写文字
X_2赋值:趋势线的1日指数移动平均
输出主力足迹:收盘价的89日指数移动平均,DOTLINE,COLOR99EEEE
X_3赋值:主力足迹的10日指数移动平均
{牛牪犇副图源码如下}X_1赋值:MACD.DIF#MONTH
X_2赋值:MACD.DEA#MONTH
X_3赋值:MACD.DIF#WEEK
X_4赋值:MACD.DEA#WEEK
X_5赋值:MACD.DIF
X_6赋值:MACD.DEA
X_7赋值:X_5上穿X_6
X_8赋值:X_3上穿X_4
X_9赋值:X_1上穿X_2
X_10:=IF(X_3上穿X_4,MACD.DIF+0.1,0)
X_11:=IF(X_5>X_6 AND X_3>X_4 AND X_9 OR (X_3>X_4 AND X_1>X_2 AND X_7) AND 收盘价/1日前的收盘价>1.08 OR (X_1>X_2 AND X_5>X_6 AND X_8) OR (X_7 AND X_8 AND X_9),MACD.DIF+0.2,0)
STICKLINE(X_10 AND 收盘价/1日前的收盘价>1.05,0,100,3.2,0),COLOR0077FF
STICKLINE(X_10 AND 收盘价/1日前的收盘价>1.05,0,100,2.5,0),COLOR0099FF
STICKLINE(X_10 AND 收盘价/1日前的收盘价>1.05,0,100,1.9,0),COLOR00BBFF
STICKLINE(X_10 AND 收盘价/1日前的收盘价>1.05,0,100,1.2,0),COLOR00DDFF
STICKLINE(X_10 AND 收盘价/1日前的收盘价>1.05,0,100,0.3,0),画黄色
STICKLINE(X_11 AND 收盘价/1日前的收盘价>1.08,0,100,3,0),COLOR000099
STICKLINE(X_11 AND 收盘价/1日前的收盘价>1.08,0,100,2.2,0),COLOR0000CC
STICKLINE(X_11 AND 收盘价/1日前的收盘价>1.08,0,100,1.5,0),画红色
STICKLINE(X_11 AND 收盘价/1日前的收盘价>1.08,0,100,0.5,0),COLORCC66FF
STICKLINE(X_11 AND 收盘价/1日前的收盘价>1.08,0,100,0.5,0),画黄色
DRAWTEXT(X_11 AND 收盘价/1日前的收盘价>1.08,80,1862),画黄色
DRAWTEXT(X_10 AND 收盘价/1日前的收盘价>1.05,60,1863),画红色
DRAWTEXT(X_11 AND X_10 AND 收盘价/1日前的收盘价>1.05,40,1864),画洋红色