Example #1
0
        void GetData()
        {
            lblSymbol.Text = Account.Symbol;

            if (_orderMaker.Name == ProviderName.HUA_NAN)
            {
                _orderMaker.RequestAccountPositions(Account.Number, Account.Symbol);
            }
            else
            {
                Account.OI = _orderMaker.GetAccountPositions(Account.Number, Account.Symbol);

                Render();
            }
        }
Example #2
0
        int GetLotsNeedOrder(IPositionInfo positionInfo, AccountSettings accountSettings)
        {
            string symbol  = accountSettings.Symbol;
            string account = accountSettings.Account;

            int currentLots = _orderMaker.GetAccountPositions(account, symbol);

            int correctLots = positionInfo.Position * accountSettings.Lot;

            return(correctLots - currentLots);
        }