public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { PropertyDescriptorCollection propertyDescriptorCollection = base.GetPropertiesSupported(context) ? base.GetProperties(context, value, attributes) : TypeDescriptor.GetProperties(value, attributes); Pivots thisPivotsInstance = (Pivots)value; HLCCalculationMode selectedHLCCalculationMode = thisPivotsInstance.PriorDayHlc; if (selectedHLCCalculationMode == HLCCalculationMode.UserDefinedValues) { return(propertyDescriptorCollection); } PropertyDescriptorCollection adjusted = new PropertyDescriptorCollection(null); foreach (PropertyDescriptor thisDescriptor in propertyDescriptorCollection) { if (thisDescriptor.Name == "UserDefinedClose" || thisDescriptor.Name == "UserDefinedHigh" || thisDescriptor.Name == "UserDefinedLow") { adjusted.Add(new PropertyDescriptorExtended(thisDescriptor, o => value, null, new Attribute[] { new BrowsableAttribute(false), })); } else { adjusted.Add(thisDescriptor); } } return(adjusted); }
public Pivots Pivots(ISeries <double> input, PivotRange pivotRangeType, HLCCalculationMode priorDayHlc, double userDefinedClose, double userDefinedHigh, double userDefinedLow, int width) { if (cachePivots != null) { for (int idx = 0; idx < cachePivots.Length; idx++) { if (cachePivots[idx] != null && cachePivots[idx].PivotRangeType == pivotRangeType && cachePivots[idx].PriorDayHlc == priorDayHlc && cachePivots[idx].UserDefinedClose == userDefinedClose && cachePivots[idx].UserDefinedHigh == userDefinedHigh && cachePivots[idx].UserDefinedLow == userDefinedLow && cachePivots[idx].Width == width && cachePivots[idx].EqualsInput(input)) { return(cachePivots[idx]); } } } return(CacheIndicator <Pivots>(new Pivots() { PivotRangeType = pivotRangeType, PriorDayHlc = priorDayHlc, UserDefinedClose = userDefinedClose, UserDefinedHigh = userDefinedHigh, UserDefinedLow = userDefinedLow, Width = width }, input, ref cachePivots)); }
public Indicators.Pivots Pivots(ISeries <double> input, PivotRange pivotRangeType, HLCCalculationMode priorDayHlc, double userDefinedClose, double userDefinedHigh, double userDefinedLow, int width) { return(indicator.Pivots(input, pivotRangeType, priorDayHlc, userDefinedClose, userDefinedHigh, userDefinedLow, width)); }
public Pivots Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHlc, double userDefinedClose, double userDefinedHigh, double userDefinedLow, int width) { return(Pivots(Input, pivotRangeType, priorDayHlc, userDefinedClose, userDefinedHigh, userDefinedLow, width)); }
public Indicators.FibonacciPivots FibonacciPivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHlc, double userDefinedClose, double userDefinedHigh, double userDefinedLow, int width) { return(indicator.FibonacciPivots(Input, pivotRangeType, priorDayHlc, userDefinedClose, userDefinedHigh, userDefinedLow, width)); }