// MACD 死亡交叉 (dif向下穿越macd)
input: FastLength(12), SlowLength(26), MACDLength(9);
variable: difValue(0), macdValue(0), oscValue(0);
SetTotalBar((maxlist(FastLength,SlowLength,6) + MACDLength) * 3 + 8);
SetInputName(1, "DIF短期期數");
SetInputName(2, "DIF長期期數");
SetInputName(3, "MACD期數");
MACD(weightedclose(), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue);
Ret = difValue Crosses Below macdValue;
以上是計算MACD的程式與法,想請問一下其中
SetTotalBar((maxlist(FastLength,SlowLength,6) + MACDLength) * 3 + 8);
相關參數 6 3 8 是怎麼來的??,我希望計算"一分鐘線和五分鐘縣"的MACD,其中的6 3 8 是否需要調整??
4 評論