![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Feb 2008
Posts: 108
Thanks: 0
Thanked 0 times in 0 posts
|
I would like to be able to read in a variety of GUI values from a text file during the OnStartup() routine.
These values would have been ones that are saved from a prior run of the indicator, perhaps by using Streamwriter facilities.. The need arises during refinement of an indicator with a large number of "Parameters" in the indicator start up GUI. It gets really tedious to put in by hand 25 variable values different from the default values every time the indicator is reloaded. A typical approach might be a file organized as name = value pairs, e.g. span=24 length=18 stop=0.75 and so on. However the exact format is not critical as long as there is some kind of syntax that can capture new values which would override the default parameter values during OnStartup(). Bottom line, I want to be able to save the state of changed "Parameters" and restore them at a later time. Any leads would be much appreciated |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,858
Thanks: 162
Thanked 579 times in 570 posts
|
Hello,
Yes this would be possible but wouldn't require StreamWriter to do so. If you have not yet, please take a look at our reference sample on Using System.IO File properties to write to and read from a text file http://www.ninjatrader.com/support/f...ead.php?t=3477
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Feb 2008
Posts: 108
Thanks: 0
Thanked 0 times in 0 posts
|
Mathew:
Thanks for very quick response. The sample perfectly outlines what I need to do. Much appreciated Roland |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cannot read text using text tool on black chart background | Billy Valentine | Charting | 6 | 12-07-2012 11:07 AM |
| How to make parameter read-only | cassb | Version 7 Beta General Questions & Bug Reports | 15 | 04-15-2010 10:12 AM |
| Write the values of an indicator to a text file | mat1024 | Indicator Development | 4 | 03-22-2010 01:45 PM |
| Indicator: Using System.IO File properties to write to and read from a text file | NinjaTrader_Josh | Reference Samples | 0 | 09-30-2007 10:48 PM |
| Indicator: Using StreamReader to read from a text file | NinjaTrader_Josh | Reference Samples | 0 | 09-30-2007 10:42 PM |