private void OnMqlError(MqlErrorException mqlErrorException) { int num = this.AccountNumber(); string str = this.Symbol(); MetaTrader4 metaTrader4 = MetaTrader4.For(num, str); metaTrader4.OnMqlError(mqlErrorException); }
protected override int Start() { int num = this.AccountNumber(); string str = this.Symbol(); MetaTrader4 metaTrader4 = MetaTrader4.For(num, str); metaTrader4.OnQuote(this); return(1); }
public Form1() { InitializeComponent(); Bridge.InitializeHosts(true); metaTrader4 = Bridge.GetTerminal(2088782777, "EURUSD.arm"); metaTrader4.QuoteRecieved += metaTrader4_QuoteRecieved; metaTrader4.MqlError += metaTrader4_MqlError; }
internal static MetaTrader4 For(int accountNumber, string symbol) { lock (MetaTrader4._listernerLock) { string local_0 = (string) (object) accountNumber + (object) symbol; if (MetaTrader4._listeners.ContainsKey(local_0)) return MetaTrader4._listeners[local_0]; MetaTrader4 local_1 = new MetaTrader4(accountNumber, symbol); _listeners.Add(local_0, local_1); return local_1; } }
void Application_Start(object sender, EventArgs e) { // Code that runs on application startup BundleConfig.RegisterBundles(BundleTable.Bundles); AuthConfig.RegisterOpenAuth(); RouteConfig.RegisterRoutes(RouteTable.Routes); Bridge.InitializeHosts(true); metaTrader4 = Bridge.GetTerminal(121212, "EURUSD"); metaTrader4.QuoteRecieved += metaTrader4_QuoteRecieved; metaTrader4.MqlError += metaTrader4_MqlError; }
internal static MetaTrader4 For(int accountNumber, string symbol) { lock (MetaTrader4._listernerLock) { string local_0 = (string)(object)accountNumber + (object)symbol; if (MetaTrader4._listeners.ContainsKey(local_0)) { return(MetaTrader4._listeners[local_0]); } MetaTrader4 local_1 = new MetaTrader4(accountNumber, symbol); _listeners.Add(local_0, local_1); return(local_1); } }
internal static MetaTrader4 For(int accountNumber, string symbol) { MetaTrader4 item; lock (MetaTrader4._listernerLock) { string str = string.Concat(accountNumber, symbol); if (!MetaTrader4._listeners.ContainsKey(str)) { MetaTrader4 metaTrader4 = new MetaTrader4(accountNumber, symbol); MetaTrader4._listeners.Add(str, metaTrader4); item = metaTrader4; } else { item = MetaTrader4._listeners[str]; } } return(item); }
internal static MetaTrader4 For(int accountNumber, string symbol) { MetaTrader4 item; lock (_listernerLock) { string str = string.Concat(accountNumber, symbol); if (!_listeners.ContainsKey(str)) { var metaTrader4 = new MetaTrader4(accountNumber, symbol); _listeners.Add(str, metaTrader4); item = metaTrader4; } else { item = _listeners[str]; } } return item; }
public static MetaTrader4 GetTerminal(int accountNumber, string symbol) { return(MetaTrader4.For(accountNumber, symbol)); }
public static List <MetaTrader4> GetTerminals() { return(MetaTrader4.All()); }
protected override int Start() { MetaTrader4.For(QuoterExtensions.AccountNumber(this), QuoterExtensions.Symbol(this)).OnQuote(this); return(1); }
private void OnMqlError(MqlErrorException mqlErrorException) { MetaTrader4.For(QuoterExtensions.AccountNumber(this), QuoterExtensions.Symbol(this)).OnMqlError(mqlErrorException); }