https://ninjatrader.com/support/foru...read-only-mode
It is not clear to me hot to accomplish setting an opacity value to a background color.
I am using to UI Properties to obtain the brush color and the opacity value.
Brush: hTFBullishTrendBackgroundColor
Opacity as an integer: hTFBullishBackgroundOpacity
if (Closes[1][0] > Closes[1][1]) { Brush hTFBullishTrendBackgroundColorCopy = hTFBullishTrendBackgroundColor; hTFBullishTrendBackgroundColorCopy.Opacity = hTFBullishBackgroundOpacity/100d; hTFBullishTrendBackgroundColorCopy.Freeze(); BackBrush = hTFBullishTrendBackgroundColorCopy; }
I don't want to use SolidColorBrush to define the brush and transparency value as I am getting this information from the user.
What I am missing? When I ran this code I get the following error:
Error on calling 'OnBarUpdate' method on bar 95: Cannot set a property on object '#FF3E3D42' because it is in a read-only state.
Comment