Add warning for PurchaseDate not on Business Day.
This commit is contained in:
@@ -55,7 +55,7 @@ namespace TradeBlotter.UIUtils
|
||||
{
|
||||
SellDate=position.SellDate;
|
||||
}
|
||||
// SellPrice=position.TrailingStopLimit;
|
||||
SellPrice=position.CurrentPrice;
|
||||
txtSymbol.Text=Symbol;
|
||||
dpPurchaseDate.SelectedDate=PurchaseDate;
|
||||
dpSellDate.SelectedDate=SellDate;
|
||||
@@ -174,6 +174,11 @@ namespace TradeBlotter.UIUtils
|
||||
SetMessage("Market closed on Sell Date.");
|
||||
return false;
|
||||
}
|
||||
if(!dateGenerator.IsMarketOpen(PurchaseDate))
|
||||
{
|
||||
SetMessage("Market closed on Purchase Date.");
|
||||
return false;
|
||||
}
|
||||
if(double.IsNaN(SellPrice))
|
||||
{
|
||||
SetMessage("Invalid Sell Price.");
|
||||
|
||||
Reference in New Issue
Block a user