九毛八公式指标
公式模块:
请求老师帮助把【波段高低】公式改成选股公式,大智慧用!谢谢!
原码如下:
input:p1(5,1,255);
wN:=p1;{原码 N:=3;}
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;{高低点出现在同一k线上时可作取舍}
wH1:=(wD1 AND NOT(wD2 AND wE1>=wE2)) OR DISPSTATUS=2 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 DISPSTATUS=2 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(DISPSTATUS=2,BARSLAST(wHD)+1); wS1:=wR1>REF(wR1,1); {前一高}
wT1:=BACKSET(DISPSTATUS=2,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); {前二低}
以上为公式的原码,出自哪位老师的小生已无从取证。
选股:wU1<wU2 and wU1<wS1 and wU1<wS2;(这是我乱搞的选不出来)
选股的主要条件:在“前一高”“前一低”“前二高”“前二低”这四个点位中选出“前一低”比其它三个都小的股票!
如果文字没有表达清楚请看下图: