請教一個script

  •   79 
  • 最後發表   chwu1110  2024 一月 15
chwu1110 發文於   2024/01/11

input:Length_D(9,"日KD期間");

 

variable:rsv_d(0);K_Value(0);D_Value(0);

 

stochastic(Length_D, 3 ,3, rsv_d,K_Value,D_Value);

 

condition1=K_Value>80 and K_Value[1]>80 and K_Value[2]>80;

condition2=D_Value>80 and D_Value[1]>80 and D_Value[2]>80;

condition3=true;

condition4=true;

condition5=true;

//成交量判斷

//condition99=Average(Volume[1], 100)>=1000

if condition1

and condition2

and condition3

and condition4

and condition5

then ret=1;

 

這是我寫的一個script

目的在提醒KD鈍化

請問我哪裡寫錯了呢?

 

出現了以下這樣的錯誤訊息

KD鈍化319函數 K_Value 需要輸入 2 個參數

XS小編 發文於   2024/01/15

 Hello chwu1110,

 

小編建議您令變數名稱時避開使用和內建函數相同的名稱。

K_Value 和 D_Value 存在內建的函數,或許可以將其改令為 _k 和 _d。

另外,變數間分隔是使用逗號而非分號。

故修改後為: variable:rsv_d(0), _k(0), _d(0);

發表回覆
Close