I would like to write a script to pass a value to a running EA by setting a global variable.
I would name the global variable using the currency symbol and chart period, to try and make the global unique to a chart. It would then be easy for the EA to look only for it's own global variable.
Of course there is a slight possibility that the user could have two charts open, both with the same currency and same time period.
I was wondering if there is anyway to programmatically retrieve any sort of unique identifier for a given chart, so a script could query this value? This way I could construct the name for the global using the unique chart ID, instead of using currency symbol and chart period.
Is there any such thing as a unique chart ID that MetaTrader language can access?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I would like to write a script to pass a value to a running EA by setting a global variable.
I would name the global variable using the currency symbol and chart period, to try and make the global unique to a chart. It would then be easy for the EA to look only for it's own global variable.
Of course there is a slight possibility that the user could have two charts open, both with the same currency and same time period.
I was wondering if there is anyway to programmatically retrieve any sort of unique identifier for a given chart, so a script could query this value? This way I could construct the name for the global using the unique chart ID, instead of using currency symbol and chart period.
Is there any such thing as a unique chart ID that MetaTrader language can access?
Thanks very much for any thoughts ...