예제 #1
0
 public String GetInputTemplate()
 {
     EDoorInput input = new EDoorInput();
     Serializer serializer = new Serializer(typeof(EDoorInput));
     String jsonText = serializer.Serialize(input);
     return jsonText;
 }
예제 #2
0
 public STR_EDoor(
     EDoorInput input,
     String strategyName,
     Account elwAccount,
     Account optionAccount,
     MonitorLimit_Time_And_MarketData monitorLimit)
 {
     InitDefaultInfos(input, strategyName, elwAccount, optionAccount, monitorLimit);
     InitController();
 }
예제 #3
0
 public EDoorCenterData(EDoorInput input, STR_EDoor parent)
 {
     Init(input, parent);
 }
예제 #4
0
        void Init(EDoorInput input, STR_EDoor parent)
        {
            this.MaxChannelCount = input.ChannelCount;
            this.CurEnterCountType = EnterCountType.Ten;

            this.ElwAccount = parent.ElwAccount;
            this.OptionAccount = parent.OptionAccount;
        }
예제 #5
0
        void InitDefaultInfos(
            EDoorInput input,
            String strategyName,
            Account elwAccount,
            Account optionAccount,
            MonitorLimit_Time_And_MarketData monitorLimit)
        {
            // 1. set member variables
            this.Input = input;
            this._accountNames.Add(elwAccount.AccountName);
            this._accountNames.Add(optionAccount.AccountName);

            this._strategyName = strategyName;
            this.ElwAccount = elwAccount;
            this.OptionAccount = optionAccount;
            this.MonitorLimit = monitorLimit;

            List<Account> accounts = new List<Account>();
            accounts.Add(this.ElwAccount);
            accounts.Add(this.OptionAccount);

            // 2. Set Agent
            this._agent = new Agent(this, accounts);

            // 3. Set Order Limit
            IOrderLimit orderLimitFO = CreateOrderLimit_FO();
            IOrderLimit orderLimitELW = CreateOrderLimit_ELW();

            this.OptionAccount.SetOrderLimit(orderLimitFO);
            this.OptionAccount.SetOrderLimitEmptyRMD(orderLimitFO);

            this.ElwAccount.SetOrderLimit(orderLimitELW);
            this.ElwAccount.SetOrderLimitEmptyRMD(orderLimitELW);

            // 4. Create Center Data.
            this._centerData = new EDoorCenterData(input, this);
        }