Write-Host "=== Deploying SniperEA to MT5 ===" -ForegroundColor Green $sourceFile = "D:\Projects\MT5-EA-Sniper-Strategy\src\SniperEA.ex5" $mt5Dir = "C:\Users\$\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts" if (Test-Path $sourceFile) { Write-Host "✓ Source file found: $sourceFile" -ForegroundColor Green } else { Write-Host "✗ Source file not found: $sourceFile" -ForegroundColor Red Write-Host "Please compile the EA first using test_compile.ps1" -ForegroundColor Yellow exit 1 } if (Test-Path $mt5Dir) { Write-Host "✓ MT5 directory found: $mt5Dir" -ForegroundColor Green } else { Write-Host "✗ MT5 directory not found: $mt5Dir" -ForegroundColor Red exit 1 } $fileName = Split-Path $sourceFile -Leaf $targetPath = Join-Path $mt5Dir $fileName Copy-Item $sourceFile $targetPath -Force -ErrorAction Stop Write-Host "✓ Successfully deployed to: $targetPath" -ForegroundColor Green # Verify deployment if (Test-Path $targetPath) { $sourceSize = (Get-Item $sourceFile).Length $targetSize = (Get-Item $targetPath).Length if ($sourceSize -eq $targetSize) { Write-Host "✓ Deployment verified - file sizes match" -ForegroundColor Green } else { Write-Host "⚠ Warning: File sizes don't match" -ForegroundColor Yellow } } else { Write-Host "✗ Deployment verification failed" -ForegroundColor Red exit 1 } Write-Host "=== Deployment Complete ===" -ForegroundColor Green Write-Host "The EA is now available in MetaTrader 5 Expert Advisors list" -ForegroundColor Cyan