Unique chart identifier?

 

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 ...

Reason: