• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

external settings for file read

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

    external settings for file read

    Dear friends.
    I need to give users on external settings, to type path to text file with signals.
    I know how to make external settings for double and int values. But how can I do external settings for string value as files path?

    #2
    Hello daglas,
    You may try using the FileNameEditor attribute in your code to do it.

    Please refer to this thread which further discusses this
    http://www.ninjatrader.com/support/f...eEditor&page=2
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Joydeep View Post
      Hello daglas,
      You may try using the FileNameEditor attribute in your code to do it.

      Please refer to this thread which further discusses this
      http://www.ninjatrader.com/support/f...eEditor&page=2
      Thanks for link. But I can't find full source code. I try to use some parts of code but they did not work.
      I made more simple code.
      Code:
      *********
      private string open="C:\\Users\\";
      ***********
      
      [Description("path to file with signals")]
              [GridCategory("Parameters")]
              public string Open
              {
                  get{return open;}
                  set{open=(string)value;}
              }
      But I have error - can't get or set data, error convert NinjaTrader.Indicator.DataSeriesHelper" to "System.String

      Comment


        #4
        Hello daglas,
        Please refer to this post which further demonstrates it
        http://www.ninjatrader.com/support/f...70&postcount=5
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Joydeep View Post
          Hello daglas,
          Please refer to this post which further demonstrates it
          http://www.ninjatrader.com/support/f...70&postcount=5
          I have use this source. But it does not work.
          I have error FileNameEditor ... in namespace System.Windows.Forms.Design

          Comment


            #6
            Hello daglas,
            Please make sure to add reference to the System.Design.dll file located in the .Net Installation folder.

            A typical location for the file will be "C:\Windows\Microsoft.NET\Framework64\v2.0.507 27\"

            Please refer to our help guide to know how to add a reference.
            http://www.ninjatrader.com/support/h...indicators.htm
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Joydeep View Post
              Hello daglas,
              Please make sure to add reference to the System.Design.dll file located in the .Net Installation folder.

              A typical location for the file will be "C:\Windows\Microsoft.NET\Framework64\v2.0.507 27\"

              Please refer to our help guide to know how to add a reference.
              http://www.ninjatrader.com/support/h...indicators.htm
              Thanks. I have compiled my strategy, but I have run time error.
              **NT** Error on getting/setting property 'Open' for strategy ***
              can't convert "NinjaTrader.Indicator.DataSeriesHelper" to "System.String"

              Comment


                #8
                Hello daglas,
                Can you please send the cs file, which is exhibiting the scenario to support[AT]ninjatrader[DOT]com

                You can locate the cs file in the folder ~\Documents\NinjaTrader 7\bin\Custom\Strategy\

                Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

                I look forward to assisting you further.
                JoydeepNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by chrismcdermut, Today, 01:46 PM
                3 responses
                16 views
                0 likes
                Last Post MojoJojo  
                Started by Bricolico, Today, 09:28 PM
                0 responses
                4 views
                0 likes
                Last Post Bricolico  
                Started by Tradwell385, Today, 08:51 PM
                0 responses
                6 views
                0 likes
                Last Post Tradwell385  
                Started by dvcpro4, Today, 07:08 PM
                0 responses
                18 views
                0 likes
                Last Post dvcpro4
                by dvcpro4
                 
                Started by pennywise, Today, 06:40 PM
                0 responses
                8 views
                0 likes
                Last Post pennywise  
                Working...
                X