I'm trying to learn the basics of NinjaScript from sample scripts, and I'm currently working with the indicator SampleStreamWriter located in the NT8 online help guide at
NinjaScript > Educational Resources > Reference Samples > Indicator > Using StreamWriter
to write price data to a text file.
In my NinjaTrader 8 app I opened a chart using the simulated data feed, and it is correctly logging OHLC bars. I then opened the editor, loaded the SampleStreamWriter indicator, and clicked the Compile button. However, no file was created in my Documents/NinjaTrader 8 folder, which is the folder indicated by the editor intelliprompt when I mouse-over the text "UserDataDir" in the path specification.
So I added the statement
Print(NinjaTrader.Core.Globals.UserDataDir);
but nothing was written to my output window, even though I set the default output using
PrintTo = PrintTo.OutputTab1;
- How do I create the file of OHLC values that SampleStreamWriter should be writing?
- Why is my Print() statement not writing output to my output window?
Thank you!
Comment