public static IOrderLimit CreateOrderLimit(Account account, long maxNotional) { IOrderLimit orderLimit = new DefaultOrderLimit(account); orderLimit = new CountBidAskRangeOrderLimit(orderLimit); orderLimit = new PriceBidAskRangeOrderLimit(orderLimit); orderLimit = new CountPerOnceOrderLimit(maxNotional, orderLimit); orderLimit = new LimOrderLimit(orderLimit); return orderLimit; }
public static IOrderLimit CreateOrderLimit(Account account, long maxNotional) { IOrderLimit orderLimit = new DefaultOrderLimit(account); orderLimit = new CountBidAskRangeOrderLimit(orderLimit); orderLimit = new PriceBidAskRangeOrderLimit(orderLimit); orderLimit = new ValuePerOnceOrderLimit(maxNotional * CommonConst._100_000_000, orderLimit); long futureMaxCount = maxNotional; // 1000억 이상 투자할일은 없다고 본다. if (futureMaxCount > 1000) { String ex = "선물 최대 수량이 이상하다."; logger.Error(ex.ToString()); Util.KillWithNotice(ex.ToString()); } orderLimit = new CountPerOnceOrderLimit(futureMaxCount, orderLimit); orderLimit = new LimOrderLimit(orderLimit); return orderLimit; }