請問各位大大,我將選股腳本改為警示腳本,因主力成本盤中無法計算所以改前期值,執行後發生計算錯誤,請問如何修正?謝謝!
input:period(40,"期數");
SetTotalBar(40);
if barfreq = "Tick" or barfreq = "Min"
then raiseruntimeerror("不支援此頻率");
value1=GetField("主力買張");
value2=(o+h+l+c)/4;
value3=value1*value2;//做多金額
if summation(value1,period)<>0 then
value4=summation(value3,period)/summation(value1,period);
if C[1]<value4[1] and C>=value4[1] then ret=1;
2 評論