超短线主图通达信公式 主图 源码附图
VAR1:=EMA(CLOSE,4)-EMA(CLOSE,13);
AA:=VAR1>=REF(VAR1,1);
BB:=VAR1<REF(VAR1,1);
买入:DRAWICON(CROSS(AA,BB),L,1);
卖出:DRAWICON(CROSS(BB,AA),H,2);
STICKLINE(买入,O,(C-O)/2+O,3,0),COLOR335555;
STICKLINE(买入,O,(C-O)/2+O,2.2,0),COLOR338888;
STICKLINE(买入,O,(C-O)/2+O,1.5,0),COLOR33AAAA;
STICKLINE(买入,O,(C-O)/2+O,1,0),COLOR33CCCC;
STICKLINE(买入,O,(C-O)/2+O,0,0),COLOR33EEEE;
STICKLINE(卖出,O,(C-O)/2+O,3,0),COLOR550055;
STICKLINE(卖出,O,(C-O)/2+O,2.2,0),COLOR880088;
STICKLINE(卖出,O,(C-O)/2+O,1.5,0),COLORAA00AA;
STICKLINE(卖出,O,(C-O)/2+O,1,0),COLORCC00CC;
STICKLINE(卖出,O,(C-O)/2+O,0.5,0),COLOREE00EE;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:收盘价的4日指数移动平均-收盘价的13日指数移动平均
AA赋值:VAR1>=1日前的VAR1
BB赋值:VAR1<1日前的VAR1
输出买入:DRAWICON(AA上穿BB,L,1)
输出卖出:DRAWICON(BB上穿AA,H,2)
STICKLINE(买入,O,(C-O)/2+O,3,0),COLOR335555
STICKLINE(买入,O,(C-O)/2+O,2.2,0),COLOR338888
STICKLINE(买入,O,(C-O)/2+O,1.5,0),COLOR33AAAA
STICKLINE(买入,O,(C-O)/2+O,1,0),COLOR33CCCC
STICKLINE(买入,O,(C-O)/2+O,0,0),COLOR33EEEE
STICKLINE(卖出,O,(C-O)/2+O,3,0),COLOR550055
STICKLINE(卖出,O,(C-O)/2+O,2.2,0),COLOR880088
STICKLINE(卖出,O,(C-O)/2+O,1.5,0),COLORAA00AA
STICKLINE(卖出,O,(C-O)/2+O,1,0),COLORCC00CC
STICKLINE(卖出,O,(C-O)/2+O,0.5,0),COLOREE00EE