三组连续自动画趋势线

画压力支撑趋势线有时候画的不是很准确,现在这三组自动连续画线,通过调节一个参数就可以自动画出不同范围的趋势线,不同组趋势线交叉位置一般都是变盘位置,另有其它用法请自己再去发现。
{参数 N 1  200  3 }
WN:=N;
WA1:=REF(H,WN)=HHV(H,2*WN+1);
WB1:=FILTER(WA1,WN);
WC1:=BACKSET(WB1,WN+1);
WD1:=FILTER(WC1,WN);
WA2:=REF(L,WN)=LLV(L,2*WN+1);
WB2:=FILTER(WA2,WN);
WC2:=BACKSET(WB2,WN+1);
WD2:=FILTER(WC2,WN);
WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;
WE2:=(H+L)/2;
WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
WL1:=(WD2 AND NOT(WD1 AND WE1<WE2)); 
WH2:=WD1 AND NOT(WD2 AND WE1>=WE2);
WX1:=REF(BARSLAST(WH1),1)+1;
WF1:=BACKSET(WH1 AND COUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));
WG1:=WF1>REF(WF1,1);
WI1:=BACKSET(WG1,2);
WLD:=WI1>REF(WI1,1);
WL2:=WLD OR ISLASTBAR OR BARSCOUNT(C)=1;
WX2:=REF(BARSLAST(WL2),1)+1; WF2:=BACKSET(WL2 AND COUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));
WG2:=WF2>REF(WF2,1);
WI2:=BACKSET(WG2,2);
WHD:=WI2>REF(WI2,1);
WR1:=BACKSET(ISLASTBAR,BARSLAST(WHD)+1); WS1:=WR1>REF(WR1,1);
WT1:=BACKSET(ISLASTBAR,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1);
WR2:=BACKSET(WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1);
WT2:=BACKSET(WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1);
WT3:=BACKSET(WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1);
WT4:=BACKSET(WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1);
WR3:=BACKSET(WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1);
WR4:=BACKSET(WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1);
DRAWLINE(WS2,H,WS1,H,1),COLORYELLOW;         
DRAWLINE(WU2,L,WU1,L,1),DOTLINE,COLORYELLOW;
DRAWLINE(WS3,H, WS2,H,1),COLORBLUE;
DRAWLINE(WU3,L,WU2,L,1),DOTLINE,COLORBLUE;    
DRAWLINE(WS4,H,WS3,H,1),COLORRED;
DRAWLINE(WU4,L,WU3,L,1),DOTLINE,COLORRED;




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

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

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