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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user