Download MetaTrader 5

is it possible to dynamically evaluate code in mql5?

To add comments, please log in or register
cyberglassed
613
cyberglassed  

Hello, I would like to know if is it possible to dynamically evaluate code in mql5?

I mean in the same way you can do with Javascript and PHP with the "eval(...)" function?

Reference: http://www.w3schools.com/jsref/jsref_eval.asp


Regards, cyberglassed.

JavaScript eval() Function
  • www.w3schools.com
Free HTML CSS JavaScript DOM jQuery XML AJAX Angular ASP .NET PHP SQL tutorials, references, web building examples
Eliy Arlev
23
Eliy Arlev  
cyberglassed:

Hello, I would like to know if is it possible to dynamically evaluate code in mql5?

I mean in the same way you can do with Javascript and PHP with the "eval(...)" function?

Reference: http://www.w3schools.com/jsref/jsref_eval.asp


Regards, cyberglassed.

seems not, what would you use it for?
JD4
1100
JD4  
Eliy Arlev:
seems not, what would you use it for?
Possibly to dynamically evaluate the code for the same reason you would be doing it in Java.  Not sure what good it does either, tbh, but apparently someone had a reason for it at one point.
cyberglassed
613
cyberglassed  
Eliy Arlev:
seems not, what would you use it for?
I wanna load code from an external file based on some criteria.
JD4
1100
JD4  
cyberglassed:
I wanna load code from an external file based on some criteria.

I am not sure that there is a way to load code into the program only if certain conditions are met, but I know you can code your EAs to use external libraries as code resources.  You can also use include files to accomplish this.

https://www.mql5.com/en/docs

MQL5 Reference - How to use algorithmic/automated trading language for MetaTrader 5
MQL5 Reference - How to use algorithmic/automated trading language for MetaTrader 5
  • www.mql5.com
MetaQuotes Language 5 (MQL5) Reference - Documentation on MQL5.com
Enrico Lambino
5565
Enrico Lambino  
cyberglassed:
I wanna load code from an external file based on some criteria.

There is no eval() in MQL4/5. Please see this forum thread.

However, if you want to load code based on a certain criteria, you can use conditional compilation.

cyberglassed
613
cyberglassed  
Enrico Lambino:

There is no eval() in MQL4/5. Please see this forum thread.

However, if you want to load code based on a certain criteria, you can use conditional compilation.

thanks Enrico.
To add comments, please log in or register