public Performance(ChartShadow chart): this() {
			this.Initialize(chart, null);
		}
예제 #2
0
		public virtual void Initialize(ChartShadow chart, object reportersOwnDataSnapshotInOut) {
			this.Chart = chart;
		}
예제 #3
0
		public Reporter(ChartShadow chart) : this() {
			this.Initialize(chart, null);
		}
		public void Initialize(ChartShadow chartShadow,
		                       Strategy strategy, OrderProcessor orderProcessor, IStatusReporter statusReporter) {

			string msg = " at this time, FOR SURE this.Bars==null, strategy.Script?=null";
			this.ChartShadow = chartShadow;
			this.Strategy = strategy;
			this.OrderProcessor = orderProcessor;
			this.StatusReporter = statusReporter;

			if (this.Strategy != null) {
				if (this.Bars != null) {
					this.Strategy.ScriptContextCurrent.Symbol = this.Bars.Symbol;
					this.Strategy.ScriptContextCurrent.DataSourceName = this.DataSource.Name;
				}
				if (this.Strategy.Script == null) {
					msg = "I will be compiling this.Strategy.Script when in ChartFormsManager.StrategyCompileActivatePopulateSliders()";
					//} else if (this.Bars == null) {
					//	msg = "InitializeStrategyAfterDeserialization will Script.Initialize(this) later with bars";
				} else {
					this.Strategy.Script.Initialize(this);
				}
			}
			this.ExecutionDataSnapshot.Initialize();
			// Executor.Bars are NULL in ScriptExecutor.ctor() and NOT NULL in SetBars
			//this.Performance.Initialize();
			this.MarketSimStreaming.Initialize();
		}
		protected ScriptExecutor(ChartShadow chartShadow, Strategy strategy, 
		                         OrderProcessor orderProcessor, IStatusReporter statusReporter) : this() {
			this.Initialize(chartShadow, strategy, orderProcessor, statusReporter);
		}
예제 #6
0
		public override void Initialize(ChartShadow chart, object reportersOwnDataSnapshotInOut) {
			base.Initialize(chart, reportersOwnDataSnapshotInOut);
			PositionsDataSnapshot snapCasted = reportersOwnDataSnapshotInOut as PositionsDataSnapshot;
			if (snapCasted == null) {
				string msg = "INVOKER_MUST_HAVE_CALLED_MY_CREATE_SNAPSHOT_AND_REGISTERED_IT_IN_SCRIPT_CONTEXT invokerAssumed=ReportersFormManager.ReporterActivateShowRegisterMniTick()<FindOrCreateReportersSnapshot()";
				Assembler.PopupException(msg);
				Debugger.Break();
				return;	// this.snap already initialized in ctor();
			}
			this.snap = snapCasted;
			// this.olvPositions is empty, so excessive RebuildColumns() doens't harm
			this.propagatePositionsDataSnapshotToCtxMenuItemsAndHideColumns();
			this.objectListViewCustomize();
		}