小幫手好

我寫了一個MACD垮頻率警示

是日MACD轉紅柱,且WMA5大於WMA20均

且 60分鐘MACD轉紅柱,且60分鐘WMA5大於60分鐘WMA20均

想請你幫忙檢查是否合理

謝謝

==================

input: FastLength(12), SlowLength(26), MACDLength(9),FastLength2(12), SlowLength2(26), MACDLength2(9);

variable: difValue(0), macdValue(0), oscValue(0), difvalue2(0), macdValue2(0), oscValue2(0);

 

SetTotalBar((maxlist(FastLength,SlowLength,6) + MACDLength) * 10);

MACD(weightedclose(), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue); 

 

SetTotalBar((maxlist(FastLength2,SlowLength2,6) + MACDLength2) * 10);

xfMin_MACD("60",xfMin_weightedclose("60"),FastLength2,SlowLength2,MACDLength2, difvalue2, macdValue2, oscValue2);

 

value1 = wma(close,5); 

value2 = wma(close,20);

condition1 = value1 >value2;

condition2 = oscValue > 0 and oscValue2 > 0;

if condition1 and condition2 then ret =1;