Esempio n. 1
0
 public MQLCommandRequest(int id, MQLCommand command, List <object> parameters)
 {
     LOG.DebugFormat("MQLCommandRequest: {0} {1}", id, command.ToString());
     this.id             = id;
     this.command        = command;
     this.parameters     = parameters;
     this.error          = 0;
     this.commandWaiting = true;
 }
Esempio n. 2
0
 public MQLCommandRequest(int id, MQLCommand command, List<object> parameters)
 {
     LOG.DebugFormat("MQLCommandRequest: {0} {1}", id, command.ToString());
     this.id = id;
     this.command = command;
     this.parameters = parameters;
     this.error = 0;
     this.commandWaiting = true;
 }
Esempio n. 3
0
 public MQLCommandRequest(int id, MQLCommand command, List <object> parameters, TaskCompletionSource <Object> taskCompletionSource = null)
 {
     LOG.DebugFormat("MQLCommandRequest: {0} {1}", id, command.ToString());
     ID                   = id;
     Command              = command;
     Parameters           = parameters;
     Error                = 0;
     CommandWaiting       = true;
     TaskCompletionSource = taskCompletionSource;
 }
Esempio n. 4
0
 public void NotifyHost(MQLCommand command, int id)
 {
     //notify MT4 OnChartEvent()
     if (hChartWnd != 0)
     {
         const uint WM_KEYDOWN = 0x0100;
         var        message    = EncodeKeydownMessage((ushort)command, (uint)id);
         PostMessageSafe(hChartWnd, WM_KEYDOWN, message.wparam, message.lparam);
     }
 }
Esempio n. 5
0
 public int ExecCommand(MQLCommand command, List<Object> parameters)
 {
     LOG.DebugFormat("ExecCommand: {0}", command.ToString());
     int id;
     lock (syncLock)
     {
         id = counter++;
         commandRequests[id] = new MQLCommandRequest(id, command, parameters);
     }
     return id;
 }
Esempio n. 6
0
        public int ExecCommand(MQLCommand command, List <Object> parameters)
        {
            LOG.DebugFormat("ExecCommand: {0}", command.ToString());
            int id;

            lock (syncLock)
            {
                id = counter++;
                commandRequests[id] = new MQLCommandRequest(id, command, parameters);
            }
            return(id);
        }
Esempio n. 7
0
        public int ExecCommand(MQLCommand command, List <Object> parameters, TaskCompletionSource <Object> taskCompletionSource = null)
        {
            LOG.DebugFormat("ExecCommand: {0}", command.ToString());
            int id;

            lock (syncLock)
            {
                id = counter++;
                commandRequests[id] = new MQLCommandRequest(id, command, parameters, taskCompletionSource);
                NotifyHost(command, id);
            }
            return(id);
        }
 public void ExecCommand(MQLCommand command, List<Object> parameters)
 {
     this.command = command;
     this.parameters = parameters;
     this.commandWaiting = true;
 }