金波趋势决策红三角是进入信号
N:=9;
M1:=3;
M2:=3;
金波:=EMA((3)*(MA(CLOSE,3)) - (2)*(MA(CLOSE,6)),1),COLOR0000FF,LINETHICK1;
TIAOJIAN1:=C=HHV(C,60);
DAYS11:=BARSLAST(TIAOJIAN1);
跌50﹪:=L< REF(C,DAYS11)/1.64;
跌60:CURRBARSCOUNT<=10 AND L< REF(C,DAYS11)/1.68 AND 金波< H AND O>C AND REF(O,1)>=REF(C,1);
P:=21;
WH1:=IF(L=LLV(L,P),L,DRAWNULL);
WH2:=CONST(BARSLAST(WH1!=DRAWNULL));
WH3:=CONST(IF(WH2=0,H,REF(H,WH2)));
WH4:=CONST(REF(BARSLAST(H>WH3),WH2+1)+WH2+1);
WH5:=CONST(IF(WH4=0,H,REF(H,WH4)));
WH6:=CONST(REF(BARSLAST(H>WH5),WH4+1)+WH4+1);
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
0,COLOR9000F5;
K:SMA(RSV,M1,1),COLORWHITE;
D:SMA(K,M2,1),COLORYELLOW;
J:3*K-2*D,COLORGREEN;
A1:=BARSLAST(REF(CROSS(J,0),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND J>REF(J,A1+1) AND CROSS(J,0);
J背离上穿0买: IF(底背离 AND LLV(J,7)>LLV(J,30),100,0),COLORRED,LINETHICK2;
DRAWTEXT(底背离,J-25,底背离),COLOR9000F5;
进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH6=0,H,REF(H,WH6))),DRAWNULL),COLORRED;
IF(CURRBARSCOUNT<=WH2+1,IF(L=LLV(L,P),L,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORRED;
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),进场,'进场线'),COLORRED;
超跌进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH4=0,H,REF(H,WH4))),DRAWNULL),COLORCB21BE;
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),'超跌进场','超跌进场线'),COLORCB21BE;
H1:=IF(H=HHV(H,P),H,DRAWNULL);
H2:=CONST(BARSLAST(H1!=DRAWNULL));
H3:=CONST(IF(H2=0,L,REF(L,H2)));
H4:=CONST(REF(BARSLAST(L< H3),H2+1)+H2+1);
H5:=CONST(IF(H4=0,L,REF(L,H4)));
H6:=CONST(REF(BARSLAST(L< H5),H4+1)+H4+1);
止损:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H6=0,L,REF(L,H6))),DRAWNULL) AND J背离上穿0买 AND 跌60,COLORYELLOW;
IF(CURRBARSCOUNT<=H2+1,IF(H=HHV(H,P),H,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),'止损','止损线'),COLORYELLOW;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:9
M1赋值:3
M2赋值:3
金波赋值:EMA((3)*(MA(收盘价,3)) - (2)*(MA(收盘价,6)),1),COLOR0000FF,LINETHICK1
TIAOJIAN1:=C=60日内C最高值
DAYS11赋值:上次TIAOJIAN1距今天数
跌50﹪赋值:L< DAYS11日前的C/1.64
输出跌60:CURRBARSCOUNT<=10 AND L< DAYS11日前的C/1.68 AND 金波< H AND O>C AND 1日前的O>=1日前的C
P赋值:21
WH1赋值:IF(L=P日内L最低值,L,DRAWNULL)
WH2赋值:CONST(上次WH1!=DRAWNULL距今天数)
WH3赋值:CONST(IF(WH2=0,H,WH2日前的H))
WH4赋值:CONST(REF(上次H>WH3距今天数,WH2+1)+WH2+1)
WH5赋值:CONST(IF(WH4=0,H,WH4日前的H))
WH6赋值:CONST(REF(上次H>WH5距今天数,WH4+1)+WH4+1)
RSV赋值:(收盘价-N日内最低价最低值)/(N日内最高价最高值-N日内最低价最低值)*100
0,COLOR9000F5
RSV的M1日[1日权重]移动平均
K的M2日[1日权重]移动平均
输出J:3*K-2*D,COLORGREEN
A1赋值:上次1日前的J上穿0距今天数
底背离赋值:A1+1日前的收盘价>收盘价 AND J>A1+1日前的J AND J上穿0
J背离上穿0买: IF(底背离 AND 7日内J最低值>30日内J最低值,100,0),COLORRED,LINETHICK2
当满足条件底背离时,在J-25和底背离位置书写文字
输出进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH6=0,H,WH6日前的H)),DRAWNULL),COLORRED
IF(CURRBARSCOUNT<=WH2+1,IF(L=P日内L最低值,L,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORRED
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),进场,'进场线'),COLORRED
超跌输出进场:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH4=0,H,WH4日前的H)),DRAWNULL),COLORCB21BE
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),'超跌进场','超跌进场线'),COLORCB21BE
H1赋值:IF(H=P日内H最高值,H,DRAWNULL)
H2赋值:CONST(上次H1!=DRAWNULL距今天数)
H3赋值:CONST(IF(H2=0,L,H2日前的L))
H4赋值:CONST(REF(上次L< H3距今天数,H2+1)+H2+1)
H5赋值:CONST(IF(H4=0,L,H4日前的L))
H6赋值:CONST(REF(上次L< H5距今天数,H4+1)+H4+1)
输出止损:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H6=0,L,H6日前的L)),DRAWNULL) AND J背离上穿0买 AND 跌60,画黄色
IF(CURRBARSCOUNT<=H2+1,IF(H=P日内H最高值,H,DRAWNULL),DRAWNULL),CIRCLEDOT, 画蓝色
DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),'止损','止损线'),画黄色