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

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 DJ888, 04-16-2024, 06:09 PM
                4 responses
                12 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by terofs, Today, 04:18 PM
                0 responses
                11 views
                0 likes
                Last Post terofs
                by terofs
                 
                Started by nandhumca, Today, 03:41 PM
                0 responses
                7 views
                0 likes
                Last Post nandhumca  
                Started by The_Sec, Today, 03:37 PM
                0 responses
                3 views
                0 likes
                Last Post The_Sec
                by The_Sec
                 
                Started by GwFutures1988, Today, 02:48 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Working...
                X