Example #1
0
        protected override void OnStartUp()
        {
            base.OnStartUp();

            //Init our indicator to get code access
            this._popgun_indicator = new PopGun_Indicator();
            this._popgun_indicator.SetData(this.PopGunExpires, this.IsSnapshotActive, this.IsEvaluationActive);
        }
Example #2
0
        protected override void OnStart()
        {
            base.OnStart();

            //Init our indicator to get code access
            this._popgun_indicator = new PopGun_Indicator();
            this._popgun_indicator.SetData(this.PopGunExpires, this.IsSnapshotActive, this.IsEvaluationActive, this._filter_NoTriggerEOD);
            this._popgun_indicator.SetTimeFrame(this.TimeFrame);
        }
        /// <summary>
        /// PopGun Bar Pattern
        /// </summary>
        public PopGun_Indicator PopGun_Indicator(IDataSeries input, System.Int32 popGunExpires, System.Boolean isSnapshotActive, System.Boolean isEvaluationActive)
        {
            var indicator = CachedCalculationUnits.GetCachedIndicator <PopGun_Indicator>(input, i => i.PopGunExpires == popGunExpires && i.IsSnapshotActive == isSnapshotActive && i.IsEvaluationActive == isEvaluationActive);

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

            indicator = new PopGun_Indicator
            {
                BarsRequired        = BarsRequired,
                CalculateOnBarClose = CalculateOnBarClose,
                Input              = input,
                PopGunExpires      = popGunExpires,
                IsSnapshotActive   = isSnapshotActive,
                IsEvaluationActive = isEvaluationActive
            };
            indicator.SetUp();

            CachedCalculationUnits.AddIndicator2Cache(indicator);

            return(indicator);
        }