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 AaronKoRn, Yesterday, 09:49 PM
      0 responses
      11 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      10 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      11 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,981 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Yesterday, 06:48 PM
      0 responses
      9 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X