Download MetaTrader 5

Communicating with an Expert Advisor

To add comments, please log in or register
David Schwartz
141
David Schwartz  
I've written a couple of bots for MT4 as Expert Advisors. I typically run them on my desktop. I'd like to be able to change some of their external variables while they are running. Is there some easy way to do that? Can they have any kind of user interface?
Marco vd Heijden
Moderator
4802
Marco vd Heijden  
David Schwartz:
I've written a couple of bots for MT4 as Expert Advisors. I typically run them on my desktop. I'd like to be able to change some of their external variables while they are running. Is there some easy way to do that? Can they have any kind of user interface?


Yes you can press F7 in the terminal.

For on screen solution you can use:

OBJ_EDIT


But you will have to copy the initial value of the input parameter because as a fixed value it can not be overwritten so you copy it to another variable which then can be edited.

https://www.mql5.com/en/docs/constants/objectconstants/enum_object/obj_edit

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_EDIT
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_EDIT
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_EDIT - Reference on algorithmic/automated trading language for MetaTrader 5
David Schwartz
141
David Schwartz  
Marco vd Heijden:


Yes you can press F7 in the terminal.

For on screen solution you can use:


But you will have to copy the initial value of the input parameter because as a fixed value it can not be overwritten so you copy it to another variable which then can be edited.

https://www.mql5.com/en/docs/constants/objectconstants/enum_object/obj_edit


Thanks. That's not as nice as an advisor being able to have some kind of UI, but it will get the job done.

Marco vd Heijden
Moderator
4802
Marco vd Heijden  
David Schwartz:


Thanks. That's not as nice as an advisor being able to have some kind of UI, but it will get the job done.

You can certainly code your own designed GUI.

It all depends on how much time you want to invest in your project.

GBWT094114
3352
GBWT094114  
David Schwartz:
I've written a couple of bots for MT4 as Expert Advisors. I typically run them on my desktop. I'd like to be able to change some of their external variables while they are running. Is there some easy way to do that? Can they have any kind of user interface?
Change some External variables, How many times do you do that in a day? How do you choose the settings?
To add comments, please log in or register