Using StreamWriter to write to a text file
Sometimes you may want to store information related to certain market conditions or trades outside of NinjaTrader. The formatting of the text file can also make for easy importing into Microsoft Excel in the future.
Key concepts in this example
- Creating a text file with StreamWriter
- Writing Open-High-Low-Close data with date stamps to the file
Important related documentation
Import instructions
- Download the file contained in this Help Guide topic to your PC desktop
- From the Control Center window, select the menu Tools > Import > NinjaScript
- Select the downloaded file

