Coding help... Cyclical indicator - page 17

 
lucmat:
Hi all

is it possible to apply TMA Centered Oscillator to another indicator rather than the price?

In other terms, may I apply the TMA C.O. to the indicator I attach here?

Thanks

Lucmat

differenceok.mq4

Yes it can

Simple replace the places where the price is used with an iCustom() call to that indicator

 
mladen:
Yes it can Simple replace the places where the price is used with an iCustom() call to that indicator

Hi Mladen

i've tried in any way but every attemps failed: the result is always that my mt4 stopped to work!

May you help me?

Thanks in advance.

Lucmat

 
lucmat:
Hi Mladen

i've tried in any way but every attemps failed: the result is always that my mt4 stopped to work!

May you help me?

Thanks in advance.

Lucmat

Can you post any of those attempts so that we can check what was done wrong?

 
mladen:
Can you post any of those attempts so that we can check what was done wrong?

Ok, but please don't make fun of me I'm a real bad programmer: in reality I think I don't know well what I've done!

Thanks

Lucmat

tma_centered_oscillator_difference.mq4

 
lucmat:
Ok, but please don't make fun of me I'm a real bad programmer: in reality I think I don't know well what I've done!

Thanks

Lucmat

tma_centered_oscillator_difference.mq4

Lucmat

Which indicator is the "differenceok" indicator?

Also, I am assuming that this is an error

work[r][0] = iMA(NULL,0,1,0,MODE_SMA,iCustom(NULL,0,"differenceok",12,1,0),i);

You can not call a custom indicator in the place where the price enumerator should be in the iMA() call. If you want the values of "differenceok" smoothed by iMA() you have store the values of "differenceok" to a buffer and then ise iMAOnArray() to get smother values of "differenceok"

 
mladen:
Lucmat

Which indicator is the "differenceok" indicator?

Also, I am assuming that this is an error

work[r][0] = iMA(NULL,0,1,0,MODE_SMA,iCustom(NULL,0,"differenceok",12,1,0),i);

You can not call a custom indicator in the place where the price enumerator should be in the iMA() call. If you want the values of "differenceok" smoothed by iMA() you have store the values of "differenceok" to a buffer and then ise iMAOnArray() to get smother values of "differenceok"

Thanks Mladen

you are always gentle and useful!

Btw I've tried to solve but without any results: maybe I have to start with programming simple indicators!

Thanks the same

Lucmat

 
lucmat:
Thanks Mladen

you are always gentle and useful!

Btw I've tried to solve but without any results: maybe I have to start with programming simple indicators!

Thanks the same

Lucmat

The indicator "differenceok" is posted at post 161.

 
lucmat:
The indicator "differenceok" is posted at post 161.

Lucmat

Try it out now : differenceok.mq4 tma_centered_oscillator_difference_1.mq4

 
mladen:
Lucmat Than this should be it

Hi Mladen and all

is it possible to make "SMA centered oscillator binary" with the "TMA centered oscillator"?

Thanks for all

Lucmat

 
lucmat:
Hi Mladen and all

is it possible to make "SMA centered oscillator binary" with the "TMA centered oscillator"?

Thanks for all

Lucmat

Lucmat

Here is a centered TMA version : tma_centered_oscillator_binary.mq4

Reason: