I have a quantitySelector in the toolbar as a button.
It works fine and I can get the value of it in my indicator.
What I can't do is change the colour to highlight that say I have gone for more than 1 contract.
Its not a deal breaker I am just mystified as to why I can't change properties?
What am I missing ?
Here is the code I am using to set the control
quantitySelector = new NinjaTrader.Gui.Tools.QuantityUpDown();
quantitySelector.VerticalAlignment = VerticalAlignment.Center;
quantitySelector.Padding = new System.Windows.Thickness(3,0,3,1);
quantitySelector.Margin = new System.Windows.Thickness(0);
quantitySelector.BorderThickness = new Thickness(2,2,2,2);
chartWindow.MainMenu.Add(quantitySelector);
quantitySelector.Value = 1;/// sets minimum so value is not zero
quantitySelector.Background = Brushes.Blue;//works but can't get background to change in value_changed event
private void QuantitySelector_ValueChanged(object sender, RoutedEventArgs e)
{
ChartControl.Dispatcher.InvokeAsync((Action)(() =>
{
myQuantity = quantitySelector.Value;
ForceRefresh();
if(myQuantity > 1)
// NinjaTrader.Gui.Tools.QuantitySelector.BackgroundProperty. = Brushes.Red;
quantitySelector.BorderThickness = new Thickness(3,3,3,3);
quantitySelector.BorderBrush= Brushes.Red;
//quantitySelector.Background = Brushes.Red;
}));
}

Comment