• 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

Here's a script to convert indicators and strategies

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

    #46
    Hi David,

    Thanks for the compliment!

    Unfortunately, I have not done anything with bars so I have not created a conversion for them. I wish you luck in your search.

    Wil

    Comment


      #47
      Here are some additional items that can be added to the script:
      { ".Pen.Width", ".Width" },
      { ".Pen.Color", ".Brush" },
      { ".Pen.DashStyle", ".DashStyleHelper" },
      { "Bars.MarketData.Connection.Now", "Cbi.Connection.PlaybackConnection.Now" },
      { "Cbi.Globals", "Core.Globals" },
      { "Brushes.Empty", "Brushes.Transparent" },
      { "Bars.Period.Id", "BarsPeriod.BarsPeriodType" },
      { "Bars.BarsType.PeriodType", "BarsPeriod.BarsPeriodType" },

      Comment


        #48
        Hello,

        I would like to convert some of the NT7 indicators to NT8 with help of mentioned way.

        I tried it but instead of conversion I got error message


        Conversion failed!

        System.IO.DirectoryNotFoundException: Část cesty C:\Users\UserName\Documents\NinjaTrader 7\bin\Custom\Indicator nebyla nalezena.
        v System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
        v System.IO.FileSystemEnumerableIterator`1.CommonIni t()
        v System.IO.FileSystemEnumerableIterator`1..ctor(Str ing path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
        v System.IO.Directory.EnumerateFiles(String path, String searchPattern)
        v UserQuery.ConvertFiles(String sourceFolder, String destinationFolder, String fileSearchPattern) v C:\Users\Miroslav\AppData\Local\Temp\LINQPad5\_khp sehrf\query_ivvpvd.cs:řádek 474
        v UserQuery.Main() v C:\Users\Miroslav\AppData\Local\Temp\LINQPad5\_khp sehrf\query_ivvpvd.cs:řádek 65

        Any idea where might be an issue?

        Thank you

        Comment


          #49
          You need to change "C:\Users\UserName\Documents\NinjaTrader 7\bin\Custom\Indicator" in the script so it matches where your NT7 scripts are. Please follow the steps in the post since it lists all the changes needed (which should just be changing two folder locations).

          Comment


            #50
            Error when running LINQPad script

            Thanks very much for your efforts in creating the script to convert indicators and strategies from NT7 to NT8.

            I'm getting this error when I run the script from LINQPad:
            "ReflectionTypeLoadException - Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

            Please help

            By the way, NT8 is on a different (virtual) machine than NT7 in my environment. So I modified your script paths as follows:

            string indicatorSourceFolder = @"C:\tbconverted";
            string indicatorDestinationFolder = @"C:\converted";
            string indicatorFilesToConvert = "*.cs";

            string strategySourceFolder = @"C:\tbconverted";
            string strategyDestinationFolder = @"C:\converted";
            string strategyFilesToConvert = "*.cs";

            Before I ran the script I copied my custom indicators and strategies to the "c:\tbconverted" folder.

            Thanks for your assistance!

            Comment


              #51
              Trying to convert just one indicator to start with.

              I've changed the paths to

              @"C:\Users\tjmcc\Desktop\NT7Indy";
              @"C:\Users\tjmcc\Desktop\NT8Indy"

              and

              @"C:\Users\tjmcc\Desktop\NT7ST"
              @"C:\Users\tjmcc\Desktop\NT8ST"

              I put the indicator in the *NT7Indy folder and left the other three blank. I push the green arrow and get the following:

              Error message 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'

              Any help would be appreciated.

              Thank you,

              Terence

              Comment


                #52
                Hello Segwin,

                Thank you for your post.

                Can you provide the files you are testing?
                Patrick H.NinjaTrader Customer Service

                Comment


                  #53
                  Originally posted by NinjaTrader_PatrickH View Post
                  Hello Segwin,

                  Thank you for your post.

                  Can you provide the files you are testing?
                  I was trying the attached file.

                  Thank you,

                  Terence

                  EDIT: I tried three different ones (stock) and have the same results. I know I'm doing something wrong, just don't what.
                  Attached Files
                  Last edited by Segwin; 07-13-2016, 09:22 AM.

                  Comment


                    #54
                    Hello Segwin,

                    Thank you for your response.

                    Can you attach the file you are testing in NinjaTrader 8?
                    Patrick H.NinjaTrader Customer Service

                    Comment


                      #55
                      Originally posted by NinjaTrader_PatrickH View Post
                      Hello Segwin,

                      Thank you for your response.

                      Can you attach the file you are testing in NinjaTrader 8?
                      Hi Patrick,

                      Well, that's the problem and it is most likely my not understanding the process. I thought if you put the NT7 indicator in the NT7 indy folder the script would change it (or at least what it can and the copy the new one to the NT8 Indy folder.

                      I assume that's not the way it works?

                      Thanks again.

                      Comment


                        #56
                        Originally posted by Segwin View Post
                        Hi Patrick,

                        Well, that's the problem and it is most likely my not understanding the process. I thought if you put the NT7 indicator in the NT7 indy folder the script would change it (or at least what it can and the copy the new one to the NT8 Indy folder.

                        I assume that's not the way it works?

                        Thanks again.
                        This would not work to convert the code if that was the intention. You would need to convert the code manually.
                        Patrick H.NinjaTrader Customer Service

                        Comment


                          #57
                          I'm at a bit of a loss Patrick. How is this script intended to work? I just think of it as taking a xyz.cs for NT7 and then converting it to xyz.cs for NT8 (limitations expected as stated by OP).

                          I guess I'm at a loss for what goes where.

                          Thank you,

                          Terence

                          Comment


                            #58
                            Hello Segwin,

                            Thank you for your response.

                            You would need to contact the developer of the system in order to find out how to use the conversion software.
                            Patrick H.NinjaTrader Customer Service

                            Comment


                              #59
                              Hi

                              Hello ppl,

                              I have an indicator from NT7 a Highlowzone, can someone help me converting to NT8?

                              I don`t know how to do that...

                              Thank you

                              Comment


                                #60
                                Hello tff2011,

                                Thank you for your post.

                                Is this is an indicator you can post in your response?
                                Have you referred to the NinjaTrader 8 code breaking changes? Are you familiar with NinjaTrader 7 NinjaScript?

                                NinjaTrader 9 Code Breaking Changes: http://ninjatrader.com/support/helpG...ng_changes.htm
                                Patrick H.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by turbocing, Today, 03:21 AM
                                0 responses
                                2 views
                                0 likes
                                Last Post turbocing  
                                Started by lakman184, Today, 03:04 AM
                                0 responses
                                2 views
                                0 likes
                                Last Post lakman184  
                                Started by myrtienguyen, Today, 02:18 AM
                                0 responses
                                3 views
                                0 likes
                                Last Post myrtienguyen  
                                Started by WHICKED, Yesterday, 09:03 PM
                                1 response
                                16 views
                                0 likes
                                Last Post Emma1
                                by Emma1
                                 
                                Started by oleotrim, Yesterday, 11:29 PM
                                1 response
                                11 views
                                0 likes
                                Last Post Emma1
                                by Emma1
                                 
                                Working...
                                X