Make current price work with date offsets

This commit is contained in:
2026-03-11 21:49:04 -07:00
parent d5df9d1014
commit 8df645aac5
4 changed files with 19 additions and 10 deletions
+2 -2
View File
@@ -39,8 +39,8 @@ namespace Controllers.PythonInterop {
}
}
public float GetCurrentPrice(string StockSymbol) {
(bool, string) Success = PyProcess.RunPythonProcess(_PyPath, _ExecPath + "/currentprice.py", returns: true, PyArgs: StockSymbol);
public float GetCurrentPrice(string StockSymbol, int DataEndDaysAgo = 0) {
(bool, string) Success = PyProcess.RunPythonProcess(_PyPath, _ExecPath + "/currentprice.py", returns: true, PyArgs: $"{StockSymbol} {DataEndDaysAgo}");
if (!Success.Item1) {
return 0;
} else {