Q:我想要前一天的macd的3個值,那個[1]要加在哪裡?
Q:我想要前一天的macd的3個值,那個[1]要加在哪裡?
DifValue[1]
MacdValue[1]
OscValue[1]
Hello Kevin Deng,
如果您是要取得MACD指標前一根Bar的三個值的話,那麼
input: FastLength(12), SlowLength(26), MACDLength(9);
variable: difValue(0), macdValue(0), oscValue(0);
MACD(weightedclose(), FastLength, SlowLength, MACDLength, difValue, macdValue, oscValue);
difValue[1], macdValue[1] 和 oscValue[1] 就會是前一根Bar的值,使用日頻率的就會是前一日的值。
若使用不同頻率的話則需要用 xfMin_MACD 來計算不同頻率的MACD, xfmin_GetValue 來取得不同頻率的資訊。
2 評論