Beispiel #1
0
 public StrategyAdditionalParameter AdditionalParameter(AdditionalParametersEnum parameter)
 {
     switch (parameter)
     {
         case AdditionalParametersEnum.TV:
             {
                 return (from item in additional where (item.Name == "Time Value") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.Commission:
             {
                 return (from item in additional where (item.Name == "Commission") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.Multiplier:
             {
                 return (from item in additional where (item.Name == "Multiplier") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.ContractSize:
             {
                 return (from item in additional where (item.Name == "Contract Size") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.PointValue:
             {
                 return (from item in additional where (item.Name == "Point Value") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.ZIM:
             {
                 return (from item in additional where (item.Name == "ZIM") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.MinTick:
             {
                 return (from item in additional where (item.Name == "Tick Size") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.Step1:
             {
                 return (from item in additional where (item.Name == "Stop Level") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.Step2:
             {
                 return (from item in additional where (item.Name == "Reversal Level") select item).ElementAt(0);
             }
         default:
             {
                 throw new ArgumentException("Unknown AdditionalParameter in EmaForMarket");
             }
     }
 }
Beispiel #2
0
 public StrategyAdditionalParameter AdditionalParameter(AdditionalParametersEnum parameter)
 {
     switch (parameter)
     {
         case AdditionalParametersEnum.MaxPositionsPerDirection:
             {
                 return (from item in additional where (item.Name == "MaxPositionsPerDirection") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.MAChange:
             {
                 return (from item in additional where (item.Name == "MAChange") select item).ElementAt(0);
             }
         case AdditionalParametersEnum.TradeLife:
             {
                 return (from item in additional where (item.Name == "TradeLife") select item).ElementAt(0);
             }
         default:
             {
                 throw new ArgumentException("Unknown AdditionalParameter in EmaForMarket");
             }
     }
 }