Monthly Processing and enhancement of buy/sell display
Some checks failed
Build .NET Project / build (push) Has been cancelled

This commit is contained in:
2025-12-01 11:46:19 -05:00
parent 4f3bcd10e2
commit 182a2f8bf2
8 changed files with 162 additions and 49 deletions

View File

@@ -446,8 +446,13 @@ namespace MarketData.Generator.CMMomentum
// ***************************************************************************************************************************************************
// **************************************************************** S E L L P O S I T I O N S *****************************************************
// ***************************************************************************************************************************************************
// These make the monthly process a bit easier to read
private void DisplaySales(Positions positions,DateTime tradeDate)
/// <summary>
/// This makes for easier reading of the sales
/// </summary>
/// <param name="positions"></param>
/// <param name="tradeDate"></param>
private static void DisplaySales(Positions positions,DateTime tradeDate)
{
MDTrace.WriteLine(LogLevel.DEBUG,"********* S E L L S *********");
foreach (Position position in positions)
@@ -456,12 +461,17 @@ namespace MarketData.Generator.CMMomentum
}
}
private void DisplayPurchases(Positions positions, DateTime tradeDate)
/// <summary>
/// This makes for easier reading of the purchases
/// </summary>
/// <param name="positions"></param>
/// <param name="tradeDate"></param>
private static void DisplayPurchases(Positions positions, DateTime tradeDate)
{
MDTrace.WriteLine(LogLevel.DEBUG,"********* B U Y S *********");
foreach (Position position in positions)
{
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("Buy {0} {1} @ {2} on {3}",position.Symbol,Utility.FormatNumber(position.Shares,3),Utility.FormatCurrency(position.PurchasePrice,2),TradeDate.ToShortDateString()));
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("Buy {0} {1} @ {2} on {3}",position.Symbol,Utility.FormatNumber(position.Shares,3),Utility.FormatCurrency(position.PurchasePrice,2),tradeDate.ToShortDateString()));
}
}