22 using System.Collections.Generic;
31 private const decimal _defaultLeverage = 3;
32 private const decimal _defaultFutureLeverage = 25;
124 var quantityIsValid =
true;
129 quantityIsValid &= IsOrderSizeLargeEnough(limitOrder.LimitPrice);
130 price = limitOrder.LimitPrice;
142 quantityIsValid &= IsOrderSizeLargeEnough(price);
151 price = stopLimitOrder.LimitPrice;
152 quantityIsValid &= IsOrderSizeLargeEnough(stopLimitOrder.LimitPrice);
153 if (!quantityIsValid)
159 quantityIsValid &= IsOrderSizeLargeEnough(stopLimitOrder.StopPrice);
160 price = stopLimitOrder.StopPrice;
174 quantityIsValid &= IsOrderSizeLargeEnough(stopMarketOrder.StopPrice);
175 price = stopMarketOrder.StopPrice;
184 if (!quantityIsValid)
199 return base.CanSubmitOrder(security, order, out message);
201 bool IsOrderSizeLargeEnough(decimal price) =>
213 return map.ToReadOnlyDictionary();