Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-04-2006, 07:38 PM
Member
 
Join Date: Jan 2006
Posts: 30
DooMGuarD is on a distinguished road
Question Library shares

hi all...

if i have a variable in the library
Code:
#property library
// library code

int BuyOption;

void MyLibBuyOption(int Value)
{
  BuyOption = Value;
  return(0);
} 

int MyLibBuyOptionValue();
{
  return(BuyOption);
}
i share this value for any EA or for each EA i have different value (if changed, course)

in EA1
Code:
#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...

Last edited by DooMGuarD; 12-04-2006 at 07:46 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT. The time now is 07:36 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.