通达信四维看盘主图
N1:=100;
N2:=3;
N3:=0;
N4:=1;
N5:=1;
N6:=1;
N7:=1;
N8:=1;
N9:=0;
N10:=0;
N11:=0;
N12:=3;
周期:CURRBARSCOUNT,NODRAW,COLORGREEN;
X_1:=REFX(HHV(MAX(OPEN,CLOSE),N1),周期-1);
X_2:=REFX(LLV(LOW,N1),周期-1);
X_3:=CLOSE/REF(CLOSE,1)<=1-N2/100 AND OPEN>CLOSE AND DATE<=1151101;
均五:IF(N9>0,MA(CLOSE,5),DRAWNULL),COLORWHITE;
均十:IF(N10>0,MA(CLOSE,10),DRAWNULL),COLORYELLOW;
均二十:IF(N11>0,MA(CLOSE,20),DRAWNULL),COLORMAGENTA;
X_4:=IF(N12=1,0.5,IF(N12=2,1,IF(N12=3,(-1),IF(N12=4,3,4))));
X_5:=0;
X_6:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1)),周期-1);
X_7:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_6)),周期-1);
X_8:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_7)),周期-1);
X_9:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_8)),周期-1);
X_10:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_9)),周期-1);
X_11:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_10)),周期-1);
X_12:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_11)),周期-1);
X_13:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_12)),周期-1);
X_14:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_13)),周期-1);
X_15:=REFX(BARSLAST(X_3 AND OPEN<X_1),周期-1)+1;
X_16:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_6),周期-1)+1;
X_17:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_7),周期-1)+1;
X_18:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_8),周期-1)+1;
X_19:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_9),周期-1)+1;
X_20:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_10),周期-1)+1;
X_21:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_11),周期-1)+1;
X_22:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_12),周期-1)+1;
X_23:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_13),周期-1)+1;
X_24:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_6,X_15-周期)=0);
X_25:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_7,X_16-周期)=0);
X_26:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_8,X_17-周期)=0);
X_27:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_9,X_18-周期)=0);
X_28:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_10,X_19-周期)=0);
X_29:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_11,X_20-周期)=0);
X_30:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_12,X_21-周期)=0);
X_31:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_13,X_22-周期)=0);
X_32:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_14,X_23-周期)=0);
STICKLINE(周期<X_15 AND X_24,X_6,X_6,X_4,X_5),COLORLIGREEN;
STICKLINE(周期<X_16 AND X_25,X_7,X_7,X_4,X_5),COLORLIBLUE;
STICKLINE(周期<X_17 AND X_26,X_8,X_8,X_4,X_5),COLORLIGREEN;
STICKLINE(周期<X_18 AND X_27,X_9,X_9,X_4,X_5),COLORLIBLUE;
STICKLINE(周期<X_19 AND X_28,X_10,X_10,X_4,X_5),COLORLIGREEN;
STICKLINE(周期<X_20 AND X_29,X_11,X_11,X_4,X_5),COLORLIBLUE;
STICKLINE(周期<X_21 AND X_30,X_12,X_12,X_4,X_5),COLORLIGREEN;
STICKLINE(周期<X_22 AND X_31,X_13,X_13,X_4,X_5),COLORLIBLUE;
STICKLINE(周期<X_23 AND X_32,X_14,X_14,X_4,X_5),COLORLIGREEN;
DRAWTEXT(ISLASTBAR,X_6,VAR2STR(X_6,2)),COLORLIRED;
DRAWTEXT(ISLASTBAR,X_7,VAR2STR(X_7,2)),COLORLIRED;
DRAWTEXT(ISLASTBAR,X_8,VAR2STR(X_8,2)),COLORLIRED;
DRAWTEXT(ISLASTBAR,X_9,VAR2STR(X_9,2)),COLORLIRED;
DRAWTEXT(ISLASTBAR,X_10,VAR2STR(X_10,2)),COLORLIRED;
DRAWTEXT(ISLASTBAR,X_11,VAR2STR(X_11,2)),COLORLIRED;
DRAWTEXT(ISLASTBAR,X_12,VAR2STR(X_12,2)),COLORLIRED;
DRAWTEXT(ISLASTBAR,X_13,VAR2STR(X_13,2)),COLORLIRED;
DRAWTEXT(ISLASTBAR,X_14,VAR2STR(X_14,2)),COLORLIRED;
X_33:=LOW*0.98;
A:IF(N4>0 AND X_6=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIGREEN;
B:IF(N4>0 AND X_7=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIBLUE;
D:IF(N4>0 AND X_8=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIGREEN;
E:IF(N4>0 AND X_9=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIBLUE;
F:IF(N4>0 AND X_10=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIGREEN;
G:IF(N4>0 AND X_11=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIBLUE;
I:IF(N4>0 AND X_12=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIGREEN;
J:IF(N4>0 AND X_13=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIBLUE;
K:IF(N4>0 AND X_14=OPEN AND X_3,X_33,DRAWNULL),STICK,COLORLIGREEN;
DRAWTEXT(N6>0 AND REFX(X_6=OPEN AND X_3,1),X_2,VAR2STR(X_16-X_15,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N6>0 AND REFX(X_7=OPEN AND X_3,1),X_2,VAR2STR(X_17-X_16,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N6>0 AND REFX(X_8=OPEN AND X_3,1),X_2,VAR2STR(X_18-X_17,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N6>0 AND REFX(X_9=OPEN AND X_3,1),X_2,VAR2STR(X_19-X_18,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N6>0 AND REFX(X_10=OPEN AND X_3,1),X_2,VAR2STR(X_20-X_19,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N6>0 AND REFX(X_11=OPEN AND X_3,1),X_2,VAR2STR(X_21-X_20,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N6>0 AND REFX(X_12=OPEN AND X_3,1),X_2,VAR2STR(X_22-X_21,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N6>0 AND REFX(X_13=OPEN AND X_3,1),X_2,VAR2STR(X_23-X_22,0)),COLORGREEN,LINETHICK9;
X_34:=CLOSE/REF(CLOSE,1)>=1.099 AND CLOSE=HIGH;
STICKLINE(N7>0 AND X_34,OPEN,CLOSE,(-1),0),COLORMAGENTA;
X_35:=CLOSE/REF(CLOSE,1)<=0.9 AND LOW=CLOSE;
STICKLINE(N5>0 AND X_35,OPEN,CLOSE*1.009,(-1),0),COLORLIBLUE;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_6,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_7,HIGH,VAR2STR(周期,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_8,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_9,HIGH,VAR2STR(周期,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_10,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_11,HIGH,VAR2STR(周期,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_12,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_13,HIGH,VAR2STR(周期,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_14,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(ISLASTBAR,X_2,VAR2STR(X_15,0)),COLORGREEN,LINETHICK9;
STICKLINE(周期<X_23,X_2,X_2,X_4,X_5),COLORLIGREEN;
未来函数检测结果如下:
该公式包含未来函数:REFX
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N1赋值:100
N2赋值:3
N3赋值:0
N4赋值:1
N5赋值:1
N6赋值:1
N7赋值:1
N8赋值:1
N9赋值:0
N10:=0
N11:=0
N12:=3
输出
周期: 到最后交易的周期,NODRAW,画绿色
X_1赋值:REFX(N1日内开盘价和收盘价较大值最高值,周期-1)
X_2赋值:REFX(N1日内最低价最低值,周期-1)
X_3赋值:收盘价/1日前的收盘价<=1-N2/100 AND 开盘价>收盘价 AND DATE<=1151101
输出
均五:IF(N9>0,收盘价的5日简单移动平均,DRAWNULL),画白色
输出
均十:IF(N10>0,收盘价的10日简单移动平均,DRAWNULL),画黄色
输出
均二十:IF(N11>0,收盘价的20日简单移动平均,DRAWNULL),画洋红色
X_4赋值:IF(N12=1,0.5,IF(N12=2,1,IF(N12=3,(-1),IF(N12=4,3,4))))
X_5赋值:0
X_6赋值:REFX(REF(开盘价,上次X_3 AND 开盘价
X_7赋值:REFX(REF(开盘价,上次X_3 AND 开盘价X_6距今天数),周期-1)
X_8赋值:REFX(REF(开盘价,上次X_3 AND 开盘价X_7距今天数),周期-1)
X_9赋值:REFX(REF(开盘价,上次X_3 AND 开盘价X_8距今天数),周期-1)
X_10:=REFX(REF(开盘价,上次X_3 AND 开盘价X_9距今天数),周期-1)
X_11:=REFX(REF(开盘价,上次X_3 AND 开盘价X_10距今天数),周期-1)
X_12:=REFX(REF(开盘价,上次X_3 AND 开盘价X_11距今天数),周期-1)
X_13:=REFX(REF(开盘价,上次X_3 AND 开盘价X_12距今天数),周期-1)
X_14:=REFX(REF(开盘价,上次X_3 AND 开盘价X_13距今天数),周期-1)
X_15:=REFX(上次X_3 AND 开盘价
X_16:=REFX(上次X_3 AND 开盘价X_6距今天数,周期-1)+1
X_17:=REFX(上次X_3 AND 开盘价X_7距今天数,周期-1)+1
X_18:=REFX(上次X_3 AND 开盘价X_8距今天数,周期-1)+1
X_19:=REFX(上次X_3 AND 开盘价X_9距今天数,周期-1)+1
X_20:=REFX(上次X_3 AND 开盘价X_10距今天数,周期-1)+1
X_21:=REFX(上次X_3 AND 开盘价X_11距今天数,周期-1)+1
X_22:=REFX(上次X_3 AND 开盘价X_12距今天数,周期-1)+1
X_23:=REFX(上次X_3 AND 开盘价X_13距今天数,周期-1)+1
X_24:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_6,X_15-周期)=0)
X_25:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_7,X_16-周期)=0)
X_26:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_8,X_17-周期)=0)
X_27:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_9,X_18-周期)=0)
X_28:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_10,X_19-周期)=0)
X_29:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_11,X_20-周期)=0)
X_30:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_12,X_21-周期)=0)
X_31:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_13,X_22-周期)=0)
X_32:=IF(N3=1,1,COUNT(开盘价和收盘价较大值>X_14,X_23-周期)=0)
当满足条件周期当满足条件周期当满足条件周期当满足条件周期当满足条件周期当满足条件周期当满足条件周期当满足条件周期当满足条件周期
DRAWTEXT(ISLASTBAR,X_6,VAR2STR(X_6,2)),COLORLIRED
DRAWTEXT(ISLASTBAR,X_7,VAR2STR(X_7,2)),COLORLIRED
DRAWTEXT(ISLASTBAR,X_8,VAR2STR(X_8,2)),COLORLIRED
DRAWTEXT(ISLASTBAR,X_9,VAR2STR(X_9,2)),COLORLIRED
DRAWTEXT(ISLASTBAR,X_10,VAR2STR(X_10,2)),COLORLIRED
DRAWTEXT(ISLASTBAR,X_11,VAR2STR(X_11,2)),COLORLIRED
DRAWTEXT(ISLASTBAR,X_12,VAR2STR(X_12,2)),COLORLIRED
DRAWTEXT(ISLASTBAR,X_13,VAR2STR(X_13,2)),COLORLIRED
DRAWTEXT(ISLASTBAR,X_14,VAR2STR(X_14,2)),COLORLIRED
X_33:=最低价*0.98
如果N4>0 AND X_6=开盘价 AND X_3返回X_33否则返回DRAWNULL
如果N4>0 AND X_7=开盘价 AND X_3返回X_33否则返回DRAWNULL
如果N4>0 AND X_8=开盘价 AND X_3返回X_33否则返回DRAWNULL
如果N4>0 AND X_9=开盘价 AND X_3返回X_33否则返回DRAWNULL
如果N4>0 AND X_10=开盘价 AND X_3返回X_33否则返回DRAWNULL
如果N4>0 AND X_11=开盘价 AND X_3返回X_33否则返回DRAWNULL
如果N4>0 AND X_12=开盘价 AND X_3返回X_33否则返回DRAWNULL
如果N4>0 AND X_13=开盘价 AND X_3返回X_33否则返回DRAWNULL
如果N4>0 AND X_14=开盘价 AND X_3返回X_33否则返回DRAWNULL
DRAWTEXT(N6>0 AND REFX(X_6=开盘价 AND X_3,1),X_2,VAR2STR(X_16-X_15,0)),画青色,LINETHICK9
DRAWTEXT(N6>0 AND REFX(X_7=开盘价 AND X_3,1),X_2,VAR2STR(X_17-X_16,0)),画绿色,LINETHICK9
DRAWTEXT(N6>0 AND REFX(X_8=开盘价 AND X_3,1),X_2,VAR2STR(X_18-X_17,0)),画青色,LINETHICK9
DRAWTEXT(N6>0 AND REFX(X_9=开盘价 AND X_3,1),X_2,VAR2STR(X_19-X_18,0)),画绿色,LINETHICK9
DRAWTEXT(N6>0 AND REFX(X_10=开盘价 AND X_3,1),X_2,VAR2STR(X_20-X_19,0)),画青色,LINETHICK9
DRAWTEXT(N6>0 AND REFX(X_11=开盘价 AND X_3,1),X_2,VAR2STR(X_21-X_20,0)),画绿色,LINETHICK9
DRAWTEXT(N6>0 AND REFX(X_12=开盘价 AND X_3,1),X_2,VAR2STR(X_22-X_21,0)),画青色,LINETHICK9
DRAWTEXT(N6>0 AND REFX(X_13=开盘价 AND X_3,1),X_2,VAR2STR(X_23-X_22,0)),画绿色,LINETHICK9
X_34:=收盘价/1日前的收盘价>=1.099 AND 收盘价=最高价
STICKLINE(N7>0 AND X_34,开盘价,收盘价,(-1),0),画洋红色
X_35:=收盘价/1日前的收盘价<=0.9 AND 最低价=收盘价
STICKLINE(N5>0 AND X_35,开盘价,收盘价*1.009,(-1),0),COLORLIBLUE
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_6,最高价,VAR2STR(周期,0)),画绿色,LINETHICK9
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_7,最高价,VAR2STR(周期,0)),画青色,LINETHICK9
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_8,最高价,VAR2STR(周期,0)),画绿色,LINETHICK9
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_9,最高价,VAR2STR(周期,0)),画青色,LINETHICK9
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_10,最高价,VAR2STR(周期,0)),画绿色,LINETHICK9
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_11,最高价,VAR2STR(周期,0)),画青色,LINETHICK9
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_12,最高价,VAR2STR(周期,0)),画绿色,LINETHICK9
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_13,最高价,VAR2STR(周期,0)),画青色,LINETHICK9
DRAWTEXT(N8>0 AND X_3 AND 开盘价=X_14,最高价,VAR2STR(周期,0)),画绿色,LINETHICK9
DRAWTEXT(ISLASTBAR,X_2,VAR2STR(X_15,0)),画绿色,LINETHICK9
当满足条件周期