Initial Commit
This commit is contained in:
98
MarketData/MarketDataLib/MarketDataModel/MovingAverage.cs
Executable file
98
MarketData/MarketDataLib/MarketDataModel/MovingAverage.cs
Executable file
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MarketData.MarketDataModel
|
||||
{
|
||||
public class MovingAverages : List<MovingAverageElement>
|
||||
{
|
||||
private DateTime fromDate;
|
||||
private DateTime thruDate;
|
||||
|
||||
public MovingAverages()
|
||||
{
|
||||
}
|
||||
public MovingAverages(List<MovingAverageElement> list)
|
||||
{
|
||||
foreach(MovingAverageElement element in list)Add(element);
|
||||
}
|
||||
public DateTime FromDate
|
||||
{
|
||||
get { return fromDate; }
|
||||
set { fromDate = value; }
|
||||
}
|
||||
public DateTime ThruDate
|
||||
{
|
||||
get { return thruDate; }
|
||||
set { thruDate = value; }
|
||||
}
|
||||
}
|
||||
public class MovingAverageElement
|
||||
{
|
||||
private String symbol;
|
||||
private DateTime date;
|
||||
private double close;
|
||||
private double high;
|
||||
private double low;
|
||||
private double ma200;
|
||||
private double ma100;
|
||||
private double ma55;
|
||||
private double ma21;
|
||||
private double ma5;
|
||||
|
||||
public MovingAverageElement()
|
||||
{
|
||||
}
|
||||
public String Symbol
|
||||
{
|
||||
get { return symbol; }
|
||||
set { symbol = value; }
|
||||
}
|
||||
public DateTime Date
|
||||
{
|
||||
get { return date; }
|
||||
set { date = value; }
|
||||
}
|
||||
public double Close
|
||||
{
|
||||
get { return close; }
|
||||
set { close = value; }
|
||||
}
|
||||
public double High
|
||||
{
|
||||
get { return high; }
|
||||
set { high = value; }
|
||||
}
|
||||
public double Low
|
||||
{
|
||||
get { return low; }
|
||||
set { low = value; }
|
||||
}
|
||||
public double MA200
|
||||
{
|
||||
get{return ma200;}
|
||||
set{ma200=value;}
|
||||
}
|
||||
public double MA100
|
||||
{
|
||||
get { return ma100; }
|
||||
set { ma100 = value; }
|
||||
}
|
||||
public double MA55
|
||||
{
|
||||
get { return ma55; }
|
||||
set { ma55 = value; }
|
||||
}
|
||||
public double MA21
|
||||
{
|
||||
get { return ma21; }
|
||||
set { ma21 = value; }
|
||||
}
|
||||
public double MA5
|
||||
{
|
||||
get { return ma5; }
|
||||
set { ma5 = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user