以下指標程式可否幫我檢查為何我編譯完後主圖指標無法顯示?

  •   180 
  • 最後發表   ForisChang  2017 十二月 22
ForisChang 發文於   2017/12/18

input: Len1(20,"期數"), Len2(120,"期數");

variable: m1(0), m2(0);

variable: rsv(0), k(0), _d(0);

SetTotalBar(maxlist(9,6) * 3);

Stochastic(9, 3, 3, rsv, k, _d);

m1=average(close, len1);

m2=average(close, len2);

 

if close> m1 and close> m2 and m1> m2

then condition11=true

else condition11=false;

condition12= k < _d;

condition13= k[1] > 75;

if condition11 and condition12 and condition13 then plot1(low, "賣出放空");

 

if close< m1 and close< m2 and m1< m2

then condition21=true

else condition21=false;

condition22= k > _d;

condition23= k[1] < 25;

if condition21 and condition22 and condition23 then plot2(high, "買進回補");

排序方式: 標準 | 最新
XQ小幫手 發文於   2017/12/19

Hi ForisChang,

請將 SetTotalBar(maxlist(9,6) * 3); 註解或刪除,應該就可以使用囉~ 謝謝。

ForisChang 發文於   2017/12/19

主圖上這個語法沒法應用的意思嗎??

謝謝哦!!!

XQ小幫手 發文於   2017/12/20

Hi ForisChang,

這個語法在指標上幾乎用不到,只是您的資料讀取範圍設不夠,所以才會有錯誤,

所以小幫手建議把這行刪除,因為在指標上,很少需要用到settotalbar的語法,以上說明,謝謝。

 

P.S. 

自訂指標腳本用不到 settotalbar 的原因:

因為指標腳本是針對單一商品繪圖,故較無需調整資料讀取筆數來減少耗能,

也是可以使用,但是資料讀取筆數要設對。

ForisChang 發文於   2017/12/22

 THX

  • 按讚來自於
  • b24524658
發表回覆
Close