commit latest
This commit is contained in:
@@ -20,45 +20,29 @@ using MarketData.Numerical;
|
|||||||
|
|
||||||
namespace PortfolioManager.Renderers
|
namespace PortfolioManager.Renderers
|
||||||
{
|
{
|
||||||
public static class SizeFactor
|
public class TextPlot
|
||||||
{
|
{
|
||||||
public const float Small = 0.09375f;
|
public TextPlot()
|
||||||
public const float Normal = 0.125f;
|
|
||||||
public const float Large = 0.15625f;
|
|
||||||
}
|
|
||||||
public static class FontFactor
|
|
||||||
{
|
|
||||||
public const int FontSize = 11;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class OffsetDictionary
|
|
||||||
{
|
|
||||||
public enum OffsetType
|
|
||||||
{
|
{
|
||||||
VerticalOffset15PC, VerticalOffset10PC, VerticalOffset7PC, VerticalOffset6P5PC, VerticalOffset6PC, VerticalOffset5PC, VerticalOffset3PC, VerticalOffset1PC, HorizontalOffset5PC, HorizontalOffset3PC, HorizontalOffset1PC,
|
|
||||||
MinBollingerDate, MaxBollingerDate, MinBollingerValue, MaxBollingerValue
|
|
||||||
};
|
|
||||||
|
|
||||||
private Dictionary<OffsetType, double> offsetDictionary = new Dictionary<OffsetType, double>();
|
|
||||||
|
|
||||||
public void Add(OffsetType offsetType, double value)
|
|
||||||
{
|
|
||||||
if (offsetDictionary.ContainsKey(offsetType))
|
|
||||||
{
|
|
||||||
offsetDictionary[offsetType] = value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
offsetDictionary.Add(offsetType, value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Coordinates Coordinates { get; set; }
|
||||||
public double Offset(OffsetType offsetType)
|
SKRect BoundingRect { get; set; }
|
||||||
{
|
|
||||||
return offsetDictionary[offsetType];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class TextPlots : List<TextPlot>
|
||||||
|
{
|
||||||
|
public TextPlots()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// xp, yp = point
|
||||||
|
// for rect in rectangles:
|
||||||
|
// x1, y1, x2, y2 = rect
|
||||||
|
// if x1 < xp < x2 and y1 < yp < y2:
|
||||||
|
// return True
|
||||||
|
// return False
|
||||||
|
|
||||||
|
|
||||||
public class BollingerBandRenderer : ModelBase
|
public class BollingerBandRenderer : ModelBase
|
||||||
{
|
{
|
||||||
|
|||||||
7
PortfolioManager/Renderers/FontFactor.cs
Normal file
7
PortfolioManager/Renderers/FontFactor.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace PortfolioManager.Renderers
|
||||||
|
{
|
||||||
|
public static class FontFactor
|
||||||
|
{
|
||||||
|
public const int FontSize = 11;
|
||||||
|
}
|
||||||
|
}
|
||||||
32
PortfolioManager/Renderers/OffsetDictionary.cs
Normal file
32
PortfolioManager/Renderers/OffsetDictionary.cs
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
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<OffsetType, double> offsetDictionary = new Dictionary<OffsetType, double>();
|
||||||
|
|
||||||
|
public void Add(OffsetType offsetType, double value)
|
||||||
|
{
|
||||||
|
if (offsetDictionary.ContainsKey(offsetType))
|
||||||
|
{
|
||||||
|
offsetDictionary[offsetType] = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
offsetDictionary.Add(offsetType, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Offset(OffsetType offsetType)
|
||||||
|
{
|
||||||
|
return offsetDictionary[offsetType];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
PortfolioManager/Renderers/SizeFactor.cs
Normal file
9
PortfolioManager/Renderers/SizeFactor.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
namespace PortfolioManager.Renderers
|
||||||
|
{
|
||||||
|
public static class SizeFactor
|
||||||
|
{
|
||||||
|
public const float Small = 0.09375f;
|
||||||
|
public const float Normal = 0.125f;
|
||||||
|
public const float Large = 0.15625f;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user