使用選股腳本,挑選出MACD全部的數值都在0軸以上的語法,
範例程式碼選股腳本如下:
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); Ret = oscValue > 0 and difValue > 0 and macdValue> 0;
有任何問題歡迎詢問小幫手,謝謝。
1 評論