Download MetaTrader 5

ChartID() function get its value from current template?

To add comments, please log in or register
melgibson
114
melgibson  

Hi,

I have problem with ChartID() function.

I thought it must be unique for every chart but if I call this function on chart which uses template with a particular id value

<chart>

id=123456789

comment=...

</chart>

then ChartID() gives back this value (123456789).

So if I use the same template with different charts then I always get the same chart id.

Is that normal?

Thanks for your help

mrmedia
343
mrmedia  


Nope - if you create a new chart you get a new ID.

If you delete a chart and create a new one - you get the same ID.

The ID goes back into available pile.

qjol
3245
qjol  
melgibson:

Is that normal?


I think not report to service desk
melgibson
114
melgibson  

Ok, but you can try it.

Open a template and write any number after id tag.

Then load this template on a chart then call ChartID() function. You will get back your number from the template.

If you use this template (with this special id tag) on any chart then ChartId() always will be the same.

qjol
3245
qjol  
To add comments, please log in or register