你好
我在進行選股的時候,只有使用一個腳本,腳本內容如下,內容是MACD 快線翻正(DIF翻正)
應用於智邦的時候,會發生錯誤,例如 "9/2"時候,智邦並沒有MACD 快線翻正,"選股"出現了,但回測後該日期並沒有出現
相關資料如附件所示
// DIF-MACD翻正
//
input:FastLength(12, "DIF短期期數");
input:SlowLength(26, "DIF長期期數");
input:MACDLength(9, "MACD期數");
variable: difValue(0), macdValue(0), oscValue(0);
MACD(weightedclose(), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue);
//if macdvalue Crosses Above 0 then ret=1;
//if difValue> macdvalue and difValue>0 and oscValue>0 then ret=1;
//value1= difValue;
//print("difValue",difValue);
if difValue>0 and difValue>difValue[1] and difValue[1]<0 then ret=1;