偉大的小編您好:
我以下的警示模組邏輯是:
1.MACD的DIF在零軸上
2.OSC綠柱轉紅柱
但是我想要加上一個條件就是
均線的5T跟60T交叉,不知道要怎麼加比較好?
直接加一個變數?
input: FastLength(12), SlowLength(26), MACDLength(9);
variable: difValue(0), macdValue(0), oscValue(0);
SetTotalBar((maxlist(FastLength,SlowLength,6) + MACDLength) * 4);
SetInputName(1, "DIF短期期數");
SetInputName(2, "DIF長期期數");
SetInputName(3, "MACD期數");
MACD(weightedclose(), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue);
if oscValue[1] < 0 and oscValue > 0 and difValue > 0 then ret = 1;
7 評論