Library shares

 

hi all...

if i have a variable in the library

#property library

// library code

int BuyOption;

void MyLibBuyOption(int Value)

{

BuyOption = Value;

return(0);

}

int MyLibBuyOptionValue();

{

return(BuyOption);

}

[/code]

i share this value for any EA or for each EA i have different value (if changed, course)

in EA1

#include "MyLibrary.mqh"

int init()

{

...

MyLibBuyOption(1);

...

return(0);

}

int start()

{

...

Print(MyLibBuyOptionValue());

...

return(0);

}

in EA2

[code]

#include "MyLibrary.mqh"

int init()

{

...

MyLibBuyOption(2);

...

return(0);

}

int start()

{

...

Print(MyLibBuyOptionValue());

...

return(0);

}

i run EA1 and EA2 , what output of print function en each EA?

sorry for my english...