internal void SetUserCommand(OpenQuant.API.UserCommand command) { try { foreach (Strategy strategy in this.strategies.Values) { strategy.OnUserCommand(command); } } catch (Exception ex) { this.EmitError(ex); } }
public override void OnUserCommand(UserCommand command) { StopStrategy(); }
public virtual void OnUserCommand(UserCommand command) { }
public override void OnUserCommand(UserCommand command) { string cmd = command.Text; if (cmd == "LOGIN") { Login(); } else if (cmd.StartsWith("LOGIN")) { string[] arr = cmd.Split(':'); Login(arr[1]); } else if (cmd.StartsWith("GROUP")) { string[] arr = cmd.Split(':'); SetDefaultGroup(arr[1], arr[2]); } else { SendMessage(cmd); } }