Need help with the higher time frame indicator please that seems not very accurate...
I'm using 2 charts - 300 and 900 volume, where 900 is higher time frame chart.There is a regular MACD (with colored plots) attached to the 900 vol. chart. I'm using the following parameters for all my MACD indicators on all charts - 5,20,30 accordingly.
I have custom built indicator that returns the values of higher time frame MACD (and other indicators), e.g. if MACD is neutral then return 0, 1-rising and -1 - falling. This indicator is attached to the 300 vol. chart - my lower term chart.
To test this I'm comparing it to the regular MACD and it seems that the custom higher time frame MACD (attached to 300 vol chart) is behind the regular one (on 900 vol. chart).
I'm attaching the screen capture where you can see that the custom MACD returns -1 (minus one) or falling at the time when the regular 900 vol. chart MACD seems rising, at least visually. Just in case I'm attaching the colored version of MACD which is regular MACD with colored plots.
No one can help/fix the problem. Maybe Ninja can. Maybe you see what I and others do not see or understand...
Here's the short version of the code I'm using to return the values of higher time frame MACD ind. - OnBarUpdate() - 300 vol chart:
....
double macd1;
double macd2;
int macd_p1dir = 0; // period 1 - 900 volume
....
// get higher time frame values - 900 volume chart
if (BarsInProgress == 1) ...
{
macd1 = MACD(_MACDfast,_MACDslow,_MACDsmooth)[0];
macd2 = MACD(_MACDfast,_MACDslow,_MACDsmooth)[1];
if (macd1 > macd2)
macd_p1dir = 1;
else if (macd1 < macd2)
macd_p1dir = -1;
else macd_p1dir = 0;
DrawText(...macd_p1dir...); // print 0 - neutral, -1 - falling, 1 - rising on the lower term chart - 300 vol.
}
Is there anything missed or incorrect in above code please? If you need a full version then I can email it to you directly.
Thank you very much.
Regards, Art.
Comment