Пример #1
0
 public PipExpectation(CandleCollection collection, int periodCount)
 {
     _periodCount = periodCount;
     _futurPip    = new Dictionary <DateTime, PipWin>();
     _collection  = collection;
     collection.CandleAddedEvent += AddedCandle;
 }
Пример #2
0
 protected AbstractCandleStat(CandleCollection collection, int periodWarmup)
 {
     PeriodWarmup = periodWarmup;
     _collection  = collection;
     isFromConsolidatedCollection = collection is ConsolidatedCandleCollection;
     Period      = isFromConsolidatedCollection ? (collection as ConsolidatedCandleCollection).ConsolidatedPeriod : collection.Period;
     PeriodCount = isFromConsolidatedCollection ? (collection as ConsolidatedCandleCollection).ConsolidatedPeriodCount : collection.PeriodCount;
     _collection.CandleAddedEvent += CandleAdded;
 }
        public ConsolidatedCandleCollection(CandleCollection candleCollection, Period period, int periodCount) : base(candleCollection.Instrument, candleCollection.Period, candleCollection.PeriodCount)
        {
            _collectiontoconsolidate = candleCollection;
            _period      = period;
            _periodCount = periodCount;
            _collectiontoconsolidate.CandleAddedEvent += CandleAdded;

            int seconds = (int)period * periodCount;

            int periodseconds = (int)candleCollection.Period * candleCollection.PeriodCount;

            _consolidationCount = seconds / periodseconds;
        }
Пример #4
0
 public StochasticStats(CandleCollection collection) : base(collection, 20)
 {
     _statistics = new Dictionary <DateTime, Stochastic>();
 }
Пример #5
0
 public PrevisionTradeStrategy(CandleCollection collection, PipExpectation winpip)
 {
     this.collection = collection;
     this.winpip     = winpip;
 }