protected ContextScript() : base() { PositionSize = new PositionSize(PositionSizeMode.SharesConstantEachTrade, 1); ParameterValuesById = new Dictionary<int, double>(); IsCurrent = false; ChartAutoSubmitting = false; BacktestOnRestart = true; BacktestOnSelectorsChange = true; ReporterShortNamesUserInvokedJSONcheck = new List<string>(); ReportersSnapshots = new Dictionary<string, object>(); ApplyCommission = false; EnableSlippage = false; LimitOrderSlippage = false; RoundEquityLots = false; RoundEquityLotsToUpperHundred = false; SlippageTicks = 1; SlippageUnits = 1.0; }
public void AbsorbFrom(ContextScript found, bool absorbParams = false) { if (found == null) return; //KEEP_CLONE_UNDEFINED this.Name = found.Name; // this.Symbol = found.Symbol; // this.DataSourceName = found.DataSourceName; // this.ScaleInterval = found.ScaleInterval.Clone(); // this.DataRange = found.DataRange.Clone(); // this.ChartStreaming = found.ChartStreaming; // this.ShowRangeBar = found.ShowRangeBar; base.AbsorbFrom(found); this.PositionSize = found.PositionSize.Clone(); if (absorbParams) this.ParameterValuesById = new Dictionary<int, double>(found.ParameterValuesById); //this.ChartBarSpacing = found.ChartBarSpacing; this.ChartAutoSubmitting = found.ChartAutoSubmitting; this.BacktestOnRestart = found.BacktestOnRestart; this.BacktestOnSelectorsChange = found.BacktestOnSelectorsChange; this.ReporterShortNamesUserInvokedJSONcheck = new List<string>(found.ReporterShortNamesUserInvokedJSONcheck); }
public PositionSizeEventArgs(PositionSize positionSize) { this.PositionSize = positionSize.Clone(); }