Add Bollinger Bands Volatility Protection indicator support

- Introduced BollingerBandsVolatilityProtection indicator in GeneticService with configuration settings for period and standard deviation (stdev).
- Updated ScenarioHelpers to handle creation and validation of the new indicator type.
- Enhanced CustomScenario, backtest, and scenario pages to include BollingerBandsVolatilityProtection in indicator lists and parameter mappings.
- Modified API and types to reflect the addition of the new indicator in relevant enums and mappings.
- Updated frontend components to support new parameters and visualization for Bollinger Bands.
This commit is contained in:
2025-11-25 02:12:57 +07:00
parent 3ec1da531a
commit 6376e13b07
21 changed files with 618 additions and 220 deletions

View File

@@ -666,6 +666,16 @@ public class BacktestController : BaseController
}
}
// Normalize SignalType for all indicators based on their IndicatorType
// This ensures the correct SignalType is saved regardless of what the frontend sent
if (request.UniversalConfig.Scenario?.Indicators != null)
{
foreach (var indicator in request.UniversalConfig.Scenario.Indicators)
{
indicator.SignalType = ScenarioHelpers.GetSignalType(indicator.Type);
}
}
// Create the bundle backtest request
var bundleRequest = new BundleBacktestRequest
{