小幫手您好,
想要寫一個月資料MACD 的OSC>0 向上 ;DIF>MACD; 日資料 DIF> MACD 且 OSC向上的語法,寫下語法後發現跑出來的資料並不符合。是否可以請小幫手協助幫忙?
input:FastLength(12), SlowLength(26), MACDLength(9),Length(5),period(12,"天數"),period2(50,"天數");
variable:difValue(0), macdValue(0), oscValue(0),VolumeLimit(500);
xf_macd("D",xf_weightedclose("D"), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue);
xf_macd("W",xf_weightedclose("W"),FastLength, SlowLength, MACDLength, value5, value6, value7);
xf_macd("M",xf_weightedclose("M"),FastLength, SlowLength, MACDLength, value11, value12, value13);
condition1 = difValue >= macdValue;
condition2 = oscValue >= oscValue[1];
condition3 = value13 >=0;
value20 = getfield("Date", "M");
if value20 <> value20[1] then value21 = value13[1];
condition4 = value13 >= value21;
value20 = getfield("Date", "M");
if value20 <> value20[1] then value23 = value11;
value20 = getfield("Date", "M");
if value20 <> value20[1] then value24 = value12;
condition5 = value23 >= value24;
if condition1 and condition2 and condition3 and condition4 and condition5 then ret=1;
5 評論