Two powershell scripts attached. Create a "tools" folder in 'bin/custom' and add these.
In visual studio project properties, add these lines to the post-build event:
Powershell -ExecutionPolicy bypass -File "$(ProjectDir)\tools\Copy-Ninja-Temp.ps1" "$(ProjectDir)\MyProjects" "$(ProjectDir)\Indicator" Powershell -ExecutionPolicy bypass -File "$(ProjectDir)\tools\Send-Keys.ps1" "Indicator - CompileMe" "{F5}"
Keep an empty blank new indicator open in the NinjaScript editor called "CompileMe"
Every time a build succeeds Visual Studio will run the post-build scripts.
What the above post-build lines do, is recursively goes through all the files in $ProjectDir/MyProjects and copies all files to the indicator folder, with the file renamed to something like __temp_project1_codefile.cs.
Then it sends an F5 keypress to the window with the title "Indicator - CompileMe" which is the Ninjascript editor - this will build and install everything in Ninjatrader.
the next time you run it all the __temp files are cleared from the Indicators directory and copied over again.
[update] looks like the Ninjascript editor needs to not be minimised for the Send-Keys operation to work.
Comment