Beispiel #1
0
 public void OnMqlError(MqlErrorException mqlErrorException)
 {
     if (MqlError != null)
     {
         MqlError(mqlErrorException);
     }
 }
 private string OnCallMqlMethod(string methodName, IEnumerable<string> parameters)
 {
   string str = "";
   try
   {
     this.ClientMethod = new MethodCallInfo(methodName, parameters);
     this.ClientCallSemaphore.Set();
     this.ServerCallSemaphore.WaitOne();
     str = this.ClientMethod.ReturnValue;
     if (!string.IsNullOrEmpty(this.ClientMethod.ErrorMessage))
     {
       if (this._mqlHandler.MqlError != null)
       {
         MqlErrorException mqlErrorException = new MqlErrorException(this.ExpertInfo, this.ClientMethod);
         this._mqlHandler.MqlError(mqlErrorException);
         Trace.Write((object) new LogInfo(LogType.MqlError, (Exception) mqlErrorException, ""));
       }
     }
   }
   catch (Exception ex)
   {
     Trace.Write((object) new LogInfo(LogType.Execption, ex, ""));
   }
   finally
   {
     this.ClientMethod = (MethodCallInfo) null;
   }
   return str;
 }
Beispiel #3
0
 private void OnMqlError(MqlErrorException mqlErrorException)
 {
     int num = this.AccountNumber();
     string str = this.Symbol();
     MetaTrader4 metaTrader4 = MetaTrader4.For(num, str);
     metaTrader4.OnMqlError(mqlErrorException);
 }
Beispiel #4
0
 private void OnMqlError(MqlErrorException mqlErrorException)
 {
     Trace.Write(new TraceInfo(BridgeTraceErrorType.Debug, message: "MQL Error: " + mqlErrorException.Message));
 }
Beispiel #5
0
 private void OnMqlError(MqlErrorException mqlErrorException)
 {
   MetaTrader4.For(QuoterExtensions.AccountNumber(this), QuoterExtensions.Symbol(this)).OnMqlError(mqlErrorException);
 }
Beispiel #6
0
 private void metaTrader4_MqlError(MqlErrorException mql)
 {
     // handler mql error
 }
Beispiel #7
0
 private void OnMqlError(MqlErrorException mqlErrorException)
 {
     string err = mqlErrorException.Message.Split(' ')[3].Trim('\'');
     string[] msg = err.Split(':');
     lastError = Convert.ToInt32(msg[0]);
 }
Beispiel #8
0
 private string OnCallMqlMethod(string methodName, IEnumerable<string> parameters)
 {
     string returnValue = "";
     try
     {
         try
         {
             this.ClientMethod = new MethodCallInfo(methodName, parameters);
             this.ClientCallSemaphore.Set();
             this.ServerCallSemaphore.WaitOne();
             returnValue = this.ClientMethod.ReturnValue;
             if (!string.IsNullOrEmpty(this.ClientMethod.ErrorMessage) && this._mqlHandler.MqlError != null)
             {
                 MqlErrorException mqlErrorException = new MqlErrorException(this.ExpertInfo, this.ClientMethod);
                 this._mqlHandler.MqlError(mqlErrorException);
                 Trace.Write(new TraceInfo(BridgeTraceErrorType.MqlError, mqlErrorException, ""));
             }
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             Trace.Write(new TraceInfo(BridgeTraceErrorType.Execption, exception, ""));
         }
     }
     finally
     {
         this.ClientMethod = null;
     }
     return returnValue;
 }
Beispiel #9
0
 public void OnMqlError(MqlErrorException mqlErrorException)
 {
     if (this.MqlError == null)
     return;
       this.MqlError(mqlErrorException);
 }
 private void OnMqlError(MqlErrorException mqlErrorException)
 {
     Trace.Write(new LogInfo(LogType.Notifications, message: "MQL Error: " + mqlErrorException.Message));
 }