HMA - Calling All Programmers!!

 

Hi All.

Well, heres the deal. I came across the HMA_Color indicator some time ago. As I dont like to get weird ideas into my head from all the new indicators that are constantly popping up, I just threw it to the side like everything else. After coming past it a few more times, I started looking into it. It seemed fantastic, worked very well. I use regular EMA's and never really liked the JMA, but HMA seemed to be very smooth. But, whenever you come across anything thats too good to be true, it usually is. So the next step is to test the "Paints The Past" test. And sure enough. After a few hours of screen captures and staring, not only does it gap between its color changes, but HMA_Color also changes its signals. So, having spent that much time on it I figured I should go ahead and just attempt to investigate some more.

While browsing the russian forums with a language translator, I came across another form of the HMA, a non colored version. When going through the code it seems to be alot different then the source code for the HMA.mq4 posted on this site. I went ahead and tested it with "Method" setting of 3 (which my only thought means EMA form or something). And it seems to be moving in the exact form as the HMA_Color without changing signals. Eureka. (I hope im not wrong.)

Now, the only problem I am trying to fix is the slope color. The idea of simply coloring the slopes seems rather simple to me. Basically, When A > B color this color and when A < B color this color. But since my coding capabilites is rather bad. I contacted a few brilliant people on the forums here. I figured I should just create a thread and see if others are interested.

Now, on another note, I figure the color of the HMA slope might be tricky for some reason, and if so, then what could I do. Well, I also came across and indicator called Hull trend. Which is on the forums as well. It paints the bars based upon the HMA slope. It works fine and doesnt paint the past. So, what I was thinking was if color the HMA on the slope on the line was difficult from some reason, couldnt someone with the right knowledge just program the HMA line color to respond to the color command of the Hull Trend. Now, that seems rather complicated to me, but basically im saying is it possible to combined the HMA (the russian version) with Hull Trend. Essentially the programming in the HMA_Color is incorrect or doesnt work, were as the one in Hull Trend works fine and the HMA from the russian forums doesnt seem to paint the past or change signals.

Ok. After all the typing. Conclusions.

What am I asking?

Im wondering if any of the coders on this site can do any ONE of the following magic tricks:

A) Make HMA_Color work (Not Change & Not Gap)

B) Make the Russian HMA color on the slope (Using only two colors)

C) Or Combined the Russian HMA with Hull Trend

D) Or Even Simpler : A Regular Line EMA that is colored by the color of Hull Trend

Again, if any of this is possible with only two colors. Like Green, and Red, and not a third color (which typically means flat) (2 colors meant for multiple moving average viewing, that way things dont get confusing). My cutting and pasting techniques are not gonna work on this one. LOL.

I do apologize for any misinformation above. Please bring anything to my attention. And if anyone of the programmers would kindly like to take on the task, my hats off to you.

Good Luck,

- secXces

--Attached is the indicators and a screen shot of the gaps in HMA_Color--

Files:
 

EDIT - Bump Bump

 

Hi Secxces,

do you realise that information-wise there is nothing added like this?

All the HMA (including the Russian, method parameter=3) give the same curve. The Hull-trend gives the corresponding slope up/down.

So basically you would like a HMA that changes color with the slope for convenient reading?

Greetings,

Floris.

 
FloFri:
Hi Secxces,

do you realise that information-wise there is nothing added like this?

All the HMA (including the Russian, method parameter=3) give the same curve. The Hull-trend gives the corresponding slope up/down.

So basically you would like a HMA that changes color with the slope for convenient reading?

Greetings,

Floris.

Yes Floris, that is correct. The HMA_Color indicator that is attached, again, has errors. Using the russian HMA, with a 3 setting, there isnt any errors or signal changes. It works great. But it doesnt have a color slope as the HMA_Color is. Can you help?

Thanks,

- secXces

 

Hi,

I have revised HMA_Russian, now it plots in color.

Igor

Files:
 

Igorad & Flofry,

They both look great. Ill check them out later on, for errors, my trading day is done and sleep is up for battle. Im impressed though, very good job. My hats off to both of you. Next beer is on me...lol.

- secXces

 

Good job

Especially I would like to thank Flofri.

I found your version very usefull on D1 timeframe.

For me, your version have two advantages over igorad version.

First, it doesn't recolour the past

Second it keeps it colour from the opening of the bar to the very end, and that makes it ultimate tool for analysing the past and for trading of course.

I think igorad have done a great job too, but his version changes colour on open bar as hull trend does, because it relays on that indicator. And I think it recolour the past, If I'm wrong please forgive me

So again, thank you both for great, great job

 

Hi,

my version don't recolor the past.

If you are familiar with my indicators, any not redraw the past.

In this case simply there is a change of color on a current bar.

Igor.

 

Thanks!

As to changing the current bar, I didn't realise -from my own habit of not considering the current bar in the EA decision- that it can be. Fortunately Igor looks at it another way. Useful for all of us.

Thanks everyone for the fantastic constructive efforts in this forum!

 
igorad:
Hi,

my version don't recolor the past.

If you are familiar with my indicators, any not redraw the past.

In this case simply there is a change of color on a current bar.

Igor.

You're absolutely right, a little misunderstanding has occured, forgive me.

I've looked on your indicator behavior once again on 1M timeframe and you are right it does not recolour. Sorry once again.

The only diffrence between those two would be the colour change at current bar. And one more thing, Flofri version has minor bugs when period set to higher value 144 etc.

Of course I am familiar with your work,

And I thank you for it

Have a nice day

 

Braindancer,

could you tell me more about the error you experienced? I tested with 400 bars and more and wordks fine here on 30M to 1D timeframe.

The only thing is when you change timeframe funny lines occur. On loading the indicator works ok. I guess that's MT behaviour

Greetings,

FloFri.

Reason: