过四峰加上主图画线副图选股公式

昨天发帖“过四峰选股”,跟帖中有同学要求还是加上主图,原来考虑有些同学不喜欢未来函数,所以,原来的就没有画线,只有信号主图。
 这次主图构思这样的:干脆将第一峰和最后峰用画线框起来,计算出这波调整的振幅,振幅标注在框底。出现买入信号后,您可以根据振幅大小考虑是不是需要买入?框顶标注“突破价”方便您更直观考虑什么价位买入合适。其他信号没变。
 

{新版主图}
N:=40;
 T:=BARSLAST(H<REF(H,1) AND REF(H,1)>REF(H,2));
 HH:=REF(H,T+1);
 LL:=FINDLOW(L,T=0,10,1);
 LH:=SUM(H>REF(H,1),10);
 ZF:=(HH-LL)/LL*100;
 TT:=BARSLAST(T=0 AND ZF>20 AND LH>2);
 T1:=SUMBARS(TT=0,1);
 T2:=SUMBARS(TT=0,2);
 T3:=SUMBARS(TT=0,3);
 T4:=SUMBARS(TT=0,4);
 H1:=REF(HH,T1-1);
 H2:=REF(HH,T2-1);
 H3:=REF(HH,T3-1);
 H4:=REF(HH,T4-1);
 AH:=MAX(MAX(MAX(H1,H2),H3),H4);
 AL:=MIN(MIN(MIN(H1,H2),H3),H4);
 BL:=AH/AL<1.15;
 TJ:=COUNT(CROSS(C,H1),TT+1)=1 AND CROSS(C,H1);
 TJ1:=H4<H3 AND H3<H2 AND H2<H1;
 XG:=TJ AND BL AND T4<N AND TJ1;
 XG1:=COUNT(XG,T4+1)=1 AND XG;
 STICKLINE(XG1,H,L,0,1),COLORFFFFFF;
 STICKLINE(XG1,C,O,3.2,0),COLOR555555;
 STICKLINE(XG1,C,O,2.6,0),COLOR777777;
 STICKLINE(XG1,C,O,1.9,0),COLOR999999;
 STICKLINE(XG1,C,O,1.1,0),COLORCCCCCC;
 STICKLINE(XG1,C,O,0.3,0),COLORCCDDBB;
 DRAWICON(XG1,L*0.96,1);
 QF4:=BACKSET(XG1,T4+1);
 DT4:=BARSLAST(CROSS(QF4=1,0.5));
 QF1:=BACKSET(XG1,T1+1);
 DT1:=BARSLAST(CROSS(QF1=1,0.5));
 ZG:=REFX(H,BARSNEXT(DT1=0));
 DD:=LLV(L,DT4+1);
 ZD:=REFX(DD,BARSNEXT(DT1=0));
 ZFF:=(HHV(H,DT4+1)-LLV(L,DT4+1))/LLV(L,DT4+1)*100;
 AA:=REFX(ZFF,BARSNEXT(DT1=0));
 NOTEXT1:DRAWLINE(DT4=0,ZG,DT1=0,REF(H,DT1),1),COLORYELLOW;
 NOTEXT2:DRAWLINE(DT4=0,ZD,DT1=0,REF(DD,DT1),0),COLORYELLOW;
 STICKLINE(DT4=0,ZG,ZD,0,0),COLORYELLOW;
 STICKLINE(DT1=0,REF(H,DT1),REF(DD,DT1),0,0),COLORYELLOW;
 A:=VARCAT(VARCAT('箱体振幅:',VAR2STR(AA,2)),'﹪');
B:=VARCAT(VARCAT('突破价:',VAR2STR(ZG,2)),'元');
DRAWTEXT(DT4=0,NOTEXT2*0.96,A)COLORYELLOW;
 DRAWTEXT(DT4=0,NOTEXT1*1.025,B)COLORYELLOW;
 {旧版主图}
N:=40;
 T:=BARSLAST(H<REF(H,1) AND REF(H,1)>REF(H,2));
 HH:=REF(H,T+1);
 LL:=FINDLOW(L,T=0,10,1);
 LH:=SUM(H>REF(H,1),10);
 ZF:=(HH-LL)/LL*100;
 TT:=BARSLAST(T=0 AND ZF>20 AND LH>2);
 T1:=SUMBARS(TT=0,1);
 T2:=SUMBARS(TT=0,2);
 T3:=SUMBARS(TT=0,3);
 T4:=SUMBARS(TT=0,4);
 H1:=REF(HH,T1-1);
 H2:=REF(HH,T2-1);
 H3:=REF(HH,T3-1);
 H4:=REF(HH,T4-1);
 AH:=MAX(MAX(MAX(H1,H2),H3),H4);
 AL:=MIN(MIN(MIN(H1,H2),H3),H4);
 BL:=AH/AL<1.15;
 TJ:=COUNT(CROSS(C,H1),TT+1)=1 AND CROSS(C,H1);
 TJ1:=H4<H3 AND H3<H2 AND H2<H1;
 XG:=TJ AND BL AND T4<N AND TJ1;
 XG1:=COUNT(XG,T4+1)=1 AND XG;
 STICKLINE(XG1,H,L,0,1),COLORFFFFFF;
 STICKLINE(XG1,C,O,3.2,0),COLOR555555;
 STICKLINE(XG1,C,O,2.6,0),COLOR777777;
 STICKLINE(XG1,C,O,1.9,0),COLOR999999;
 STICKLINE(XG1,C,O,1.1,0),COLORCCCCCC;
 STICKLINE(XG1,C,O,0.3,0),COLORCCDDBB;
 DRAWICON(XG1,L*0.96,1);
 QF4:=BACKSET(XG1,T4+1);
 DT4:=BARSLAST(CROSS(QF4=1,0.5));
 QF1:=BACKSET(XG1,T1+1);
 DT1:=BARSLAST(CROSS(QF1=1,0.5));
 ZG:=REFX(H,BARSNEXT(DT1=0));
 DD:=LLV(L,DT4+1);
 ZD:=REFX(DD,BARSNEXT(DT1=0));
 ZFF:=(HHV(H,DT4+1)-LLV(L,DT4+1))/LLV(L,DT4+1)*100;
 AA:=REFX(ZFF,BARSNEXT(DT1=0));
 NOTEXT1:DRAWLINE(DT4=0,ZG,DT1=0,REF(H,DT1),1),COLORYELLOW;
 NOTEXT2:DRAWLINE(DT4=0,ZD,DT1=0,REF(DD,DT1),0),COLORYELLOW;
 STICKLINE(DT4=0,ZG,ZD,0,0),COLORYELLOW;
 STICKLINE(DT1=0,REF(H,DT1),REF(DD,DT1),0,0),COLORYELLOW;
 A:=STRCAT(STRCAT('箱体振幅:',VAR2STR(AA,2)),'﹪');
B:=STRCAT(STRCAT('突破价:',VAR2STR(ZG,2)),'元');
DRAWTEXT(DT4=0,NOTEXT2*0.96,A)COLORYELLOW;
 DRAWTEXT(DT4=0,NOTEXT1*1.025,B)COLORYELLOW;
 {幅图}
N:=40;
 T:=BARSLAST(H<REF(H,1) AND REF(H,1)>REF(H,2));
 HH:=REF(H,T+1);
 LL:=FINDLOW(L,T=0,10,1);
 LH:=SUM(H>REF(H,1),10);
 ZF:=(HH-LL)/LL*100;
 TT:=BARSLAST(T=0 AND ZF>20 AND LH>2);
 T1:=SUMBARS(TT=0,1);
 T2:=SUMBARS(TT=0,2);
 T3:=SUMBARS(TT=0,3);
 T4:=SUMBARS(TT=0,4);
 H1:=REF(HH,T1-1);
 H2:=REF(HH,T2-1);
 H3:=REF(HH,T3-1);
 H4:=REF(HH,T4-1);
 AH:=MAX(MAX(MAX(H1,H2),H3),H4);
 AL:=MIN(MIN(MIN(H1,H2),H3),H4);
 BL:=AH/AL<1.15;
 TJ:=COUNT(CROSS(C,H1),TT+1)=1 AND CROSS(C,H1);
 TJ1:=H4<H3 AND H3<H2 AND H2<H1;
 A:=TJ AND BL AND T4<N AND TJ1;
 XG:=COUNT(A,T4+1)=1 AND A;
 STICKLINE(XG,0,7.8,1.5,0),COLORGRAY;

 {选股}

N:=40;
 T:=BARSLAST(H<REF(H,1) AND REF(H,1)>REF(H,2));
 HH:=REF(H,T+1);
 LL:=FINDLOW(L,T=0,10,1);
 LH:=SUM(H>REF(H,1),10);
 ZF:=(HH-LL)/LL*100;
 TT:=BARSLAST(T=0 AND ZF>20 AND LH>2);
 T1:=SUMBARS(TT=0,1);
 T2:=SUMBARS(TT=0,2);
 T3:=SUMBARS(TT=0,3);
 T4:=SUMBARS(TT=0,4);
 H1:=REF(HH,T1-1);
 H2:=REF(HH,T2-1);
 H3:=REF(HH,T3-1);
 H4:=REF(HH,T4-1);
 AH:=MAX(MAX(MAX(H1,H2),H3),H4);
 AL:=MIN(MIN(MIN(H1,H2),H3),H4);
 BL:=AH/AL<1.15;
 TJ:=COUNT(CROSS(C,H1),TT+1)=1 AND CROSS(C,H1);
 TJ1:=H4<H3 AND H3<H2 AND H2<H1;
 A:=TJ AND BL AND T4<N AND TJ1;
 XG:COUNT(A,T4+1)=1 AND A;
 




未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:DLOW
该公式包含未来函数:BARSNEXT
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图