Hey guys,
This isn't really a data entry type of table. It's an indicator of the VIX financial data, populated using the query from the original post: https://www.accessforums.net/showthr...070#post530070.
The fallling and rising query is fixed for the two days under consideration because the VIX historical value won't change. The only way the VIX historical data table will change is if I retrieve more current date values. For example, I now have data up to Jan-8-2025. If I update that, I'll have to recreate the table.
CJ_London, the ID field is calculated, not autonumber. By definition, it's guaranteed to be in monotonically increasing order and sorted by date. This is totally in my control and won't change. Records won't be deleted except by huge mistake, and isn't super important to the end goal of creating a statistical analysis of over 1600 trades. I'm trying to get overview info, not individual date/trade info. That would be a minor glitch.
My goal is to create a histogram of actual stock trading results with the RiskZ values sorted into buckets contained in another table, including whether or not the RiskZ value was falling or rising and what its actual value was.
The query that creates that histogram not including the RiskZ Direction (aka, rising/falling) is:
Code:
SELECT DayTrades.Direction, RiskZThresholds.MaxRiskZ, COUNT(IIF(cTradePL > 0, cTradePL, NULL)) AS NumWinners, ROUND(COUNT(100 * IIF(cTradePL > 0, cTradePL, NULL))/COUNT([DayTrades].cTradePL), 0) AS PctWinners, COUNT(IIF(cTradePL < 0, cTradePL, NULL)) AS NumLosers, ROUND(COUNT(100 * IIF(cTradePL < 0, cTradePL, NULL))/COUNT([DayTrades].cTradePL), 0) AS PctLosers
FROM DayTrades, RiskZ, RiskZThresholds
WHERE DayTrades.TradeDate = RiskZ.BarDate AND RiskZ.RiskZ >= RiskZThresholds.MinRiskZ AND RiskZ.RiskZ < RiskZThresholds.MaxRiskZ
GROUP BY DayTrades.Direction, RiskZThresholds.MaxRiskZ
ORDER BY DayTrades.Direction, RiskZThresholds.MaxRiskZ;
I just want to add the rising and falling criteria to the histogram, but I think adding it to the existing table is the best way to do it.
Thanks,
Eric