using System.Collections.Generic; namespace PortfolioManager.Renderers { public class OffsetDictionary { public enum OffsetType { VerticalOffset15PC, VerticalOffset10PC, VerticalOffset7PC, VerticalOffset6P5PC, VerticalOffset6PC, VerticalOffset5PC, VerticalOffset3PC, VerticalOffset1PC, HorizontalOffset5PC, HorizontalOffset3PC, HorizontalOffset1PC, MinBollingerDate, MaxBollingerDate, MinBollingerValue, MaxBollingerValue }; private Dictionary offsetDictionary = new Dictionary(); /// /// Gets/Sets the Maximum bollinger date in AODate form /// public double MaxBollingerDate { get; set; } /// /// Gets/Sets the Minumum bollinger date in AODate form /// public double MinBollingerDate { get; set; } /// /// Gets/Sets the Maximum bollinger value /// public double MaxBollingerValue { get; set; } /// /// Gets/Sets the Minimum bollinger value /// public double MinBollingerValue { get; set; } /// /// Gets/Sets the Horizontal Spread (max-min) /// public double HorizontalSpread { get; set; } /// /// Gets/Sets the Vertical Spread (max-min) /// public double VerticalSpread { get; set; } /// /// Add an offset and it's offset type /// /// /// public void Add(OffsetType offsetType, double value) { if (offsetDictionary.ContainsKey(offsetType)) { offsetDictionary[offsetType] = value; } else { offsetDictionary.Add(offsetType, value); } } /// /// Get the offset specified by offsetType /// /// /// public double Offset(OffsetType offsetType) { return offsetDictionary[offsetType]; } } }