請問一下高手
這是選股的腳本
//抓本月成交量
CurrentMVolume=xf_GetValue("M",GetField("成交量","M"),0);
//計算18個月的布林
For k=0 to 18
begin Sum18MClose=Sum18MClose+CloseM(k);
end;
Average18MPrice=Sum18MClose/18;
For mm=0 to 17
Begin SumSquare=(CloseM(mm)-Average18MPrice)*(CloseM(mm)-Average18MPrice);
end;
Xigma=squareRoot(sumSquare/17);
//布林設定
BbandUp[1] = Average18MPrice+XigmaBand*Xigma;
BbandUp[2] = (BbandUp[1]+BbandUp[3])/2;
BbandUp[3]= Average18MPrice-XigmaBand*Xigma;
bbandwidth=100*(BbandUp[1] +BbandUp[3])/BbandUp[2];
好像抓出來的月成交量跟Xigma值會不斷累加阿~~
哪裡有問提咧??謝謝大大
1 評論