嗨,我試用了你們的周MACD函數"xf_MACD",
並執行了選股,
發現股票都不符合,
輸出函數的結果也有問題,
以下是我的程式碼:
// DIF-MACD翻正
//
input:FastLength(12, "DIF短期期數");
input:SlowLength(26, "DIF長期期數");
input:MACDLength(9, "MACD期數");
variable: difValue(0), macdValue(0), oscValue(0);
SetTotalBar((maxlist(FastLength,SlowLength,6) + MACDLength) * 4);
xf_MACD("W",xf_weightedclose("W"), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue);
outputfield1(difValue);
outputfield2(macdValue);
outputfield3(oscValue);
if difValue Crosses Above macdValue then ret=1;
我輸出了dif、macd跟osc的值,
結果都與實際上的值不符,
煩請確認下是我的程式碼有問題,
還是你們的函數有問題?
謝謝!
1 評論