Add BarChart
This commit is contained in:
@@ -105,8 +105,13 @@ namespace MarketData.Generator.MGSHMomentum
|
||||
MGSHPosition position = activePositions.Where(x => x.Symbol.Equals(symbol) && x.PurchaseDate.Equals(purchaseDate)).FirstOrDefault();
|
||||
if (null == position)
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, String.Format("Cannot locate position for symbol '{0}' purchased on {1}.", symbol, purchaseDate.ToShortDateString()));
|
||||
return false;
|
||||
MGSHPositions hedgePositions = HedgePositions;
|
||||
position = hedgePositions.Where(x => x.Symbol.Equals(symbol) && x.PurchaseDate.Equals(purchaseDate)).FirstOrDefault();
|
||||
if(null == position)
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG, String.Format("Cannot locate position for symbol '{0}' purchased on {1}.", symbol, purchaseDate.ToShortDateString()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!position.PurchaseDate.Equals(purchaseDate)) position.PurchaseDate = purchaseDate;
|
||||
if (!position.TrailingStopLimit.Equals(trailingStop)) position.TrailingStopLimit = trailingStop;
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace MarketData.MarketDataModel
|
||||
// ***************************************************************************************************************************************************************************
|
||||
public class Price
|
||||
{
|
||||
public enum PriceSource{Other=0,BigCharts=1,Yahoo=2,Fidelity=3,Google=4};
|
||||
public enum PriceSource{Other=0,BigCharts=1,Yahoo=2,Fidelity=3,Google=4,BarChart=5};
|
||||
private String symbol;
|
||||
private DateTime date;
|
||||
private double open;
|
||||
@@ -377,6 +377,8 @@ namespace MarketData.MarketDataModel
|
||||
return "Fidelity";
|
||||
case PriceSource.Google :
|
||||
return "Google";
|
||||
case PriceSource.BarChart :
|
||||
return "BarChart";
|
||||
default :
|
||||
return Constants.CONST_QUESTION;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user