Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Read in GUI parameter values from text file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Read in GUI parameter values from text file

    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
    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

    MatthewNinjaTrader Product Management

    Comment


      #3
      Read in GUI parameter values from text file

      Mathew:
      Thanks for very quick response.
      The sample perfectly outlines what I need to do.
      Much appreciated
      Roland

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Option Whisperer, Today, 09:05 AM
      0 responses
      1 view
      0 likes
      Last Post Option Whisperer  
      Started by cre8able, Yesterday, 01:16 PM
      3 responses
      11 views
      0 likes
      Last Post cre8able  
      Started by Harry, 05-02-2018, 01:54 PM
      10 responses
      3,203 views
      0 likes
      Last Post tharton3  
      Started by ChartTourist, Today, 08:22 AM
      0 responses
      6 views
      0 likes
      Last Post ChartTourist  
      Started by LiamTwine, Today, 08:10 AM
      0 responses
      2 views
      0 likes
      Last Post LiamTwine  
      Working...
      X