jasonchantk 發表於 16-9-12 18:10

求教ichimoku 問題.....

在MC ...寫了這個ichimoku code.....
但不能在5min chart 正常plot ...
試了編譯,又冇出問題...那裡出錯?
THX 達人師兄指教...{:4_160:}
code:

INPUTS: STANDARD(26), TURNING(9), DELAYCOLOR(YELLOW), SHOWDELAYLINE(FALSE);

VARIABLES:STDLINE(0), TURNLINE(0), DELAYLINE(0),SPAN1(0),SPAN2(0);



STDLINE = (HIGHEST(HIGH, STANDARD) + LOWEST(LOW, STANDARD)) / 2;

TURNLINE = (HIGHEST(HIGH, TURNING) + LOWEST(LOW, TURNING)) / 2;

DELAYLINE = CLOSE;

SPAN1 = (STDLINE + TURNLINE) / 2;

SPAN2 = (HIGHEST(HIGH, DELAYLINE) + LOWEST(LOW, DELAYLINE)) / 2;



plot1[-STANDARD](SPAN1, "SPAN1");

plot2[-STANDARD](SPAN2, "SPAN2");

IF CLOSE > DELAYLINE THEN

    SETPLOTCOLOR(2, BLUE)

ELSE

    SETPLOTCOLOR(2, DELAYCOLOR);



IF SHOWDELAYLINE THEN

    PLOT3(CLOSE, "DELAYED");


easytrader788 發表於 16-9-13 19:46

SPAN2 是52 週期高低點均值,程式碼內使用 DelayLine是不對的

jasonchantk 發表於 16-9-15 11:19

easytrader788 發表於 16-9-13 19:46
SPAN2 是52 週期高低點均值,程式碼內使用 DelayLine是不對的

thx a lot{:4_160:}............
頁: [1]
查看完整版本: 求教ichimoku 問題.....