你好,
小弟使用30分的策略雷達掃股
條件為:
1. 5日平均量 >500
2. 30分K K<50 且KD黃金交叉
3. MACD 在零軸上黃金交叉且值<1
試寫的語法如下,加入策略雷達使用30分鐘線來找股
試了兩天,但發現盤中掃出的個股都與條件設定的不同,
是否可以請小編協助,語法上是否有衝突或是錯誤呢?
謝謝
value(getfield("volume","D"),5); //抓日資料計算5日平均量
input: Length(6), RSVt(3), Kt(3), Bound(30);
SetInputName(1, "計算期數");
SetInputName(2, "RSVt權數");
SetInputName(3, "Kt權數");
setInputName(4, "邊區");
variable: rsv(0), k(0), _d(0);
Stochastic(Length, RSVt, Kt, rsv, k, _d);
input: FastLength(9), SlowLength(18), MACDLength(9);
variable: difValue(0), macdValue(0), oscValue(0);
SetInputName(1, "DIF短期期數");
SetInputName(2, "DIF長期期數");
SetInputName(3, "MACD期數");
MACD(weightedclose(), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue);
Ret = difValue > macdValue
and difValue >= 0 and difValue <= 1
and macdValue >= 0 and macdValue <= 1
and oscValue >= 0 and oscValue <= 1;
if value5 > 500
and k < 50 and k crosses over _d
and volume > volume[1] * 2
then ret=1;
1 評論