|
Montréal
Experience: None
Broker: IB
Trading: ES
Posts: 43 since Jun 2009
Thanks Given: 34
Thanks Received: 77
|
Tested & working on my side
## Possible fix for the Mini Data Box transparency in 8
Inside `ChartControl.xaml`, there is a resource named:
`ChartControl.DataBoxBackground`
In the Dark skin, it is defined as:
```xml
<SolidColorBrush
x:Key="ChartControl.DataBoxBackground"
Color="Black"
po:Freeze="true"
Opacity="0.759"/>
```
That means the background is deliberately set to approximately **75.9% opacity**, rather than being completely opaque.
Changing `Opacity="0.759"` to `Opacity="1"` should make any background using this resource fully opaque.
**Important:** I haven't yet confirmed that the Mini Data Box uses this exact resource. So this is an experimental fix, not a verified solution.
### A safe way to test it
Rather than modifying NinjaTrader's original skin files, we can create a custom skin based on **NinjaTrader Dark** and change just this one property.
The original theme remains untouched.
Close NinjaTrader 8 before running the following PowerShell script:
```powershell
$skins = "$HOME\Documents\NinjaTrader 8\templates\Skins"
$source = Join-Path $skins "NinjaTrader Dark"
$dest = Join-Path $skins "NinjaTrader Dark Opaque"
if (!(Test-Path $source)) {
throw "Original skin not found."
}
if (Test-Path $dest) {
throw "Test skin already exists. No changes made."
}
$sourceFile = Join-Path $source "ChartControl.xaml"
$pattern = '(<SolidColorBrush[^\r\n]*x:Key="ChartControl\.DataBoxBackground"[^\r\n]*Opacity=")[^"]+(")'
$original = [IO.File]::ReadAllText($sourceFile)
if ([regex]::Matches($original, $pattern).Count -ne 1) {
throw "Expected DataBox resource not found exactly once."
}
# Copy the complete original skin
Copy-Item -LiteralPath $source -Destination $dest -Recurse
$file = Join-Path $dest "ChartControl.xaml"
# Change only the DataBox background opacity
$updated = [regex]::Replace(
$original,
$pattern,
'${1}1${2}'
)
[IO.File]::WriteAllText(
$file,
$updated,
[System.Text.UTF8Encoding]::new($true)
)
# Verify the result
Select-String -Path $file -Pattern 'ChartControl.DataBoxBackground'
Write-Host "Custom opaque skin created successfully."
```
### How to activate it
1. Start NinjaTrader 8.
2. Open **Tools → Options → General → Skin**.
3. Select **NinjaTrader Dark Opaque**.
4. Restart NinjaTrader if required.
5. Open a chart with multiple colored indicator plots and test the Mini Data Box using the middle mouse button.
### What this script actually does
- Creates a complete copy of the existing NinjaTrader Dark theme.
- Changes only the `ChartControl.DataBoxBackground` opacity to `1` (fully opaque).
- Preserves all other colors, styles and settings.
- Does not modify the original NinjaTrader Dark files.
- Does not modify NinjaTrader assemblies or NinjaScript code.
The search and replacement are deliberately limited to the identified XAML resource.
### How to undo the change
Simply switch back to the original **NinjaTrader Dark** skin and restart the platform.
The experimental `NinjaTrader Dark Opaque` folder can then be deleted if desired.
### If it doesn't work
There are two possibilities:
1. The Mini Data Box uses a different resource or another transparency mechanism.
2. The transparency is applied internally by the WPF control rather than by the skin's background brush.
In that case, the next step would be to inspect the Mini Data Box's WPF visual tree and identify the actual element responsible for drawing its background.
That could potentially be modified by a small NinjaScript AddOn, although the feasibility and compatibility would need to be confirmed.
For now, the skin modification is the simplest and least invasive experiment.
NinjaTrader officially documents the procedure for creating custom skins here:
https://static.ninjatrader.com/support/helpGuides/nt8/creating_your_own_skin.htm
... 
|