畫壓力支撐趨勢(shì)線有時(shí)候畫的不是很準(zhǔn)確,現(xiàn)在這三組自動(dòng)連續(xù)畫線,通過(guò)調(diào)節(jié)一個(gè)參數(shù)就可以自動(dòng)畫出不同范圍的趨勢(shì)線,不同組趨勢(shì)線交叉位置一般都是變盤位置,另有其它用法請(qǐng)自己再去發(fā)現(xiàn)。 {參數(shù) 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 ORBARSCOUNT(C)=1; WL1:=(WD2 AND NOT(WD1 AND WE1 WH2:=WD1 AND NOT(WD2 AND WE1>=WE2); WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 ANDCOUNT(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 ANDCOUNT(WH2,WX2)>0,HHV |
|