Beispiel #1
0
 public StrategyTraderSetting GetDefaultTraderSetting()
 {
     if (defaultTraderSetting != null)
     {
         return(defaultTraderSetting);
     }
     defaultTraderSetting            = new StrategyTraderSetting();
     defaultTraderSetting.InitMoney  = 100000;
     defaultTraderSetting.AutoFilter = false;
     defaultTraderSetting.TradeType  = data.account.AccountTradeType.IMMEDIATELY;
     return(defaultTraderSetting);
 }
Beispiel #2
0
        public IStrategyHelper GetDefaultStrategyHelper()
        {
            if (defaultStrategyHelper != null)
            {
                return(defaultStrategyHelper);
            }
            defaultStrategyHelper = new StrategyHelper();
            //初始化交易器
            StrategyTraderSetting traderSetting = GetDefaultTraderSetting();
            IAccount account = DataCenter.Default.AccountManager.CreateAccount(traderSetting.InitMoney);

            account.AccountSetting.AutoFilter = traderSetting.AutoFilter;
            account.AccountSetting.TradeType  = traderSetting.TradeType;
            StrategyTrader_History trader = new StrategyTrader_History(account);

            defaultStrategyHelper.Trader = trader;
            return(defaultStrategyHelper);
        }
 public StrategyArguments_CodePeriod(ICodePeriod codePeriod, StrategyReferedPeriods referedPeriods, StrategyForwardPeriod forwardPeriod, StrategyTraderSetting traderSetting) : this(codePeriod, referedPeriods, forwardPeriod)
 {
     this.TraderSetting = traderSetting;
 }
Beispiel #4
0
 public StrategyArguments_DataPackage(IDataPackage_Code dataPackage, StrategyReferedPeriods referedPeriods, StrategyForwardPeriod forwardPeriod, StrategyTraderSetting traderSetting) : this(dataPackage, referedPeriods, forwardPeriod)
 {
     this.TraderSetting = traderSetting;
 }