ChartTrader properties

The chart trader properties when you right click chart trader, are these accessible via code? I can’t find the support doc.

There are many ChartTrader properties available in code, and yeah they are not really documented. The ChartTrader class is a UserControl and if you get a reference to it you can explore the many options available there (not sure it’s 1:1 with what you see in the properties ui context menu). Which properties are you looking for?

An easy way to get the chart trader reference is to grab it in the DataLoaded state as follows:

		private ChartTrader chartTrader;
        
        protected override void OnStateChange()
		{
			if (State == State.SetDefaults)
			{
				//...
			}
			else if (State == State.Configure)
			{
                //...
			}
			else if (State == State.DataLoaded)
			{
				Dispatcher.Invoke(new Action(() =>
				{
					Chart chartWindow = System.Windows.Window.GetWindow(ChartControl.Parent) as Chart;

					if (chartWindow == null)
						return;

					chartTrader = chartWindow.ChartTrader;
				}));
            }
		}

Some interesting code available here.

1 Like

ok, thanks guys they’re in here:

		chartTrader.Properties.AtmStrategySelectionModeActive

Also, on a related note I always found the naming of these options massively confusing from a user’s POV: