一个前高点画线的指标修改如下

admin 259 0

下面这个指标是在K线的前二个高点横着画二条线,我改成三条线,就是增加一条(增加一个前三高)

一个前高点画线的指标修改如下-第1张图片-股票学习网



指标

N=6
HXA1:=REF(HIGH,N)=HHV(HIGH,2*N+1);
HXB1:=FILTER(HXA1,N);
HXC1:=BACKSET(HXB1,N+1);
HXD1:=FILTER(HXC1,N);
HXA2:=REF(LOW,N)=LLV(LOW,2*N+1);
HXB2:=FILTER(HXA2,N);
HXC2:=BACKSET(HXB2,N+1);
HXD2:=FILTER(HXC2,N);
HXE1:=(REF(LLV(LOW,2*N),1)+REF(HHV(HIGH,2*N),1))/2;
HXE2:=(HIGH+LOW)/2;
HXH1:=(HXD1 AND NOT(HXD2 AND HXE1>=HXE2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
HXH2:=HXD1 AND NOT(HXD2 AND HXE1>=HXE2);
HXL1:=HXD2 AND NOT(HXD1 AND HXE1=HXE2);
HXX1:=REF(BARSLAST(HXH1),1)+1;
HXF1:=BACKSET(HXH1 AND COUNT(HXL1,HXX1)>0,LLVBARS(IF(HXL1,LOW,10000),HXX1));
HXG1:=HXF1>REF(HXF1,1);
HXI1:=BACKSET(HXG1,2);
HXLD:=HXI1>REF(HXI1,1);
HXL2:=HXLD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
HXX2:=REF(BARSLAST(HXL2),1)+1;
HXF2:=BACKSET(HXL2 AND COUNT(HXH2,HXX2)>0,HHVBARS(IF(HXH2,HIGH,0),HXX2));
HXG2:=HXF2>REF(HXF2,1);
HXI2:=BACKSET(HXG2,2);
HXHD:=HXI2>REF(HXI2,1);
UU:=BACKSET(BARSTATUS=2,BARSLAST(HXLD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(HXLD),1)+2);
XX:=WW>REF(WW,1);
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HXHD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HXHD),1)+2);
XX2:=WW2>REF(WW2,1);
前一高:REF(H,BARSLAST(VV2)),COLORBLUE,DOTLINE;
前二高:REF(H,BARSLAST(XX2)),COLORBLUE,DOTLINE;

 

现指标

N:=6;
HXA1:=REF(HIGH,N)=HHV(HIGH,2*N+1);
HXB1:=FILTER(HXA1,N);
HXC1:=BACKSET(HXB1,N+1);
HXD1:=FILTER(HXC1,N);
HXA2:=REF(LOW,N)=LLV(LOW,2*N+1);
HXB2:=FILTER(HXA2,N);
HXC2:=BACKSET(HXB2,N+1);
HXD2:=FILTER(HXC2,N);
HXE1:=(REF(LLV(LOW,2*N),1)+REF(HHV(HIGH,2*N),1))/2;
HXE2:=(HIGH+LOW)/2;
HXH1:=(HXD1 AND NOT(HXD2 AND HXE1>=HXE2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
HXH2:=HXD1 AND NOT(HXD2 AND HXE1>=HXE2);
HXL1:=HXD2 AND NOT(HXD1 AND HXE1=HXE2);
HXX1:=REF(BARSLAST(HXH1),1)+1;
HXF1:=BACKSET(HXH1 AND COUNT(HXL1,HXX1)>0,LLVBARS(IF(HXL1,LOW,10000),HXX1));
HXG1:=HXF1>REF(HXF1,1);
HXI1:=BACKSET(HXG1,2);
HXLD:=HXI1>REF(HXI1,1);
HXL2:=HXLD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
HXX2:=REF(BARSLAST(HXL2),1)+1;
HXF2:=BACKSET(HXL2 AND COUNT(HXH2,HXX2)>0,HHVBARS(IF(HXH2,HIGH,0),HXX2));
HXG2:=HXF2>REF(HXF2,1);
HXI2:=BACKSET(HXG2,2);
HXHD:=HXI2>REF(HXI2,1);
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HXHD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HXHD),1)+2);
XX2:=WW2>REF(WW2,1);
WW3:=BACKSET(VV2,REF(BARSLAST(HXHD),2)+30);
XX3:=WW3>REF(WW3,1);

前一高:REF(H,BARSLAST(VV2)),COLORBLUE,DOTLINE;
前二高:REF(H,BARSLAST(XX2)),COLORff00ff,DOTLINE;
前三高:REF(H,BARSLAST(XX3)),COLOR00ffff,DOTLINE;


 

炒股入门

标签: 一个 高点 画线 指标 修改 如下

抱歉,评论功能暂时关闭!