MACD 1min: -0.0725339898886261 3min: -0.0952584188761136 1min Bar Object: 7/20/2007 7:38:00 AM Open: 140.63 High: 140.63 Low: 140.34 Close: 140.62 MACD 1min: -0.0833415635370898 3min: -0.0952584188761136 1min Bar Object: [COLOR=Red]7/20/2007 7:39:00 AM[/COLOR] Open: 140.59 High: 140.67 Low: 140.58 Close: 140.63 MACD 1min: -0.0900615535632312 3min: [COLOR=Red]-0.0952584188761136[/COLOR] 3min Bar Object: [COLOR=Red]7/20/2007 7:39:00 AM[/COLOR] Open: 140.82 High: 140.83 Low: 140.34 Close: 140.63 MACD 3min: [COLOR=Red]-0.112775395505793[/COLOR] 1min: -0.0900615535632312
I suspect this behavior would carry over in a more dramatic way for your situation because you are using volume as your third interval. I would think that because of when your volume bar is being processed none of your minute bars are up to date yet and thus a delayed value of MACD when you reference its value. Perhaps it would be better to run your calculations on the object with the lowest resolution (your 5min bars). But that produces another issue of is 5mins really the lowest resolution you are running at because you can't really compare the resolution of volume vs minutes. I think if you just run on a volatile market it shouldn't be a problem though.
This still leaves the issue of how you are getting an "up" value in a down trend. Maybe you would want to print values from every bars object and try to pinpoint what the delay in value is. It has to be getting the MACD value from somewhere so it will probably be helpful to find where the value we are getting is coming from.
Comment