示例#1
0
        public static ProjectToRun Clone(ProjectToRun origProject, ProjectTemplateType type)
        {
            ProjectToRun projToRun = new ProjectToRun();

            projToRun.stockSymbols = origProject.stockSymbols;
            projToRun.executionHour = origProject.executionHour;
            projToRun.executionMinute = origProject.executionMinute;
            projToRun.portfolioAmt = origProject.portfolioAmt;
            projToRun.portfolioAllocation = origProject.portfolioAllocation;
            projToRun.noOfPositions = origProject.noOfPositions;
            projToRun.retryInterval = origProject.retryInterval;
            projToRun.minSlippage = origProject.minSlippage;
            projToRun.maxSlippage = origProject.maxSlippage;
            projToRun.ibAccountNumber = origProject.ibAccountNumber;
            projToRun.projIndex = origProject.projIndex;
            projToRun.fastMaPeriod = origProject.fastMaPeriod;
            projToRun.slowMaPeriod = origProject.slowMaPeriod;
            projToRun.ProjectTemplate = type;
            projToRun.OQProjectName = origProject.OQProjectName;
            projToRun.specificSize = origProject.specificSize;
            projToRun.specificPosSide = origProject.specificPosSide;
            projToRun.SolutionWideParameters = origProject.SolutionWideParameters;

            return projToRun;
        }
示例#2
0
 public static ProjectToRun GenerateProject(ProjectTemplateType type)
 {
     ProjectToRun projToRun = new ProjectToRun();
     projToRun.ProjectTemplate = type;
     return projToRun;
 }