docs: enhance benchmark command with business logic validation tests

- Add 2 ETH-based validation tests to benchmark script
- Validates ExecuteBacktest_With_ETH_FifteenMinutes_Data_Should_Return_LightBacktest
- Validates ExecuteBacktest_With_ETH_FifteenMinutes_Data_Second_File_Should_Return_LightBacktest
- Ensures performance optimizations don't break trading logic
- Update command documentation with comprehensive validation details
- All 3 validation levels must pass for benchmark success
This commit is contained in:
2025-11-11 12:32:56 +07:00
parent 578709d9b7
commit fc036bb7de
4 changed files with 65 additions and 33 deletions

View File

@@ -428,16 +428,7 @@ public class TradingBotBase : ITradingBot
}
// Check if we already have a position for this signal (in case it was added but not processed yet)
// Optimized: Avoid LINQ FirstOrDefault overhead
Position existingPosition = null;
foreach (var pos in Positions.Values)
{
if (pos.SignalIdentifier == signal.Identifier)
{
existingPosition = pos;
break;
}
}
var existingPosition = Positions.Values.FirstOrDefault(p => p.SignalIdentifier == signal.Identifier);
if (existingPosition != null)
{