|
在MC ...寫了這個ichimoku code.....
但不能在5min chart 正常plot ...
試了編譯,又冇出問題...那裡出錯?
THX 達人師兄指教...
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[STANDARD];
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[26](CLOSE, "DELAYED");
|
|