Are "library file" instances separate for indicators?

 

Guys, do you know the behavior of MT?

let's say, for example, in my library file, I have a function, which makes something calculation, lets say:

double SomethingCounter=0;

double MyFun1(bool condition){

    if (condition) { SomethingCounter++;

    return SomethingCounter;

}



I include that library file in 2 different indicators ( attached to same chart)  and i use that function to count specific occurrences in 1st indi, and other  occurrences for 2nd indi.


My question is, does the library file updates SomethingCounter variable specifically for the instance for caller indicator  or 

when SomethingCounter is updated for i.e. 1st indicator ,then the value is updated for other indicator too? 


maybe you understand what I mean... are instances separate, as if those functions (global scope values) were natively hardcoded directly in the indicators?

 

are instances separate, as if those functions (global scope values) were natively hardcoded directly in the indicators?

Yes of course.

Reason: