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)
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.