Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      559 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      546 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X