void SetParams()
{
RemoveParamEventHandlers();
cbxSameDirAction.SelectedIndex = (int)Data.Strategy.SameSignalAction;
cbxOppDirAction.SelectedIndex = (int)Data.Strategy.OppSignalAction;
cbxOppDirAction.Enabled = Data.Strategy.Slot[Data.Strategy.CloseSlot].IndicatorName != "Close and Reverse";
rbConstantUnits.Checked = !Data.Strategy.UseAccountPercentEntry;
rbVariableUnits.Checked = Data.Strategy.UseAccountPercentEntry;
nudMaxOpenLots.Value = (decimal)Data.Strategy.MaxOpenLots;
if (!rbVariableUnits.Checked)
nudEntryLots.Value = (decimal)Math.Min(Data.Strategy.EntryLots, Data.Strategy.MaxOpenLots);
else
nudEntryLots.Value = (decimal)Data.Strategy.EntryLots;
nudAddingLots.Value = (decimal)Data.Strategy.AddingLots;
nudReducingLots.Value = (decimal)Data.Strategy.ReducingLots;
chbPermaSL.Checked = Data.Strategy.UsePermanentSL;
nudPermaSL.Value = Data.Strategy.PermanentSL;
nudPermaSL.Enabled = Data.Strategy.UsePermanentSL;
cbxPermaSLType.Enabled = Data.Strategy.UsePermanentSL;
cbxPermaSLType.SelectedIndex = (int)Data.Strategy.PermanentSLType;
chbPermaTP.Checked = Data.Strategy.UsePermanentTP;
nudPermaTP.Value = Data.Strategy.PermanentTP;
nudPermaTP.Enabled = Data.Strategy.UsePermanentTP;
cbxPermaTPType.Enabled = Data.Strategy.UsePermanentTP;
cbxPermaTPType.SelectedIndex = (int)Data.Strategy.PermanentTPType;
SetParamEventHandlers();
SetLabelPercent();
return;
}