Pre-cleanup baseline snapshot
Some checks failed
Build and Test / build (push) Has been cancelled

This commit is contained in:
2026-04-05 16:50:18 -04:00
parent d856f3949d
commit 9a28a49292
12 changed files with 695 additions and 30 deletions

View File

@@ -173,7 +173,7 @@ else {
}
if (-not $SkipVerification) {
Write-Step "6/6" "Verifying deployment"
Write-Step "6/7" "Verifying deployment"
$ok = $true
if (-not (Test-Path "$nt8Custom\NT8.Core.dll")) {
@@ -195,13 +195,43 @@ if (-not $SkipVerification) {
Write-Success "Deployment verification passed"
}
else {
Write-Step "6/6" "Skipping verification"
Write-Step "6/7" "Skipping verification"
}
# Step 7: Delete the compiled NinjaScript assembly so NT8 is forced to do a
# full recompile from source on next startup. Without this, NT8 may load a
# stale cached assembly and silently ignore updated .cs files.
Write-Step "7/7" "Invalidating NinjaScript compiled assembly"
$compiledDll = Join-Path $nt8Custom "NinjaTrader.Custom.dll"
$compiledPdb = Join-Path $nt8Custom "NinjaTrader.Custom.pdb"
$compiledXml = Join-Path $nt8Custom "NinjaTrader.Custom.xml"
$invalidated = 0
foreach ($artifact in @($compiledDll, $compiledPdb)) {
if (Test-Path $artifact) {
Remove-Item $artifact -Force
Write-Success ("Deleted {0}" -f (Split-Path $artifact -Leaf))
$invalidated++
}
}
if ($invalidated -gt 0) {
Write-Host " NT8 will perform a full recompile on next startup." -ForegroundColor Green
Write-Host " The .xml file is documentation only and was left in place." -ForegroundColor Gray
} else {
Write-Warn "No compiled assembly found to delete (NT8 may not have been run yet)"
}
$duration = (Get-Date) - $startTime
Write-Header "Deployment Complete"
Write-Host ("Duration: {0:F1} seconds" -f $duration.TotalSeconds)
Write-Host "Next: Open NinjaTrader 8 -> NinjaScript Editor -> Compile All"
Write-Host ""
Write-Host "NEXT STEPS:" -ForegroundColor Cyan
Write-Host " 1. Start NinjaTrader 8 (full recompile will happen automatically)" -ForegroundColor White
Write-Host " 2. Wait for compilation to complete in the Output window" -ForegroundColor White
Write-Host " 3. Remove and re-add the strategy to the chart" -ForegroundColor White
Write-Host " 4. Verify defaults: BreakevenTriggerTicks=20 RunnerTrailTicks=20 MaxContracts=3" -ForegroundColor White
Write-Host " 5. Confirm NT8 Output shows: StartBehavior=AdoptAccountPosition EntriesPerDirection=2" -ForegroundColor White
exit 0

View File

@@ -147,10 +147,32 @@ echo.
echo Deployment complete.
echo Backup location: %BACKUP_DIR%
echo Manifest file : %MANIFEST_FILE%
echo.
echo Next steps:
echo 1. Open NinjaTrader 8.
echo 2. Open NinjaScript Editor and press F5 (Compile).
echo 3. Verify strategies appear in the Strategies list.
echo Invalidating NinjaScript compiled assembly...
set "COMPILED_DLL=%NT8_CUSTOM%\NinjaTrader.Custom.dll"
set "COMPILED_PDB=%NT8_CUSTOM%\NinjaTrader.Custom.pdb"
if exist "%COMPILED_DLL%" (
del /F /Q "%COMPILED_DLL%"
echo [OK] Deleted NinjaTrader.Custom.dll
) else (
echo [WARN] NinjaTrader.Custom.dll not found - NT8 may not have been run yet
)
if exist "%COMPILED_PDB%" (
del /F /Q "%COMPILED_PDB%"
echo [OK] Deleted NinjaTrader.Custom.pdb
)
echo.
echo ============================================================
echo NEXT STEPS:
echo 1. Start NinjaTrader 8 (full recompile happens automatically)
echo 2. Wait for compilation to finish in the Output window
echo 3. Remove and re-add the strategy to the chart
echo 4. Verify defaults: BreakevenTriggerTicks=20 RunnerTrailTicks=20 MaxContracts=3
echo 5. NT8 Output must show: StartBehavior=AdoptAccountPosition EntriesPerDirection=2
echo ============================================================
exit /b 0