input:period(40,"主力成本線週期");
input:period_under(5,"價格在主力成本線下方的時間");
input:increase(5,"上漲%數");
value1=GetField("主力買張","日");
value2=(o+h+l+c)/4;
value3=value1*value2;//做多金額
if summation(value1,period)<>0
then value4=summation(value3,period)/summation(value1,period);
Print(file("D:\Print\"),"date=",date,"time=",time,"主力成本價",value4[1],"收盤價",close,"收盤上漲",(close-close[1])/close[1]);
if TrueAll(close[1] < value4[1], period_under)
and close > close[1]*(1+increase*0.01)
then ret=1;
以上是目前的code,希望符合以下條件後跳出警示
1. 前n天的收盤價皆低於主力成本價
2. 當前價格上漲超過m%
但開始執行後顯示 "計算停止,因為計算發生錯誤,請檢察腳本內的算式"
請問可能是甚麼問題呢
 
 
             
        
         
         
     
     分類
    分類
 
            
1 評論