我在選股中心寫了一段程式如下:
目的是找出連續 5 日, 10 日籌碼集中度均大於 0 的股票, 執行後發現, 會漏掉一些股票, 比如 2421 建準 (過去 5 日的 10 日籌碼集中度均大於 0), 請幫我看看問題在哪?
謝謝
input:day(10,"天數");
setbarfreq("D");
settotalbar(day+10);
value1=GetField("主力買賣超張數","D");
value4=GetField("成交量","D");
Value3 = bollingerband(Close, 20, 2);
if volume<>0 then
value2=summation(value1,day)/summation(value4,day)*100;
value5=summation(value1[1],day)/summation(value4[1],day)*100;
value6=summation(value1[2],day)/summation(value4[2],day)*100;
value7=summation(value1[3],day)/summation(value4[3],day)*100;
value8=summation(value1[4],day)/summation(value4[4],day)*100;
if value2>0 and value5>0 and value6>0 and value7>0 and value8>0 and close>value3 then
ret=1;
2 評論