Loss Cut 함수 추가
This commit is contained in:
@@ -324,6 +324,7 @@ namespace Million_Prototype
|
||||
|
||||
result = new SearchResult();
|
||||
result.BuyList.CandleDataLists_Im.Add(buy);
|
||||
result.CodeFullName = result.BuyList.ConGoodsData.CodeFullName;
|
||||
sellData = sellList.FirstOrDefault(t => t.DateTime > buy.DateTime);
|
||||
}
|
||||
}
|
||||
@@ -407,25 +408,23 @@ namespace Million_Prototype
|
||||
result.SellData = sellData;
|
||||
errorResultList.Add(result);
|
||||
}
|
||||
}
|
||||
|
||||
double total = 0;
|
||||
foreach (var item in resultList)
|
||||
{
|
||||
Console.WriteLine(item.TotalEarningRate);
|
||||
total += item.TotalEarningRate;
|
||||
}
|
||||
Console.WriteLine("Total 수익률 : " + total/resultList.Count);
|
||||
Console.WriteLine("Win : " + win);
|
||||
Console.WriteLine("Lose : " + lose);
|
||||
Console.WriteLine("승률 : " + win * 100 / (win + lose));
|
||||
sellList.ToString();
|
||||
|
||||
|
||||
ExportManager.CreateResultOfExcel(@"ExcelFile.xlsx", resultList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
double total = 0;
|
||||
foreach (var item in resultList)
|
||||
{
|
||||
Console.WriteLine(item.CodeFullName);
|
||||
Console.WriteLine(item.TotalEarningRate);
|
||||
total += item.TotalEarningRate;
|
||||
}
|
||||
|
||||
Console.WriteLine("Total 수익률 : " + total / resultList.Count);
|
||||
Console.WriteLine("Win : " + win);
|
||||
Console.WriteLine("Lose : " + lose);
|
||||
Console.WriteLine("승률 : " + win * 100 / (win + lose));
|
||||
resultList.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ namespace Million.Manager
|
||||
//result 돌면 서 데이터 처리
|
||||
var fieldList = new List<string>();
|
||||
|
||||
fieldList
|
||||
|
||||
|
||||
// Insert the text into the SharedStringTablePart.
|
||||
int index = InsertSharedStringItem(text, shareStringPart);
|
||||
int index = InsertSharedStringItem("", shareStringPart);
|
||||
|
||||
// Insert a new worksheet.
|
||||
WorksheetPart worksheetPart = InsertWorksheet(spreadSheet.WorkbookPart);
|
||||
|
||||
@@ -50,5 +50,15 @@ namespace Million.Manager
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<CandleData> GetSellLogicLossCut(List<CandleData> candleDataM, int lossFactor, double buyValue)
|
||||
{
|
||||
var lossVal = buyValue * ((100 - lossFactor) / 100);
|
||||
var list = candleDataM.Where(t => t.EndValue < lossVal).ToList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.SellLogicFlag["LossCut"] = true;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user