在线检测未来函数

通达信黄金波浪尺主图指标公式

来源:Internet,编辑:股旁网,2021-08-06

现价:DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOUNT=1,C,3)COLORBROWN,DOTLINE;
{金谷交易系统}
EM01:=EMA(C,13);
EM:=EMA(C,21);
UP:=EMA(EM,13);
DOWN:=EMA(EM,17);
MIDD:(UP+DOWN)/2,NODRAW;
空盈:(EMA(EM01,2)+EMA(EM01,7))/2,COLORGREEN;
多盈:IF(空盈>REF(空盈,1),空盈,DRAWNULL),COLORRED;
STICKLINE(MIDD>REF(MIDD,1),UP,DOWN,1,0),COLORRED;
STICKLINE(MIDD<REF(MIDD,1),UP,DOWN,1,0),COLORGREEN;
STICKLINE(MIDD=REF(MIDD,1),UP,DOWN,1,0),COLORGRAY;
趋势多:EMA(C,144),POINTDOT,COLORRED;
趋势空:IF(趋势多<REF(趋势多,1),趋势多,DRAWNULL),POINTDOT,COLORGREEN;
DRAWICON(crOSS(MIDD>REF(MIDD,1),0.5) AND 趋势多>REF(趋势多,1),L,42);
DRAWICON(CROSS(MIDD<REF(MIDD,1),0.5) AND 趋势多<REF(趋势多,1),H,43);
RH1:=IF(H<REF(H,1)&&REF(H,1)<REF(H,2),REF(H,2),0);
RL1:=IF(L>REF(L,1)&&REF(L,1)>REF(L,2),REF(L,2),0);
RHH1:=VALUEWHEN(RH1>0,RH1);
RLL1:=VALUEWHEN(RL1>0,RL1);
RX:=DATE;
RX0:=RHH1,LINETHICK2;
RX00:=RLL1;
RXXX0:=O,LINETHICK2;
RXXX00:=C;
RXXX000:=H;
RXXX0000:=L;
RH2:=VALUEWHEN(RX0>0,RX0),LINETHICK2;
RL2:=VALUEWHEN(RX00>0,RX00),LINETHICK2;
RK1:=IF(CLOSE>RH2,-3,IF(CLOSE<RL2,1,0));
RK2:=VALUEWHEN(RK1<>0,RK1);
RXG:=IF(RK2=1,RH2,RL2);
RXG1:=VALUEWHEN(ISLASTBAR,RXG);
RG:=IF(RK2=1,RH2,RL2);
RG1:=VALUEWHEN(ISLASTBAR,RG);
DRAWNUMBER(L>0,RG1,RG1),COLORBLUE;
DRAWNUMBER(H>0,RG1,RG1),COLORBLUE;
RX000:=RK2,LINETHICK2;
RTMP:=RK2,LINETHICK2;
RW1:=RX000,LINETHICK2;
RX0000:=OPEN-CLOSE,LINETHICK2;
RW2:=RX0000,LINETHICK2;
RHT:=IF(OPEN>CLOSE,OPEN,CLOSE),LINETHICK2;
RLT:=IF(OPEN<CLOSE,OPEN,CLOSE),LINETHICK2;
STICKLINE(RW1=1,RXXX000,RHT,0,0),COLORGREEN;
STICKLINE(RW1=1,RXXX0000,RLT,0,0),COLORGREEN;
STICKLINE(RW1=-3,RXXX000,RHT,0,0),COLORRED;
STICKLINE(RW1=-3,RXXX0000,RLT,0,0),COLORRED;
STICKLINE(RW1>0,RXXX0,RXXX00,2.5,1),COLORGREEN;
STICKLINE(RW1<=0,RXXX0,RXXX00,2.5,1),COLORRED;
STICKLINE(RW2>0&&RW1<=0,RXXX0,RXXX00,2.5,0),COLORRED;
STICKLINE(RW2>0&&RW1>0,RXXX0,RXXX00,2.5,0),COLORGREEN;
空头止损:DRAWSL(RK2=1 && BACKSET(ISLASTBAR,SUMBARS(RK2=1 && RXG<>REF(RXG,1),1)),RXG,0,1,2),COLORBLUE;
多头止损:DRAWSL(RK2=-3 && BACKSET(ISLASTBAR,SUMBARS(RK2=-3 && RXG<>REF(RXG,1),1)),RXG,0,1,2),COLORBLUE;
{仿预测赢家画线}
波1:=12;
A1:=REF(H,5)=HHV(H,2*6+1);
B1:=FILTER(A1,5);
C1:=BACKSET(B1,5+1);
D1:=FILTER(C1,5+1);
A2:=REF(L,5)=LLV(L,2*10+1);
B2:=FILTER(A2,5+1);
C2:=BACKSET(B2,5+1);
D2:=FILTER(C2,5);
E1:=(REF(LLV(L,2*3),1)+REF(HHV(H,2*3),1))/2;
E2:=(H+L)/2;
HZ1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(C)=1;
LZ1:=(D2 AND NOT(D1 AND E1< E2));
H2:= D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(HZ1),1)+1;
F1:=IF(BACKSET(HZ1 AND COUNT(LZ1,X1)>0,LLVBARS(IF(LZ1,L,10000),X1))>0,1,0);
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=IF(BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2))>0,1,0);
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
H1:=HD;
L1:=LD;
DRAWLINE(LD,L,HD,H,0),COLORRED,DOTLINE;
DRAWLINE(HD,H,LD,L,0),COLORGREEN,DOTLINE;
HH1:=VALUEWHEN(H1,H),NODRAW;
HH2:=VALUEWHEN(H1,REF(HH1,1)),NODRAW;
HN1:=IF(HH2>HH1,2,1),NODRAW;
DRAWLINE(CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,HN1)),0.5),H,CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,1)),0.5),H,1),LINETHICK1,COLORGREEN;
LL1:=VALUEWHEN(L1,L),NODRAW;
LL2:=VALUEWHEN(L1,REF(LL1,1)),NODRAW;
LN1:=IF(LL2<LL1,2,1),NODRAW;
DRAWLINE(CROSS(BACKSET(ISLASTBAR,SUMBARS(L1,LN1)),0.5),L,CROSS(BACKSET(ISLASTBAR,SUMBARS(L1,1)),0.5),L,1),LINETHICK1,COLORRED;
LLL1:=CROSS(BACKSET(ISLASTBAR,SUMBARS(L1,1)),0.5);
LLL2:=CROSS(BACKSET(ISLASTBAR,SUMBARS(L1,LN1)),0.5);
HHH1:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,1)),0.5);
HHH2:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,HN1)),0.5);
DRAWSL(LLL1,VALUEWHEN(LLL1,L)+0.382*(VALUEWHEN(H1,H)-VALUEWHEN(LLL2,L)),0,3,0),COLORYELLOW;
DRAWSL(LLL1,VALUEWHEN(LLL1,L)+0.618*(VALUEWHEN(H1,H)-VALUEWHEN(LLL2,L)),0,10,0),COLORYELLOW;
DRAWSL(LLL1,VALUEWHEN(LLL1,L)+1.000*(VALUEWHEN(H1,H)-VALUEWHEN(LLL2,L)),0,25,0),COLORLIMAGENTA;
DRAWSL(LLL1,VALUEWHEN(LLL1,L)+1.382*(VALUEWHEN(H1,H)-VALUEWHEN(LLL2,L)),0,3,0),COLORYELLOW;
DRAWNUMBER(LLL1,VALUEWHEN(LLL1,L)+0.618*(VALUEWHEN(H1,H)-VALUEWHEN(LLL2,L)),VALUEWHEN(LLL1,L)+0.618*(VALUEWHEN(H1,H)-VALUEWHEN(LLL2,L))),COLORYELLOW;
DRAWNUMBER(LLL1,VALUEWHEN(LLL1,L)+1.000*(VALUEWHEN(H1,H)-VALUEWHEN(LLL2,L)),VALUEWHEN(LLL1,L)+1.000*(VALUEWHEN(H1,H)-VALUEWHEN(LLL2,L))),COLORYELLOW;
DRAWSL(HHH1,VALUEWHEN(HHH1,H)-0.382*(VALUEWHEN(HHH2,H)-VALUEWHEN(L1,L)),0,3,0),COLORWHITE;
DRAWSL(HHH1,VALUEWHEN(HHH1,H)-0.618*(VALUEWHEN(HHH2,H)-VALUEWHEN(L1,L)),0,10,0),COLORWHITE;
DRAWSL(HHH1,VALUEWHEN(HHH1,H)-1.000*(VALUEWHEN(HHH2,H)-VALUEWHEN(L1,L)),0,25,0),COLORGREEN;
DRAWSL(HHH1,VALUEWHEN(HHH1,H)-1.382*(VALUEWHEN(HHH2,H)-VALUEWHEN(L1,L)),0,3,0),COLORWHITE;
DRAWNUMBER(HHH1,VALUEWHEN(HHH1,H)-0.618*(VALUEWHEN(HHH2,H)-VALUEWHEN(L1,L)),VALUEWHEN(HHH1,H)-0.618*(VALUEWHEN(HHH2,H)-VALUEWHEN(L1,L))),COLORLICYAN;
DRAWNUMBER(HHH1,VALUEWHEN(HHH1,H)-1.000*(VALUEWHEN(HHH2,H)-VALUEWHEN(L1,L)),VALUEWHEN(HHH1,H)-1.000*(VALUEWHEN(HHH2,H)-VALUEWHEN(L1,L))),COLORLICYAN;
LC:=REF(CLOSE,1);
rsi1:=SMA(MAX(CLOSE-LC,0),4,1)/SMA(Abs(CLOSE-LC),4,1)*100,COLORBLUE;
DRAWICON(CROSS(8,RSI1),L*0.999,36);
DRAWICON(CROSS(RSI1,92),H*1.001,37);
趋势:=SMA(((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100),3,1),NODRAW;
STICKLINE(趋势>92 AND C>O,H,L,0,0),COLORYELLOW;{上升红};
STICKLINE(趋势>92 AND C>O,C,O,2.3,1),COLORYELLOW;
STICKLINE(趋势>92 AND C<O,H,L,0,0),COLORYELLOW;
STICKLINE(趋势>92 AND C<O,C,O,2.3,0),COLORYELLOW;
STICKLINE(趋势<8 AND C<O,H,L,0,0),COLORYELLOW;{回调青};
STICKLINE(趋势<8 AND C<O,C,O,2.3,0),COLORYELLOW;
STICKLINE(趋势<8 AND C>O,H,L,0,0),COLORYELLOW;
STICKLINE(趋势<8 AND C>O,C,O,2.3,1),COLORYELLOW;
HH3:VALUEWHEN(H1,REF(HH2,1)),NODRAW;
LL3:VALUEWHEN(L1,REF(LL2,1)),NODRAW;
HHL:=IF(HH3>HH2,IF(HH2>HH1,1,2),IF(HH3>HH1,1,3));
HHL1:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,HHL)),0.5);
LLH:=IF(LL3<LL2,IF(LL2>LL1,2,1),IF(LL3>LL1,3,1));
LLH1:=CROSS(BACKSET(ISLASTBAR,SUMBARS(L1,LLH)),0.5);
QHH:=CONST(MIN(MIN(HH1,HH2),HH3));
QLL:=CONST(MAX(MAX(LL1,LL2),LL3));
DRAWSL(QHH,QHH,0,999,0),LINETHICK2,COLORCYAN;
DRAWSL(QLL,QLL,0,99,0),LINETHICK2;

通达信黄金波浪尺主图指标公式

相关文章