Loading the outcomes before "ready" was not enough: on a fresh database the
strategy rows did not exist yet, so the load did nothing and CI run 220
failed the same way on PostgreSQL. The new TradingService.PrepareAsync
creates accounts and strategies, then loads the outcomes; the host runs it
before it is ready and logs a failure without blocking the interface.
StartAsync repeats it, which changes nothing.
The demo tests deleted the demo folder while the server still held its
SQLite file, which Windows refuses at random. They now stop the server
first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An independent review found these, now fixed and tested:
- Risk limits could be raised through PUT /api/settings without the
phrase and the password. The API now refuses risk keys.
- The reference equity counted results twice after reduced to real and
after a demotion. Each ledger now keeps a baseline, and carried results
stay in the ledger's currency until the reference is computed.
- An instrument could be bought by a second strategy in the same account
(SPEC 8.6), and purchases under way did not hold their cash, so several
purchases sent together could exceed it. Both are refused or shrunk now.
- After an automatic trip of the switch there was no way to restart from
the interface. Rischio now shows the trip of both worlds and the restart.
- The fresh password of SPEC 12.4 could be tried without limit. Five wrong
attempts in 15 minutes now lock it.
- Observation to simulation skipped the 90 days of live signals.
- A new build changed the qualification of a strategy with real money,
"Ferma tutto" counted as a critical incident, raising risk ignored
demotion conditions in progress, and weekends counted as stock sessions.
- The 12.4 confirmation now summarises capital, first purchases and limits,
and live strategies show the gap with their simulated twin.
The backtest converts each bar with the rate fixed before it opens, the
day before, and the report now counts how often correctives and risk
changed a decision. crypto_trend is still not passed: the broad universe
now falls 32.8%. The outcome file also keeps the qualified parameters.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three screens follow mockups 03, 04 and 07.
Operazioni shows the balance of the closed trades, filters, a CSV export,
and for each trade why it was bought and sold. The reasons come from the
decision codes through fixed Italian templates.
Strategie shows the four stages towards real money, a card per strategy
with its requirements, the procedure of SPEC 12.4, and why each strategy in
observation waits. A strategy that failed its backtest cannot be moved into
the simulation.
Rischio shows the emergency switch, the automatic blocks, the use of each
limit, the fall from the peak, the scenarios and the risk events. Stop,
close and restart now go through the risk engine. A restart is refused
while the STOP file exists.
Impostazioni gains the limits, the day-trade guard and the scenarios.
Lowering a limit is always allowed. Raising a limit or the entrusted capital
while a strategy uses real money needs the phrase and the password.
The demo now holds the decisions behind its trades, the 58 days of
simulation and the indices of its curves, so it matches the mockups.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>