public void DaneInstrumentu()
        {
            try
            {
                SyncAPIConnector connector      = new SyncAPIConnector(serverData);
                Credentials      credentials    = new Credentials(userId, password, "", "pixelNet");
                LoginResponse    loginResponse  = APICommandFactory.ExecuteLoginCommand(connector, credentials, true);
                SymbolResponse   symbolResponse = APICommandFactory.ExecuteSymbolCommand(connector, this.Nazwa);
                this.info = symbolResponse.Symbol;
                ulamek    = Convert.ToInt32(info.Precision);
                double d    = Convert.ToDouble(info.Ask);
                string strl = d.ToString("0");
                dziesiatki = strl.Length;
                podzielp   = Convert.ToInt32(Math.Pow(10, strl.Length));

                LogoutResponse logoutResponse = APICommandFactory.ExecuteLogoutCommand(connector);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
 private void TransakcjaStart(string Nazwa, double volume, TRADE_OPERATION_CODE toc)
 {
     try
     {
         SyncAPIConnector     connector        = new SyncAPIConnector(serverData);
         Credentials          credentials      = new Credentials(userId, password, "", "pixelNet");
         LoginResponse        loginResponse    = APICommandFactory.ExecuteLoginCommand(connector, credentials, true);
         SymbolResponse       symbolResponse   = APICommandFactory.ExecuteSymbolCommand(connector, Nazwa);
         double               price            = symbolResponse.Symbol.Ask.GetValueOrDefault();
         double               sl               = 0.0;
         double               tp               = 0.0;
         string               symbol           = symbolResponse.Symbol.Symbol;
         long                 order            = 0;
         long                 expiration       = 0;
         TradeTransInfoRecord ttOpenInfoRecord = new TradeTransInfoRecord(
             toc,
             TRADE_TRANSACTION_TYPE.ORDER_OPEN,
             price, sl, tp, symbol, volume, order, "", expiration);
         TradeTransactionResponse tradeTransactionResponse = APICommandFactory.ExecuteTradeTransactionCommand(connector, ttOpenInfoRecord);
         LogoutResponse           logoutResponse           = APICommandFactory.ExecuteLogoutCommand(connector);
     }
     catch (Exception e) { MessageBox.Show(e.Message); }
 }