When I calculate MACD using daily resolution , my signals come at the expected date. However when I calculate them on a finer resolution (such as 4 hours), they arrive precisely 24 hours later than on the daily chart . I would have expected them to come sooner on the finer resolution charts.
The blue line is the high resolution 4hr data and green is the daily data. The blue line (4hr) lags behind the green line (daily) by 24 hours, I would have expected the blue to be ahead of the daily as the daily should only be correct once a day where as the 4hr show be correct 6 times per day.
Can anyone explain why this is and how I can possibly fix it?
This is how the script gets the data and calculates the macd:
// --------------------- Daily dailyFastMA = ema ( src , fastLength) dailySlowMA = ema ( src , slowLength)
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.