There is still a problem with the Hull MA

 

Hi,

At some point there was a problem with the Hull mA that it would repaint itself. Then I remember that Igorad had a look into this problem.

The Hull Ma that is revised by Igorad still has the problem of now and then repaiting itself.

As you can see on the image, there are 2 light blue arrows. When the bar of that arrow was CLOSED the color of the the HMA was also GREEN. In the 2 occasions the next bar is strong down bar. When these bars closed the color of the previous HMA turned back to red.

It is also clear to see with the naked eye that the slope of the HMA in the 2 occasions is pointing UP. But yet the color is red ?!...

So is there someone who could have an other look to this problem. I know it will not be easy to solve this problem because it happens only very few occasions.

TNX a lott in advance...

regards...iGoR

Files:
 

Here is a single color Hull MA that doesn't repaint from my observations. Usually it is best to test painting on 1 min charts to see if past bars change. Only the last bar should be changing - when that bar is closed it should remain at that level.

Files:
 
richx7:
Here is a single color Hull MA that doesn't repaint from my observations. Usually it is best to test painting on 1 min charts to see if past bars change. Only the last bar should be changing - when that bar is closed it should remain at that level.

Hi RichX,

There is something that i don't understand in your posting.

You say it does not repaint, but that indicator has only one color??...

The problem that I am faced with is the repainting in the color changing. As nicely expalined and showed by the image. Offcourse a single color indicator will not repaint its color because it only has 1 color.

So the indicator that you gave can not help with the problem of repainting its color.

Regards...iGoR

 

In my opinion the problem of colored MAs cannot be solved at all.

The reason lays in dynamic nature of the market and in the maths of moving average. New incoming values and old outcoming ones have huge discrepances which makes the MA curve quite unstable and repaints color.

It's clearly seen in Visual Mode of the MT 4 tester.

 

I can not solve it because I'm a Metastock prgrammer.

But the problem is just a little programing fault. It has nothing to do with dynamic or not dynamic.

In the code that looks to the slope of the line there must be the fault. The direction of the line is ALWAYS correct. But in some occasions it gives the wrong color to the direction of the line.

Again I added 2 images were one can nicely see that the color changed of the HMA. I know it is only a visual color problem because if one looks to the direction of the slope that will NEVER change it is the color that changes occasionaly.

SO please could someone have a look to the code that looks to give color depending on direction of the slope of the HMA (up = yellow..down= magenta)

THNX A LOTT IN ADVANCE !!

regards...iGoR

Files:
yellow.gif  51 kb
magenta.jpg  129 kb
 

Hi,

Try to test indicator with different code of this line:

ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x);

or you can change to it:

ExtMapBuffer[x] = NormalizeDouble(iMAOnArray(vect, 0, p, 0, method, x),Digits);

or

ExtMapBuffer[x] = NormalizeDouble(iMAOnArray(vect, 0, p, 0, method, x),Digits+1);

Look on changes especially on small TF.

Igor

 

thanks for you help Igor but that does not solve the problem...

Could you have an other look at it plz...

regards...iGoR

Reason: