diff --git a/IntelliTrader.Web/Views/Home/Dashboard.cshtml b/IntelliTrader.Web/Views/Home/Dashboard.cshtml index ce9e3fe..c3f9982 100644 --- a/IntelliTrader.Web/Views/Home/Dashboard.cshtml +++ b/IntelliTrader.Web/Views/Home/Dashboard.cshtml @@ -27,25 +27,27 @@ - +
-
+
Громкость: 50%
-
+
- Профиль звука: + Профиль:
-
- Настройки звука +
+ + Мин. порог (USDT): +
@@ -59,10 +61,32 @@ const soundVolumeSlider = document.getElementById("soundVolumeSlider"); const soundVolumeValue = document.getElementById("soundVolumeValue"); const soundProfileSelect = document.getElementById("soundProfileSelect"); + const minTradeSizeInput = document.getElementById("minTradeSizeInput"); const notificationContainer = document.getElementById("notificationContainer"); let isSoundEnabled = localStorage.getItem("realtime_sound_enabled") !== "false"; + // Load minimum trade size with fallback to 0 + let minTradeSizeThreshold = parseFloat(localStorage.getItem("realtime_min_trade_size")) || 0; + if (minTradeSizeInput) { + minTradeSizeInput.value = minTradeSizeThreshold; + minTradeSizeInput.addEventListener("input", function() { + let val = parseFloat(minTradeSizeInput.value) || 0; + if (val < 0) val = 0; + minTradeSizeThreshold = val; + localStorage.setItem("realtime_min_trade_size", val); + const event = new CustomEvent("minTradeSizeChanged", { detail: { minTradeSize: val } }); + document.dispatchEvent(event); + }); + + document.addEventListener("minTradeSizeChanged", function(e) { + if (minTradeSizeInput && parseFloat(minTradeSizeInput.value) !== e.detail.minTradeSize) { + minTradeSizeInput.value = e.detail.minTradeSize; + minTradeSizeThreshold = e.detail.minTradeSize; + } + }); + } + // Load volume with fallback to 0.5 let soundVolume = localStorage.getItem("realtime_sound_volume"); if (soundVolume === null) { @@ -332,8 +356,11 @@ knownTrades.add(tradeId); if (!isFirstLoad) { - hasNewTrade = true; - showToastNotification(trade); + const tradeCostUsdt = (parseFloat(trade.Amount) || 0) * (parseFloat(trade.SellPrice) || 0); + if (tradeCostUsdt >= minTradeSizeThreshold) { + hasNewTrade = true; + showToastNotification(trade); + } } } }); diff --git a/IntelliTrader.Web/Views/Home/Settings.cshtml b/IntelliTrader.Web/Views/Home/Settings.cshtml index 88c654d..3f3d66f 100644 --- a/IntelliTrader.Web/Views/Home/Settings.cshtml +++ b/IntelliTrader.Web/Views/Home/Settings.cshtml @@ -39,7 +39,7 @@
-

Оформление

+

Оформление и уведомления

+
+ + + (0 = уведомления для всех сделок) +
diff --git a/magda_agent_system/agent_tasks.json b/magda_agent_system/agent_tasks.json index 7d53bc6..132da7e 100644 --- a/magda_agent_system/agent_tasks.json +++ b/magda_agent_system/agent_tasks.json @@ -446,7 +446,7 @@ }, { "id": "web-dashboard-custom-alerts", - "status": "todo", + "status": "done", "area": "web", "risk": "low", "title": "Add custom notification threshold settings on Dashboard", @@ -473,6 +473,37 @@ "acceptance": [ "Order caching mechanism is integrated and avoids frequent disk reads for historical trade logs." ] + }, + { + "id": "web-dashboard-export-csv-trades", + "status": "todo", + "area": "web", + "risk": "low", + "title": "Add CSV export button for trade logs on Web Dashboard", + "description": "Add an export button on the trades view in the Web Dashboard allowing users to download historical trades in standard CSV format.", + "allowed_paths": [ + "IntelliTrader.Web/Controllers/**", + "IntelliTrader.Web/Views/**", + "magda_agent_system/agent_tasks.json" + ], + "acceptance": [ + "Web Dashboard includes a CSV export action for completed trade records." + ] + }, + { + "id": "trading-signal-filter-enhancement", + "status": "todo", + "area": "trading", + "risk": "low", + "title": "Enhance signal rule evaluators with volume spike filters", + "description": "Add optional volume spike threshold evaluation in signal rules to prevent buy signals on low volume fakeouts.", + "allowed_paths": [ + "IntelliTrader.Rules/Services/**", + "magda_agent_system/agent_tasks.json" + ], + "acceptance": [ + "ConditionEvaluators supports volume condition filtering in signal rules." + ] } ] }