如何使用XS警示腳本撰寫RSI大於50

  •   263 
  • 最後發表   james4160  2018 三月 28
james4160 發文於   2018/03/28

請問要如何使用XS警示腳本撰寫"RSI"大於50

編譯出現錯誤無法使用outputfield

input: RSILength(13), uservalue(50);

settotalbar(200);

SetInputName(1, "RSI期數");

SetInputName(2, "數值");

 

 

value1 = RSI(Close, RSILength);

 

if value1 > uservalue

then ret = 1;

 

outputfield1(value1,"RSI");

outputfield2(uservalue);

XQ小幫手 發文於   2018/03/28

Hi james4160,

請將最後兩行程式碼刪除或註解,因為 outputfield1 語法只能使用在選股腳本,

若想檢驗運算數值是否正確,可以用 Print 語法,查看運算數值的結果,如以下連結文章說明,謝謝。

如何運用Print指令來抓程式的臭蟲

發表回覆
Close