通达信【顶底战法】带您一招成名副图+选股公式用法详解
VAR1:=(2*CLOSE+HIGH+LOW)/4;
VAR2:=LLV(LOW,34);
VAR3:=HHV(HIGH,34);
VAR4:=LLV(LOW,21);
VAR5:=HHV(HIGH,21);
VAR6:=EMA((VAR1-VAR4)/(VAR5-VAR2)*100,5);
VAR7:=EMA((VAR1-VAR2)/(VAR3-VAR2)*100,8);
VAR8:=EMA(VAR7,5);
VAR9:=VAR6-VAR7+20>=20;
VAR18:=VAR7>VAR8;
VAR19:=VAR9 AND VAR18;
重心:VAR6,COLORWHITE;
中轴:50,COLORWHITE;
顶区:VAR7;
STICKLINE(VAR6-VAR7+20>=20,VAR6-VAR7+20,20,5,0),COLORF000FF;
买入:VAR19 AND NOT(REF(VAR18,1)) AND 重心<50,COLORRED,NODRAW;
DRAWTEXT_FIX(C>O,0,0.2,0,'VAR18:VAR19'),COLORMAGENTA;
STICKLINE(VAR7>0 AND (VAR7-VAR8)>=0,80,78,6,0),COLORRED;
STICKLINE(VAR7>0 AND (VAR7-VAR8)<0,80,78,6,1),COLORBLUE;
STICKLINE(VAR7>0 AND (VAR7-VAR8)>=0,20,18,6,0),COLORRED;
STICKLINE(VAR7>0 AND (VAR7-VAR8)<0,20,18,6,1),COLORBLUE;
STICKLINE(VAR7>VAR8,VAR7,VAR8,15,1),COLORGREEN;
DRAWICON(买入,重心,9);
DRAWICON(CROSS(80,重心),重心,2);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:(2*收盘价+最高价+最低价)/4
VAR2赋值:34日内最低价最低值
VAR3赋值:34日内最高价最高值
VAR4赋值:21日内最低价最低值
VAR5赋值:21日内最高价最高值
VAR6赋值:EMA((VAR1-VAR4)/(VAR5-VAR2)*100,5)
VAR7赋值:EMA((VAR1-VAR2)/(VAR3-VAR2)*100,8)
VAR8赋值:VAR7的5日指数移动平均
VAR9赋值:VAR6-VAR7+20>=20
VAR18:=VAR7>VAR8
VAR19:=VAR9 AND VAR18
输出重心:VAR6,画白色
输出中轴:50,画白色
输出顶区:VAR7
当满足条件VAR6-VAR7+20>=20时,在VAR6-VAR7+20和20之间画柱状线
输出买入:VAR19 AND NOT(1日前的VAR18) AND 重心<50,画红色,NODRAW
当满足条件C>O时,在横轴0纵轴0.2位置书写文字
STICKLINE(VAR7>0 AND (VAR7-VAR8)>=0,80,78,6,0),画红色
STICKLINE(VAR7>0 AND (VAR7-VAR8)<0,80,78,6,1), 画蓝色
STICKLINE(VAR7>0 AND (VAR7-VAR8)>=0,20,18,6,0),画红色
STICKLINE(VAR7>0 AND (VAR7-VAR8)<0,20,18,6,1), 画蓝色
当满足条件VAR7>VAR8时,在VAR7和VAR8之间画柱状线
当满足条件买入时,在重心和9之间画图标
DRAWICON(80上穿重心,重心,2)