通达信大底判断
VAR1:=MA(CLOSE,5);
VAR2:=MA(CLOSE,10);
VAR3:=MA(CLOSE,20);
VAR4:=MA(CLOSE,30);
VAR5:=(VAR1+VAR2+VAR3+VAR4)/4;
VAR7:(VAR5-REF(VAR5,15))/REF(VAR5,15)*100,COLORWHITE;
VAR9:EMA(VAR7,8),COLORGREEN;
反转:IF(VAR9>REF(VAR9,1),1,DRAWNULL),NODRAW,COLORYELLOW;
STICKLINE(VAR9>REF(VAR9,1),VAR7,0,2,0),COLOR006666;
持股:IF(VAR7>REF(VAR7,1),1,DRAWNULL),NODRAW,COLORRED;
STICKLINE(VAR7>REF(VAR7,1),VAR7,VAR9,2,0),COLORMAGENTA;
STICKLINE(VAR9>REF(VAR9,1) AND REF(VAR9,1)<0 AND VAR9>=0,VAR7,0,2,0),COLORRED;
DRAWICON(VAR9>REF(VAR9,1) AND REF(VAR9,1)<0 AND VAR9>=0,0,5);
DRAWICON(CROSS(VAR7,VAR9) AND VAR9>REF(VAR9,1) AND VAR7>REF(VAR7,1),0,13);
0,DOTLINE,COLORWHITE;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:收盘价的5日简单移动平均
VAR2赋值:收盘价的10日简单移动平均
VAR3赋值:收盘价的20日简单移动平均
VAR4赋值:收盘价的30日简单移动平均
VAR5赋值:(VAR1+VAR2+VAR3+VAR4)/4
输出VAR7:(VAR5-15日前的VAR5)/15日前的VAR5*100,画白色
输出VAR9:VAR7的8日指数移动平均,画绿色
输出反转:IF(VAR9>1日前的VAR9,1,DRAWNULL),NODRAW,画黄色
STICKLINE(VAR9>1日前的VAR9,VAR7,0,2,0),COLOR006666
输出持股:IF(VAR7>1日前的VAR7,1,DRAWNULL),NODRAW,画红色
STICKLINE(VAR7>1日前的VAR7,VAR7,VAR9,2,0),画洋红色
STICKLINE(VAR9>1日前的VAR9 AND 1日前的VAR9<0 AND VAR9>=0,VAR7,0,2,0),画红色
DRAWICON(VAR9>1日前的VAR9 AND 1日前的VAR9<0 AND VAR9>=0,0,5)
DRAWICON(VAR7上穿VAR9 AND VAR9>1日前的VAR9 AND VAR7>1日前的VAR7,0,13)
0,DOTLINE,画白色