commit latest

This commit is contained in:
2025-07-11 09:08:44 -04:00
parent 552aebfc23
commit 56e750c4ee
4 changed files with 66 additions and 34 deletions

View File

@@ -20,45 +20,29 @@ using MarketData.Numerical;
namespace PortfolioManager.Renderers
{
public static class SizeFactor
public class TextPlot
{
public const float Small = 0.09375f;
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
public TextPlot()
{
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];
}
Coordinates Coordinates { get; set; }
SKRect BoundingRect { get; set; }
}
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
{

View File

@@ -0,0 +1,7 @@
namespace PortfolioManager.Renderers
{
public static class FontFactor
{
public const int FontSize = 11;
}
}

View 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];
}
}
}

View 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;
}
}