等级: 专业版
- 注册:
- 2022-10-26
- 曾用名:
|
a1:=SPLITBARS(0);
a2:=SPLITBARS(1);
a3:=SPLITBARS(2);
a4:=SPLITBARS(3);
a5:=SPLITBARS(4);
paixi1:=if(a1<=375,ref(SPLITDATA(4),a1),0);
paixi2:=if(a2<=625,ref(SPLITDATA(4),a2),0);
paixi3:=if(a3<=875,ref(SPLITDATA(4),a3),0);
paixi4:=if(a4<=1125,ref(SPLITDATA(4),a4),0);
paixi5:=if(a5<=1375,ref(SPLITDATA(4),a5),0);
tt:=financeex(1,0,0,'');
gb1:=ref(tt,a1),NODRAW;
gb2:=ref(tt,a2),NODRAW;
gb3:=ref(tt,a3),NODRAW;
gb4:=ref(tt,a4),NODRAW;
gb5:=ref(tt,a5),NODRAW;
fh1:=paixi1*gb1,nodraw;
fh2:=paixi2*gb2,nodraw;
fh3:=paixi3*gb3,nodraw;
fh4:=paixi4*gb4,nodraw;
fh5:=paixi5*gb5,nodraw;
jnsjb:financeex(29,3,0,'')*tt;
qnsjb:ref(financeex(29,3,0,''),250)*ref(tt,250);
sjbbl:if(jnsjb/qnsjb>0.9 and JNSJB>0,1,-1);
pjfh:if((fh1+fh2+fh3+fh4+fh5)/5>0 and (fh1+fh2+fh3+fh4+fh5)*sjbbl/5>0,(fh1+fh2+fh3+fh4+fh5)/5,0.001);
dqgb:FINANCE( 1);
zsz:close*dqgb;
pjgxl:if((zsz/pjfh)*(c/FININDICATOR('','nAssetPS',0,0))>0,(zsz/pjfh)*(c/FININDICATOR('','nAssetPS',0,0)),9999999),NODRAW;
qbyx:barpos>250*5 and valuewhen(date+19000000=20231228,close)>1;
a:if(qbyx>0,(VALUEWHEN(date+19000000=20231228,pjgxl)),9999);
这段代码没有报错,我把它作为股票池筛选条件,筛选的标准是选最后一行,也就是A这个数值最高的前三十只股票,我想要的是五年内平均股息率在前三十名的股票,但是我在筛选的时候,出现的是从000001到000037这30只股票。但实际上这些股票的平均股息率肯定不是最高的,所以我想知道我这个代码出现了什么问题
|
|