Esempio n. 1
0
 public String GetInputTemplate()
 {
     STR_Door_Input input = new STR_Door_Input();
     Serializer serializer = new Serializer(typeof(STR_Door_Input));
     String jsonText = serializer.Serialize(input);
     return jsonText;
 }
Esempio n. 2
0
        void InitDefaultInfos(
            STR_Door_Input 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);
        }
Esempio n. 3
0
 public STR_Door(
     STR_Door_Input input,
     String strategyName,
     Account elwAccount,
     Account optionAccount,
     MonitorLimit_Time_And_MarketData monitorLimit)
 {
     InitDefaultInfos(input, strategyName, elwAccount, optionAccount, monitorLimit);
     InitController();
 }