예제 #1
0
 public AlgoMetadata(List <TickFileMetadata> tickMetadata, //string r1, string r2,
                     DateTime start, DateTime end, AlgoParams algoParams, bool isForceUpdate,
                     Action <ChartTickPoint> chartDelegate, AddTickChartDelegate dataDelegate, Action <string> logWinDelegate)
 {
     TickMetadata = tickMetadata;
     //R1 = r1;
     //R2 = r2;
     StartTime     = start;
     EndTime       = end;
     ChartDelegate = chartDelegate;
     DataDelegate  = dataDelegate;
     LogDelegate   = logWinDelegate;
     IsForceUpdate = isForceUpdate;
     AlgoParams    = algoParams;
 }
예제 #2
0
        public AlgoParams Clone()
        {
            var Clone = new AlgoParams();

            Clone.I                             = I == null ? null : I.Clone();
            Clone.R1                            = R1;
            Clone.R2                            = R2;
            Clone.IsMock                        = IsMock;
            Clone.IsReplayMode                  = IsReplayMode;
            Clone.IsHedgeAlgo                   = IsHedgeAlgo;
            Clone.ReplayTickFile                = ReplayTickFile;
            Clone.PositionsFile                 = PositionsFile;
            Clone.StateFile                     = StateFile;
            Clone.AlgoId                        = AlgoId;
            Clone.UseProbableTradeValue         = UseProbableTradeValue;
            Clone.IsMarketClosingSquareOff      = IsMarketClosingSquareOff;
            Clone.IsSquareOffTrigger            = IsSquareOffTrigger;
            Clone.IsMinProfitMust               = IsMinProfitMust;
            Clone.PercMarketDirectionChange     = PercMarketDirectionChange;
            Clone.PercSquareOffThreshold        = PercSquareOffThreshold;
            Clone.PercStoploss                  = PercStoploss;
            Clone.PercMinProfit                 = PercMinProfit;
            Clone.AllowShort                    = AllowShort;
            Clone.AllowLong                     = AllowLong;
            Clone.StartOrders                   = StartOrders == null ? null : new List <StockOrder>(StartOrders);
            Clone.StartOrdersCall               = StartOrdersCall == null ? null : new List <StockOrder>(StartOrdersCall);
            Clone.StartOrdersPut                = StartOrdersPut == null ? null : new List <StockOrder>(StartOrdersPut);
            Clone.Broker                        = Broker;
            Clone.MaxTotalPositions             = MaxTotalPositions;
            Clone.MaxLongPositions              = MaxLongPositions;
            Clone.MaxShortPositions             = MaxShortPositions;
            Clone.LongCeilingPrice              = LongCeilingPrice;
            Clone.ShortFloorPrice               = ShortFloorPrice;
            Clone.PercPositionSpacing           = PercPositionSpacing;
            Clone.OptionsIntradayBrokerage      = OptionsIntradayBrokerage;
            Clone.PercBrokerage                 = PercBrokerage;
            Clone.SquareOffBrokerageFactor      = SquareOffBrokerageFactor;
            Clone.MarginFraction                = MarginFraction;
            Clone.PercLossStopForDay            = PercLossStopForDay;
            Clone.NumNettLossTradesStopForDay   = NumNettLossTradesStopForDay;
            Clone.IsLimitLossPerDay             = IsLimitLossPerDay;
            Clone.NumTradesStopForDay           = NumTradesStopForDay;
            Clone.AlgoIntervalInSeconds         = AlgoIntervalInSeconds;
            Clone.IsConsiderPrevClosing         = IsConsiderPrevClosing;
            Clone.AllowInitialTickStabilization = AllowInitialTickStabilization;
            return(Clone);
        }
예제 #3
0
 public AlgoScalper(AlgoParams Params)
     : base(Params)
 {
 }
예제 #4
0
 public AlgoHedge(AlgoParams Params)
     : base(Params)
 {
 }
예제 #5
0
 public AlgoPair(AlgoParams Params)
     : base(Params)
 {
 }
예제 #6
0
 public AlgoMinMax(AlgoParams Params)
     : base(Params)
 {
 }