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
# 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
}
}