Go Back   NinjaTrader Support Forum > NinjaScript Educational Resources > Reference Samples

Reference Samples Official NinjaScript reference code samples

Reply
 
Thread Tools Display Modes
Old 09-30-2007, 10:38 PM   #1
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,460
Thanks: 1
Thanked 171 times in 82 posts
Default Indicator: 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.

This reference sample demonstrates the following concepts:
  • Creating a text file with StreamWriter
  • Writing Open-High-Low-Close data with date stamps to the file
Important methods and properties used include:Other methods and properties of interest include:Import instructions:
  1. Download the file contained in this thread to your PC desktop
  2. From the Control Center window, select the menu File > Utilities > Import NinjaScript
  3. Select the downloaded file
Attached Files
File Type: zip SampleStreamWriter.zip (2.0 KB, 1717 views)
File Type: zip SampleStreamWriter_NT7.zip (2.3 KB, 1557 views)
NinjaTrader_Josh is offline  
Reply With Quote
The following 2 users say thank you to NinjaTrader_Josh for this post:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'Hello World' as a text file record ? grd974 General Programming 8 10-25-2012 10:16 AM
Need help with Drawing text sisidemo Indicator Development 25 08-30-2007 12:01 PM
How to write second cross over of MACD? Jenny Strategy Development 2 07-18-2007 06:23 AM
How to write a time period in wizard? Jenny Strategy Development 19 06-18-2007 07:04 AM
Indicator file cached? "Name already in use" error in wizard... funk101 Indicator Development 3 04-27-2007 10:53 AM


All times are GMT -6. The time now is 12:09 PM.

FULL RISK DISCLOSURE: Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.