예제 #1
0
파일: OrderSettings.cs 프로젝트: w1r2p1/TRx
 public OrderSettings(StrategyHeader strategyHeader, int timeToLiveSeconds)
 {
     this.Id         = strategyHeader.Id;
     this.TimeToLive = timeToLiveSeconds;
     this.Strategy   = strategyHeader;
     this.StrategyId = strategyHeader.Id;
 }
예제 #2
0
 public Correlation(StrategyHeader strategyHeader, DateTime date, double value)
 {
     this.Strategy   = strategyHeader;
     this.StrategyId = this.Strategy.Id;
     this.DateTime   = date;
     this.Value      = value;
 }
예제 #3
0
 public PositionSettings(StrategyHeader strategyHeader, PositionType type)
 {
     this.Id           = strategyHeader.Id;
     this.Strategy     = strategyHeader;
     this.StrategyId   = strategyHeader.Id;
     this.PositionType = type;
 }
예제 #4
0
 public StrategyVolumeChangeStep(StrategyHeader strategyHeader, double amount)
 {
     this.Strategy   = strategyHeader;
     this.StrategyId = strategyHeader.Id;
     this.Amount     = amount;
     this.Id         = strategyHeader.Id;
 }
예제 #5
0
 public PointsSettings(StrategyHeader strategyHeader, double points, bool trail)
 {
     this.Id         = strategyHeader.Id;
     this.Strategy   = strategyHeader;
     this.StrategyId = strategyHeader.Id;
     this.Points     = points;
     this.Trail      = trail;
 }
예제 #6
0
파일: SMASettings.cs 프로젝트: w1r2p1/TRx
 public SMASettings(StrategyHeader strategyHeader, int periodFast, int periodSlow)
 {
     this.Id         = SerialIntegerFactory.Make();
     this.Strategy   = strategyHeader;
     this.StrategyId = strategyHeader.Id;
     this.PeriodFast = periodFast;
     this.PeriodSlow = periodSlow;
 }
예제 #7
0
 public StrategyPosition(StrategyHeader strategyHeader)
     : this()
 {
     this.Id         = strategyHeader.Id;
     this.StrategyId = strategyHeader.Id;
     this.Strategy   = strategyHeader;
     this.amount     = 0;
     this.sum        = 0;
 }
예제 #8
0
 /// <summary>
 /// NoTest
 /// </summary>
 /// <param name="strategyHeader">strategyHeader</param>
 /// <param name="symbol">symbol</param>
 /// <param name="interval">Длительность бара</param>
 /// <param name="period">Количество баров</param>
 /// <param name="barType">Тип бара</param>
 public BarSettings(StrategyHeader strategyHeader, string symbol, int interval, int period, DataModelType barType)
 {
     this.Id         = SerialIntegerFactory.Make();
     this.Symbol     = symbol;
     this.Interval   = interval;
     this.Period     = period;
     this.StrategyId = strategyHeader.Id;
     this.Strategy   = strategyHeader;
     this.BarType    = barType;
 }
예제 #9
0
파일: Signal.cs 프로젝트: w1r2p1/TRx
 //public Signal(StrategyHeader strategyHeader, DateTime date, TradeAction action, OrderType type, double price, double stop, double limit, long? barId = null, Bar bar = null)
 public Signal(StrategyHeader strategyHeader, DateTime date, TradeAction action, OrderType type, double price, double stop, double limit, long barDateId, Bar bar)
 {
     this.Id          = SerialIntegerFactory.Make();
     this.StrategyId  = strategyHeader.Id;
     this.Strategy    = strategyHeader;
     this.DateTime    = date;
     this.TradeAction = action;
     this.OrderType   = type;
     this.Amount      = strategyHeader.Amount;
     this.Price       = price;
     this.Stop        = stop;
     this.Limit       = limit;
     this.BarDateId   = barDateId;
     this.Bar         = bar;
 }
예제 #10
0
 public PositionSettings(StrategyHeader strategyHeader)
     : this(strategyHeader, PositionType.Any)
 {
 }
예제 #11
0
 public StopPointsSettings(StrategyHeader strategyHeader, double points, bool trail)
     : base(strategyHeader, points, trail)
 {
 }
예제 #12
0
        ///// <summary>
        /////
        ///// </summary>
        ///// <param name="strategyHeader"></param>
        ///// <param name="symbol"></param>
        ///// <param name="interval">длительность бара</param>
        ///// <param name="period">количество баров</param>
        //public BarSettings(Strategy strategyHeader, string symbol, int interval, int period)
        //{
        //    this.Id = SerialIntegerFactory.Make();
        //    this.Symbol = symbol;
        //    this.Interval = interval;
        //    this.Period = period;
        //    this.StrategyId = strategyHeader.Id;
        //    this.Strategy = strategyHeader;
        //    this.BarSettings = DataModelType.TimeBar;
        //}

        /// <summary>
        /// BarSettings
        /// </summary>
        /// <param name="strategyHeader">strategyHeader</param>
        /// <param name="symbol">symbol</param>
        /// <param name="interval">Длительность бара</param>
        /// <param name="period">Количество баров</param>
        /// <param name="barType">Тип бара</param>
        public BarSettings(StrategyHeader strategyHeader, string symbol, int interval, int period)
            : this(strategyHeader, symbol, interval, period, DataModelType.TimeBar)
        {
        }
예제 #13
0
 public TakeProfitOrderSettings(StrategyHeader strategyHeader, int timeToLiveSeconds) :
     base(strategyHeader, timeToLiveSeconds)
 {
 }
예제 #14
0
 public StopLossOrderSettings(StrategyHeader strategyHeader, int timeToLiveSeconds) :
     base(strategyHeader, timeToLiveSeconds)
 {
 }