Central Moving Average - page 4

 

First time ...

engula

In your original request there was this sentence too :

where t = last close and the 'future' values are set equal to t. this would result as: CMA(5) = (SMA(t-2)+SMA(t-1)+SMA(t)+SMA(t)+SMA(t)) / 5

Anyway, since this is the first time that someone complaints that something does not repaint, will see what can be done

engula:
hi mladen, many thanks.

if you say that it doesn't repaint, then this worries me... since it has to repaint...

this indicator should at the end look similar to the snake, but has a different algorithm behind.

it's the slope of the difference of 2 cma.

let me make an example how a cma should be calculated (unfortunately reading the code, i'm not capable to understand how it works):

assuming the last closed bar is at time t0 and we want to calculate cma(5), then:

cma(5)(t0) = [cma(5)(t-2) + cma(5)(t-1) + cma(5)(t0) + cma(5)(t+1) + cma(5)(t+2)] / 5

where: cma(5)(t0) = cma(5)(t+1) = cma(5)(t+2), so to set all future (unknown) values equal to the value of the last closed bar. this means also that every time a bar is closed, the value of cma(5) has to be recalculated.

this is why it has to be repainting.

hope my explanation was helpful (any question, pls let me know), looking forward showing you all how this indi can be of help identifying cycles!

regards
 
mladen:
engula

In your original request there was this sentence too :

Anyway, since this is the first time that someone complaints that something does not repaint, will see what can be done

mladen, i'm really sorry... this damned copy&paste...

the original formula is the right one.

so:

cma(5)(t0) = [sma(t-2) + sma(t-1) + sma(t0) + sma(t+1) + sma(t+2)] / 5

where: sma(t0) = sma(t+1) = sma(t+2)

and... it HAS to repaint...

thanks!

 

CMO - engula 2

engula

Here you go. It calculates as you asked for and, yes, it will repaint (as you asked for )

Have a pleasant weekend

engula:
mladen, i'm really sorry... this damned copy&paste...

the original formula is the right one.

so:

cma(5)(t0) = [sma(t-2) + sma(t-1) + sma(t0) + sma(t+1) + sma(t+2)] / 5

where: sma(t0) = sma(t+1) = sma(t+2)

and... it HAS to repaint...

thanks!
Files:
 
mladen:
engula

Here you go. It calculates as you asked for and, yes, it will repaint (as you asked for )

Have a pleasant weekend

hi mladen,

thanks this looks good, but there's something that doesn't convince me 100%.

attached an old chart created with xls and one with your indi for the same period. the zeroline crosses should overlap (blue and red), but they don't... i don't know why... i'll try to understand, but mq4 is almost unreadable for me...

in any case thanks so much for the time you took to code it!

bye

Files:
fib_1m-2w.jpg  229 kb
cma.gif  24 kb
 

...

engula

It is coded according to your specifications, so, I really can not tell what were the expectations of it (how should it work)

regards

Mladen

engula:
hi mladen,

thanks this looks good, but there's something that doesn't convince me 100%.

attached an old chart created with xls and one with your indi for the same period. the zeroline crosses should overlap (blue and red), but they don't... i don't know why... i'll try to understand, but mq4 is almost unreadable for me...

in any case thanks so much for the time you took to code it!

bye

 

Hi mladen

I really appreciate your work!

I've also developed a similar indicator in excel as engula.

Would you be able to turn the excel formula that I attach into an indicator for metatrader?

It repaints because make a projection of the last available value.

But it traces a cycle indicator and its momentum very clear and precise.

I think it will be useful for all, especially when used in combination with other indicators such as the DSS Bressert, MACD and moving averages.

See you soon

mladen:
engula

It is coded according to your specifications, so, I really can not tell what were the expectations of it (how should it work)

regards

Mladen

Here is my indicator in excel....

cycleok.xls

Files:
immagine.jpg  108 kb
cycleok.xls  505 kb
 
lucmat:
Hi mladen

I really appreciate your work!

I've also developed a similar indicator in excel as engula.

Would you be able to turn the excel formula that I attach into an indicator for metatrader?

It repaints because make a projection of the last available value.

But it traces a cycle indicator and its momentum very clear and precise.

I think it will be useful for all, especially when used in combination with other indicators such as the DSS Bressert, MACD and moving averages.

See you soon

Here is my indicator in excel....

cycleok.xls

hi lucmat, you...look italian

 
engula:
hi lucmat, you...look italian

Hi Engula.

Yes I'm italian!

Have you some improvement of your cyclical indicator?

Do you update your software in excel manually or automatically via dde?

I only refresh it manually, so I need this indicator in metatrader...

Thanks

Bye

 
lucmat:
Hi Engula.

Yes I'm italian!

Have you some improvement of your cyclical indicator?

Do you update your software in excel manually or automatically via dde?

I only refresh it manually, so I need this indicator in metatrader...

Thanks

Bye

no real improvement so far. i tested several indis but with no real success.

i stopped using xls because all the data extraction was becoming too much time consuming. tried dde for a while but once the connection was lost i had to enter data manually, etc etc...

still hoping to be able to find something useful for mt4, so searching the net when time allows.

should i find sth i'll post here.

ciao

 

Anyone can help me to translate into metatrader the indicator in excel that I've attached a few posts above?

This indicator is very helpful....

Thanks