How can I treat a parameter of MT4 EA settings in the source code

To add comments, please log in or register
Leandro Oliveira
255
Leandro Oliveira  

Hello,

I would like to know how can I treat a parameter from metatrader 4 platform definition instead of treat the error.


In the MetaTrader 4 we have a parameter that can set up the EA only to work with Long or Short positions, or the both.

Well, I would like to treat this parameter in my code to avoid the EA get the error.

Anyone can help?

William Roeder
19422
William Roeder  
Don't use that, create an input enumeration and use it.
Leandro Oliveira
255
Leandro Oliveira  
William Roeder:
Don't use that, create an input enumeration and use it.

Really? this is the Metaquotes recomendations? this features look a garbage then.

Alain Verleyen
38628
Alain Verleyen  
Leandro Oliveira:

Hello,

I would like to know how can I treat a parameter from metatrader 4 platform definition instead of treat the error.


In the MetaTrader 4 we have a parameter that can set up the EA only to work with Long or Short positions, or the both.

Well, I would like to treat this parameter in my code to avoid the EA get the error.

Anyone can help?

It's possible but indirectly. You have to save a template, then parse it to get the setting you want. See this topic.

However I agree with William, it's simpler and faster to use an input parameter, unless you have a good reason to do otherwise.

Leandro Oliveira
255
Leandro Oliveira  
Alain Verleyen:

It's possible but indirectly. You have to save a template, then parse it to get the setting you want. See this topic.

However I agree with William, it's simpler and faster to use an input parameter, unless you have a good reason to do otherwise.

ok, thank you for the contribute, I will do that.

To add comments, please log in or register