public DataSeriesProxyBars(Bars bars, DataSeriesProxyableFromBars dataSeriesBeingExposed)
 {
     base.ScaleInterval          = bars.ScaleInterval;
     this.barsBeingProxied       = bars;
     this.dataSeriesBeingExposed = dataSeriesBeingExposed;
     base.Description            = this.dataSeriesBeingExposed + " for " + this.ToString();
 }
Exemple #2
0
        public int DotsExistsForCurrentSlidingWindow;                   // just because the object itself is the most convenient place to incapsulate it

        public Indicator()
        {
            this.Name = "INDICATOR_NAME_NOT_SET_IN_DERIVED_CONSTRUCTOR";
            this.DataSeriesProxyFor  = DataSeriesProxyableFromBars.Close;
            this.ParametersByName    = new Dictionary <string, IndicatorParameter>();
            this.ChartPanelType      = ChartPanelType.PanelIndicatorSingle;
            this.OwnValuesCalculated = new DataSeriesTimeBased(this.Name);
            this.LineColor           = Color.Indigo;
            this.LineWidth           = 1;
        }
Exemple #3
0
        // bool handlingVolume = indicator.Series.TypeSafeIsProxyFor(this.Executor.Bars, DataSeriesProxyableFromBars.Volume)
        public virtual bool TypeSafeIsProxyFor(Bars bars, DataSeriesProxyableFromBars barField)
        {
            if (this is DataSeriesProxyBars == false)
            {
                return(false);
            }
            DataSeriesProxyBars proxy = this as DataSeriesProxyBars;

            if (proxy.IsProxyFor(bars, barField))
            {
                return(true);
            }
            return(false);
        }
		public DataSeriesProxyBars(Bars bars, DataSeriesProxyableFromBars dataSeriesBeingExposed) {
			base.ScaleInterval = bars.ScaleInterval;
			this.barsBeingProxied = bars;
			this.dataSeriesBeingExposed = dataSeriesBeingExposed;
			base.Description = this.dataSeriesBeingExposed + " for " + this.ToString();
		}
		public bool IsProxyFor(Bars bars, DataSeriesProxyableFromBars dataSeriesProxyableFromBars) {
			return barsBeingProxied == bars && dataSeriesBeingExposed == dataSeriesProxyableFromBars;
		}
		// bool handlingVolume = indicator.Series.TypeSafeIsProxyFor(this.Executor.Bars, DataSeriesProxyableFromBars.Volume)
		public virtual bool TypeSafeIsProxyFor(Bars bars, DataSeriesProxyableFromBars barField) {
			if (this is DataSeriesProxyBars == false) return false;
			DataSeriesProxyBars proxy = this as DataSeriesProxyBars;
			if (proxy.IsProxyFor(bars, barField)) return true;
			return false;
		}
 public bool IsProxyFor(Bars bars, DataSeriesProxyableFromBars dataSeriesProxyableFromBars)
 {
     return(barsBeingProxied == bars && dataSeriesBeingExposed == dataSeriesProxyableFromBars);
 }
		public int DotsExistsForCurrentSlidingWindow;		// just because the object itself is the most convenient place to incapsulate it
		
		public Indicator() {
			this.Name = "INDICATOR_NAME_NOT_SET_IN_DERIVED_CONSTRUCTOR";
			this.DataSeriesProxyFor = DataSeriesProxyableFromBars.Close;
			this.ParametersByName = new Dictionary<string, IndicatorParameter>();
			this.ChartPanelType = ChartPanelType.PanelIndicatorSingle;
			this.OwnValuesCalculated = new DataSeriesTimeBased(this.Name);
			this.LineColor = Color.Indigo;
			this.LineWidth = 1;
		}