Exemplo n.º 1
0
        protected override void OnStart()
        {
            base.OnStart();

            //Init our indicator to get code access
            this._orb_indicator = new ORB_Indicator();
            this._orb_indicator.SetData(this.Instrument);

            //Initalize Indicator parameters
            _orb_indicator.ORBMinutes            = this.ORBMinutes;
            _orb_indicator.Time_OpenRangeStartDE = this.Time_OpenRangeStartDE;
            _orb_indicator.Time_OpenRangeStartUS = this.Time_OpenRangeStartUS;
            _orb_indicator.Time_EndOfDay_DE      = this.Time_EndOfDay_DE;
            _orb_indicator.Time_EndOfDay_US      = this.Time_EndOfDay_US;
        }
Exemplo n.º 2
0
        /// <summary>
        /// ORB Indicator
        /// </summary>
        public ORB_Indicator ORB_Indicator(IDataSeries input)
        {
            var indicator = CachedCalculationUnits.GetCachedIndicator <ORB_Indicator>(input);

            if (indicator != null)
            {
                return(indicator);
            }

            indicator = new ORB_Indicator
            {
                BarsRequired        = BarsRequired,
                CalculateOnBarClose = CalculateOnBarClose,
                Input = input
            };
            indicator.SetUp();

            CachedCalculationUnits.AddIndicator2Cache(indicator);

            return(indicator);
        }
Exemplo n.º 3
0
        protected override void OnStart()
        {
            base.OnStart();

            //Print("OnStartUp" + Bars[0].Timestamp);

            //Init our indicator to get code access
            this._orb_indicator = new ORB_Indicator();
            this._orb_indicator.SetData(this.Instrument);

            //Initalize Indicator parameters
            _orb_indicator.ORBMinutes            = this.ORBMinutes;
            _orb_indicator.Time_OpenRangeStartDE = this.Time_OpenRangeStartDE;
            _orb_indicator.Time_OpenRangeStartUS = this.Time_OpenRangeStartUS;
            _orb_indicator.Time_EndOfDay_DE      = this.Time_EndOfDay_DE;
            _orb_indicator.Time_EndOfDay_US      = this.Time_EndOfDay_US;

            //Initalize statistic data list if this feature is enabled
            if (this.StatisticBacktesting)
            {
                this._StatisticContainer = new StatisticContainer();
            }
        }