here is the current sum, account is not part of the query, but both now need to be added
Code: Select all
SELECT Int(([NinjaTrader2024].[Time])) AS Tradedate, NinjaTrader2024.Instrument, Sum(NinjaTrader2024.Profit) AS [Daily P_L], Sum(Abs([Quantity])) AS [#Trades], Sum([commission]+[fees]) AS [Com&Fee]
FROM NinjaTrader2024
WHERE (((Day([NinjaTrader2024].[Time]))=Day(Now())) AND ((Month([NinjaTrader2024].[Time]))=Month(Now())))
GROUP BY Int(([NinjaTrader2024].[Time])), NinjaTrader2024.Instrument, Year([NinjaTrader2024].[Time]), NinjaTrader2024.Account_display_name
HAVING (((Year([NinjaTrader2024].[Time]))=Year(Now())));