Feature request: toggle on/off displaying of the indicator names

For some reason, there’s no easy way to toggle display of names/labels of indicators on the chart. Please consider adding it.

Right now I have to resort to a script to add name override to all of the indicators which feels very 1990 :rofl:

# CONFIGURATION
$targetDir     = "C:\Path\To\NinjaScripts"     # <--- Set this
$logFile       = "C:\Path\To\insertion_log.txt"
$dryRun        = $false                        # $true = no changes; just preview
$recursive     = $true                         # Set to $false to disable subfolder scanning

$backupRoot    = "C:\Path\To\Backups"          # <--- Set backup storage directory
$timestamp     = Get-Date -Format "yyyyMMdd_HHmmss"
$zipName       = "NinjaScript_Backup_$timestamp.zip"
$zipPath       = Join-Path $backupRoot $zipName

$methodToInsert = @'
        public override string DisplayName
        {
          get { return ""; }
        }

'@

# Ensure backup path exists
if (-not (Test-Path $backupRoot)) {
    New-Item -ItemType Directory -Path $backupRoot | Out-Null
}

# Create ZIP backup
"Creating ZIP backup: $zipPath"
Compress-Archive -Path $targetDir -DestinationPath $zipPath -Force
"Backup complete.`n" | Out-File $logFile

# Start log
"--- Log started: $(Get-Date) ---" | Out-File $logFile -Append

# File search settings
$searchParams = @{ Path = $targetDir; Filter = "*.cs" }
if ($recursive) { $searchParams['Recurse'] = $true }

# Process files
Get-ChildItem @searchParams | Where-Object {
    $_.Name -notlike '@*' -and $_.PSIsContainer -eq $false
} | ForEach-Object {
    $file = $_.FullName
    $content = Get-Content $file
    $joinedContent = $content -join "`n"

    # Skip if already inserted
    if ($joinedContent -match "public override string DisplayName") {
        "SKIPPED (already inserted): $file" | Out-File $logFile -Append
        return
    }

    $newContent = @()
    $inserted = $false

    for ($i = 0; $i -lt $content.Count; $i++) {
        $line = $content[$i]
        if (-not $inserted -and $line.Trim() -match '^protected override void OnStateChange\s*\(\s*\)') {
            $newContent += $methodToInsert
            $inserted = $true
        }
        $newContent += $line
    }

    if ($inserted) {
        if ($dryRun) {
            "DRY-RUN (would insert): $file" | Out-File $logFile -Append
        } else {
            Copy-Item $file "$file.bak"
            $newContent | Set-Content $file
            "INSERTED: $file" | Out-File $logFile -Append
        }
    } else {
        "NO MATCH FOUND: $file" | Out-File $logFile -Append
    }
}
1 Like


You can just leave the Label blank. This will prevent the name to display on the chart.

2 Likes

It’s tedious to do that every time one adds/removes an indicator. Also, if you erase the label - you have to type it back in if you need it again.

The latest version of NT8 finally got the search field - so we have some progress towards 21st century which makes me optimistic.

Re: tedious to do every time - Save indicator Template with no Label as Default, then when add new instance of indi, it will have no Label

Hope this helps

3 Likes

Something I noticed after removing the labels: I can no longer see when the indicator is (calculating…)

FWIW I don’t think the two are likely related insofar as I’ve been removing labels in this manner forever and have always been able to see ‘(Calculating….)’ so I’d look elsewhere
Simple test of course, load indicator with and without Label different charts same instrument side-by-side
Good luck!

Label Remover. Just add it to your chart and it’ll remove all labels.

https://nexusfi.com/local_links.php?linkid=2457

Thanks. AFAIK you have to pay to download from that forum (plus I don’t install third party dll files on my system).

Anyway, I think I figured out how to program a toggle using shared variables and name override:

https://forum.ninjatrader.com/forum/historical-beta-archive/version-8-beta/86475-how-to-avoid-file-errors-using-streamwriter-on-multiple-instrument-backtest#post733956

The file I linked to isn’t a DLL, it’s an indicator. And only the files in the “elite” section require a paid membership to download.

Unless NinjaTrader implements this (maybe in another ten years), this is probably the best solution.

1 Like

Honestly, I don’t know why they make it so hard to deal with indicators.

The fact you cannot:

A) Hide all indicators
B) Easily hide individual indicators

Is hard to understand. I’m sure they can do it.

Right Click > Indicators > Find indicator > scroll down > uncheck Visible > Click Apply.

Repeat for every indicator if you want to hide them all. The names on the top of the chart wouldn’t be an issue if you could click on them to hide the indicator.

A while back I subscribed to that forum to download some indicator only to find out it was for paid members only. I felt like it was a beit-and-switch (maybe I did not read the fine print) and I deleted my account soon after. TL;DR I’m not going back to that forum. :grinning_face:

easiest way, delete the label and save it as default