Problem with chart ID

 

Hi guys,

Have run into a small problem regarding chart ID's.

I have this code in a script:

long chart_id;
chart_id = ChartOpen("GBPUSD",PERIOD_D1);                                
GlobalVariableSet("chart_id",chart_id);
Print(chart_id);

This is the 'Print' output:

This is the Global Variable:


Please can someone advise why they are different values?

 
sd59: Please can someone advise why they are different values?
Global Variables are type Double and can only store 15 digits accurately.
          Double-precision floating-point format - Wikipedia
 
William Roeder #:
Global Variables are type Double and can only store 15 digits accurately.
          Double-precision floating-point format - Wikipedia

thanks

Reason: