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
    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
        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.
            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 cmoran13, 04-16-2026, 01:02 PM
                0 responses
                57 views
                0 likes
                Last Post cmoran13  
                Started by PaulMohn, 04-10-2026, 11:11 AM
                0 responses
                36 views
                0 likes
                Last Post PaulMohn  
                Started by CarlTrading, 03-31-2026, 09:41 PM
                1 response
                165 views
                1 like
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                101 views
                1 like
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                162 views
                2 likes
                Last Post CaptainJack  
                Working...
                X