Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e184132
Basic setup (trader and test project)
YurritAvonds Jul 24, 2025
868a9e7
Separated Logger
YurritAvonds Jul 25, 2025
e69234f
Separated buyer and seller
YurritAvonds Jul 25, 2025
4918407
Logger namespace and NullLogger
YurritAvonds Jul 25, 2025
27340d5
Various minor corrections
YurritAvonds Jul 25, 2025
87ff13a
Logging cleanup
YurritAvonds Jul 27, 2025
ee28561
Simple daily buy strategy
YurritAvonds Jul 27, 2025
b2da2b4
DateCalculator
YurritAvonds Jul 27, 2025
4fe3ba9
Skip holding with 0 amount while selling
YurritAvonds Jul 27, 2025
b22eb27
Corrected date index calculation
YurritAvonds Jul 27, 2025
31dee64
Turned off logger for fork PR
YurritAvonds Jul 27, 2025
bcd3b94
Reverted accidentally committed gitignore changes
YurritAvonds Jul 27, 2025
822d5c0
First attempt at optimizing
YurritAvonds Jul 28, 2025
1be2cb0
Moved most logging into buyer and seller for debug purposes
YurritAvonds Aug 9, 2025
d811214
Launchsettings
YurritAvonds Aug 9, 2025
71beb5e
Basic seller refactoring
YurritAvonds Aug 9, 2025
4d24214
Basic buyer refactoring and improved linq query to reduce amount of r…
YurritAvonds Aug 9, 2025
3ac3957
HTMLLogger + added erase functionality for Log
YurritAvonds Aug 11, 2025
c4dcda9
Skip holdings without amount + logging cleanup
YurritAvonds Aug 11, 2025
ed2179e
Error checking for failed date and price calculation
YurritAvonds Aug 29, 2025
04f85ac
Stylesheet for logging
YurritAvonds Aug 31, 2025
e518a2b
Removed the use of indexes as the index of a day differs per listing.
YurritAvonds Aug 31, 2025
bfc85a3
Fixed ranking Linq
YurritAvonds Sep 2, 2025
7b8c090
Experimented with further Linq optimization
YurritAvonds Sep 2, 2025
98e9dd0
CSS headers
YurritAvonds Sep 3, 2025
7cd13cc
Fixed Linq for sorting listings.
YurritAvonds Sep 3, 2025
2e99f5a
Updated gitignore changes to make sure it does not show up in the pul…
YurritAvonds Sep 3, 2025
7c6401e
Restored gitignore from base repo
YurritAvonds Sep 3, 2025
29c2902
Removed lines added since original fork from gitignore
YurritAvonds Sep 3, 2025
37ae887
Shortened unnecessarily long NullLogger file
YurritAvonds Sep 3, 2025
e974484
Renamed TextLogger class to match file name
YurritAvonds Sep 3, 2025
5f30992
Actually put something in the ITradeHandler
YurritAvonds Sep 3, 2025
3e504b4
Merge branch 'master' into master
YurritAvonds Sep 5, 2025
7b374ed
Merged main repo changes into fork
YurritAvonds Sep 5, 2025
819cab9
Merge branch 'master' of https://github.com/YurritAvonds/NasdaqTradeS…
YurritAvonds Sep 5, 2025
d5f71c3
Fixed merge issues
YurritAvonds Sep 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,3 @@ $RECYCLE.BIN/
.DS_Store

_NCrunch*
/Bots/AleixBot/.vs
/Bots/ExampleTraderBot/.vs/ExampleTraderBot
/Source/.vs
/Build/NasdaqTrader.Bot.Core.dll
/Build/NasdaqTrader.CLI.dll
/Build/NasdaqTrader.CLI.exe
/Build/NasdaqTraderSystem.Core.dll
/Build/NasdaqTraderSystem.Html.dll
/Bots/AleixBot.Tests/AleixBot.Tests.csproj
/Bots/AleixBot.Tests/ListingPickerTests.cs
/Bots/AleixBot/Properties/launchSettings.json
2 changes: 1 addition & 1 deletion Bots/YurritBot/BuyCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class BuyCalculator(int maximumBuyAmountPerStock)
{
public int MaximumBuyAmountPerStock { get; private set; } = maximumBuyAmountPerStock;
private int maximumBuyAmountPerStock = maximumBuyAmountPerStock;

public int CalculateMaximuumBuyAmount(decimal currentCash, decimal listingPrice)
{
Expand Down
54 changes: 0 additions & 54 deletions Bots/YurritBot/Buyer.cs

This file was deleted.

16 changes: 0 additions & 16 deletions Bots/YurritBot/ITrader.cs

This file was deleted.

15 changes: 0 additions & 15 deletions Bots/YurritBot/Logging/FileLogger.cs

This file was deleted.

41 changes: 41 additions & 0 deletions Bots/YurritBot/Logging/HtmlLogger.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using static System.Net.Mime.MediaTypeNames;

namespace YurritBot.Logging;

public class HtmlLogger(string logFilePath) : ILogger
{
private readonly string logFilePath = logFilePath;

public void Log(string text)
{
File.AppendAllText(logFilePath, $"<p>{text}</p>{Environment.NewLine}");
}

public void LogTransaction(string category, string ticker, decimal currentCash, decimal pricePoint, int amount)
{
Log($"<p>{category} | €{currentCash:F2} | {ticker} {amount} @ {pricePoint:F2}</p>");
}

public void LogHeader1(string text)
{
Log($"<h1>{text}</h1>");
}

public void LogHeader2(string text)
{
Log($"<h2>{text}</h2>");
}

public void Erase()
{
File.Delete(logFilePath);
}

public void Initialize()
{
File.AppendAllText(logFilePath, $"<head>{Environment.NewLine}");
File.AppendAllText(logFilePath, $"<link rel=\"stylesheet\" href=\"./Bots/Logging/style.css\">{Environment.NewLine}");
File.AppendAllText(logFilePath, $"</head>{Environment.NewLine}");
File.AppendAllText(logFilePath, $"</body>{Environment.NewLine}");
}
}
5 changes: 5 additions & 0 deletions Bots/YurritBot/Logging/ILogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
public interface ILogger
{
void Log(string text);
void LogHeader1(string text);
void LogHeader2(string text);
void LogTransaction(string category, string ticker, decimal currentCash, decimal pricePoint, int amount);

void Initialize();
void Erase();
}
15 changes: 6 additions & 9 deletions Bots/YurritBot/Logging/NullLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

public class NullLogger : ILogger
{
public void Log(string text)
{

}

public void LogTransaction(string category, string ticker, decimal currentCash, decimal pricePoint, int amount)
{

}
public void Erase() { }
public void Initialize() { }
public void Log(string text) { }
public void LogHeader1(string text) { }
public void LogHeader2(string text) { }
public void LogTransaction(string category, string ticker, decimal currentCash, decimal pricePoint, int amount) { }
}
40 changes: 40 additions & 0 deletions Bots/YurritBot/Logging/TextLogger.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
namespace YurritBot.Logging;

public class TextLogger(string logFilePath) : ILogger
{
private readonly string logFilePath = logFilePath;

public void Log(string text)
{
File.AppendAllText(logFilePath, $"{text}{Environment.NewLine}");
}

public void LogTransaction(string category, string ticker, decimal currentCash, decimal pricePoint, int amount)
{
Log($"- {category} {currentCash:F2} | {ticker} {amount} @ {pricePoint:F2}");
}

public void LogHeader1(string text)
{
File.AppendAllLines(
logFilePath,
[string.Empty, text, new string('=', text.Length)]);
}

public void LogHeader2(string text)
{
File.AppendAllLines(
logFilePath,
[text, new string('-', text.Length)]);
}

public void Erase()
{
File.Delete(logFilePath);
}

public void Initialize()
{

}
}
26 changes: 26 additions & 0 deletions Bots/YurritBot/Logging/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
body {
font-family: Arial, sans-serif;
background-color: #030303;
color: white;
margin: 0;
padding: 20px;
}

p {
margin: 0 0 2px 0;
}

h1,
h2 {
width: 100%;
}

h1 {
border-bottom: 2px solid white;
margin: 30px 0 5px 0;
}

h2 {
border-bottom: 1px solid white;
margin: 10px 0 5px 0;
}
12 changes: 12 additions & 0 deletions Bots/YurritBot/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"profiles": {
"YurritBot": {
"commandName": "Project"
},
"NasdaqTrader": {
"commandName": "Executable",
"executablePath": "C:\\Dev\\ZomerCompetitie2025\\Build\\NasdaqTrader.CLI.exe",
"commandLineArgs": "-d ../../Data -n 100 -s 1000 -t 2500"
}
}
}
41 changes: 0 additions & 41 deletions Bots/YurritBot/Seller.cs

This file was deleted.

Loading
Loading