/// <summary> /// Sets the parameters. /// </summary> private void SetIndicatorParams() { _protections = 0; _parameters = 0; CountParameters(); CountPermanentProtections(); CreateControls(); CreateProtectionParameters(); for (int prot = 0; prot < _protections; prot++) { SetParametersValues(prot); } int param = _protections; for (int slot = 0; slot < Data.Strategy.Slots; slot++) { for (int numParam = 0; numParam < 6; numParam++) { if (!Data.Strategy.Slot[slot].IndParam.NumParam[numParam].Enabled) { continue; } AParameter[param] = new Parameter(OptimizerParameterType.Indicator, slot, numParam); SetParametersValues(param); param++; } } int totalHeight = ArrangeControls(); if (_parameters == 0) { PnlParams.Height = 50; LblNoParams.Visible = true; } else { PnlParams.Height = totalHeight; } BtnOptimize.Focus(); }
/// <summary> /// Check Box checked changed /// </summary> private void OptimizerCheckedChanged(object sender, EventArgs e) { BtnOptimize.Focus(); }