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