红绿买一绝红柱买绿柱卖通达信公式 副图 源码附图有未来函数
VAR1:=C-REF(C,1);
VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);
VAR3:=CROSS(EMA(C,19),EMA(C,7));
VAR4:=CROSS(EMA(C,7),EMA(C,19));
Z1:=L=LLV(L,BARSLAST(VAR3)+1);
Z2:=LLV(L,BARSLAST(VAR3)+1);
Z3:=H=HHV(H,BARSLAST(VAR4)+1);
Z4:=HHV(H,BARSLAST(VAR4)+1);
VARA:=DRAWLINE(Z1,Z2,Z3,Z4,0),COLORMAGENTA,LINETHICK2;
Y1:=H=HHV(H,BARSLAST(VAR4)+1);
Y2:=HHV(H,BARSLAST(VAR4)+1);
Y3:=L=LLV(L,BARSLAST(VAR3)+1);
Y4:=LLV(L,BARSLAST(VAR3)+1);
VARB:=DRAWLINE(Y1,Y2,Y3,Y4,0),COLORCYAN,LINETHICK2;
X01:=LLV(VAR2,2)=LLV(VAR2,7);
X2:=COUNT(VAR2<0,2);
X3:=CROSS(VAR2,MA(VAR2,2));
X4:=REF(VARB,1)<REF(VARB,2);
X5:=VARA>REF(VARB,1);
{}
买进:(X01 AND X2 AND X3) AND X4 AND X5;
TJ0:=IF(VARA<REF(VARA,1) AND VARB=VARA,1,0);
TJ1:=IF(VARB<REF(VARB,1) AND VARB=VARA,1,0);
持股:IF(VARB<REF(VARB,1) AND VARB<VARA,23,0),STICK,COLOR000088,LINETHICK3;
STICKLINE(VARB<REF(VARB,1),0,35,2,0)COLOR006600;
买一绝:IF(REF(TJ1,1)=0 AND TJ1>=1,60,0),STICK,COLORRED,LINETHICK3;
堪称卖绝:IF(REF(TJ0,1)=0 AND TJ0>=1,60,0),STICK,COLORCYAN,LINETHICK3;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:C-1日前的C
VAR2赋值:100*VAR1的6日指数移动平均,6)/EMA(EMA(VAR1的绝对值,6),6)
VAR3赋值:CROSS(C的19日指数移动平均,C的7日指数移动平均)
VAR4赋值:CROSS(C的7日指数移动平均,C的19日指数移动平均)
Z1赋值:L=LLV(L,上次VAR3距今天数+1)
Z2赋值:LLV(L,上次VAR3距今天数+1)
Z3赋值:H=HHV(H,上次VAR4距今天数+1)
Z4赋值:HHV(H,上次VAR4距今天数+1)
VARA赋值:DRAWLINE(Z1,Z2,Z3,Z4,0),画洋红色, 线宽为2
Y1赋值:H=HHV(H,上次VAR4距今天数+1)
Y2赋值:HHV(H,上次VAR4距今天数+1)
Y3赋值:L=LLV(L,上次VAR3距今天数+1)
Y4赋值:LLV(L,上次VAR3距今天数+1)
VARB赋值:DRAWLINE(Y1,Y2,Y3,Y4,0),画青色, 线宽为2
X01赋值:2日内VAR2最低值=7日内VAR2最低值
X2赋值:统计2日满足VAR2<0的天数
X3赋值:CROSS(VAR2,VAR2的2日简单移动平均)
X4赋值:1日前的VARB<2日前的VARB
X5赋值:VARA>1日前的VARB
输出{}
买进:(X01 AND X2 AND X3) AND X4 AND X5
TJ0赋值:IF(VARA<1日前的VARA AND VARB=VARA,1,0)
TJ1赋值:IF(VARB<1日前的VARB AND VARB=VARA,1,0)
输出持股:IF(VARB<1日前的VARB AND VARB
STICKLINE(VARB<1日前的VARB,0,35,2,0)COLOR006600
输出买一绝:IF(1日前的TJ1=0 AND TJ1>=1,60,0),STICK,画红色, 线宽为3
输出堪称卖绝:IF(1日前的TJ0=0 AND TJ0>=1,60,0),STICK,画青色, 线宽为3