Download MetaTrader 5

Mergin two indicators in EA

To add comments, please log in or register
Interested in MetaTrader 5 features? Learn more about them!
Tim Niko Tegtmeyer
332
Tim Niko Tegtmeyer 2015.06.30 22:27 

Hello,

I have made a custom indicator and then attached the momentum indicator to the c. indicator window.

Can you tell me how to get these values into my EA? I want the EA to open orders on crossover, but how can I merge the two indicators in the EA?

The momentum indi has fixed max and min, so it keeps in place while navigating thru the chart.

Regards,

Tim.

Alain Verleyen
Moderator
30719
Alain Verleyen 2015.06.30 22:33  
You have to use iCustom().
Tim Niko Tegtmeyer
332
Tim Niko Tegtmeyer 2015.06.30 23:45  
Alain Verleyen:
You have to use iCustom().

Hey Alain, thank you for your answer.

Maybe I have expressed myself in a bad way. I know how to get the value from an indicator into my EA, what I need is to get the value from two indicators that are in the same window and with fixed maximum and minimum, into the EA.

In the terminal I can see the two indicators in one window by just dragging the one onto the other, no problem! But how to employ this values in my EA? If I call the indis inside my EA, I get two values, but they are on completely different scales due to the fixed limits. Momentum limits are min 97 and max 102, my custom indi has limits from (-5) to 5. How could I detect a crossing inside my EA?

Im trying with excel to make this work, but for now I'm still puzzled :(


EDIT: I have solved the problem. My formula is: (x - ((102+97)/2)) * 2

Maybe it helps someone someday...

Alain Verleyen
Moderator
30719
Alain Verleyen 2015.07.01 13:10  
Tim Niko Tegtmeyer:

Hey Alain, thank you for your answer.

Maybe I have expressed myself in a bad way. I know how to get the value from an indicator into my EA, what I need is to get the value from two indicators that are in the same window and with fixed maximum and minimum, into the EA.

In the terminal I can see the two indicators in one window by just dragging the one onto the other, no problem! But how to employ this values in my EA? If I call the indis inside my EA, I get two values, but they are on completely different scales due to the fixed limits. Momentum limits are min 97 and max 102, my custom indi has limits from (-5) to 5. How could I detect a crossing inside my EA?

Im trying with excel to make this work, but for now I'm still puzzled :(


EDIT: I have solved the problem. My formula is: (x - ((102+97)/2)) * 2

Maybe it helps someone someday...

Congrats
To add comments, please log in or register