Сначала я создаю стратегию и указываю обьем в ней:
_strategy = new Strategy
{
Volume = MySecurities.SelectedSecurity.MinLotSize * (decimal)Properties.Settings.Default.Volume,
Security = MySecurities.SelectedSecurity,
Portfolio = Portfolios.SelectedPortfolio,
Trader = _trader,
CancelOrdersWhenStopping = true,
DisposeOnStop = true
};
Метод, выставляющий заявку:
private void MakeOrder(OrderDirections direction)
{
var price = direction == OrderDirections.Buy ? Security.GetMarketDepth().BestBid.Price : Security.GetMarketDepth().BestAsk.Price;
var order = new Order
{
Price = price,
Portfolio = Portfolio,
Volume = Volume,
Direction = direction
};
var _strategy = new MarketQuotingStrategy(order, Security.MinStepSize, Security.MinStepSize);
ChildStrategies.Add(_strategy);
}
Но транзакция содержит обьем, равный 1.
Про синхронность выставления заявок я задумался совсем недавно, так как, робот время от времени очень быстро выставляет и снимает заявки, а QUIK не успевает реагировать и лепит что попало. Знаю, что синхронный режим не желателен, так что буду искать другие способы решения проблемы.