사는 시점 현재 갖고 있는 데이터 Count
This commit is contained in:
@@ -97,11 +97,17 @@ namespace Million.HunterSubForm
|
||||
// 보유한 종목 수 계산
|
||||
foreach (var item in _analysisDatas)
|
||||
{
|
||||
/**
|
||||
* 사는 시점에 갖고 있는 Count 수로 정정
|
||||
*/
|
||||
|
||||
var count = _analysisDatas.Count(t => t.StartDate <= item.StartDate && t.EndDate >= item.StartDate && t != item);
|
||||
|
||||
// Ts <= Os <= Te
|
||||
// Ts <= Oe <= Te
|
||||
var count = _analysisDatas.Count(target => (target.StartDate <= item.StartDate && target.EndDate >= item.StartDate) ||
|
||||
(target.StartDate <= item.EndDate && target.EndDate >= item.EndDate)
|
||||
);
|
||||
//var count = _analysisDatas.Count(target => (target.StartDate <= item.StartDate && target.EndDate >= item.StartDate) ||
|
||||
//(target.StartDate <= item.EndDate && target.EndDate >= item.EndDate)
|
||||
//);
|
||||
|
||||
item.PurchasedCount = count;
|
||||
evaeragePurchasedCount += count;
|
||||
|
||||
Reference in New Issue
Block a user