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?

                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?

                    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.

                        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.

                            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

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by cre8able, Today, 01:01 PM
                                0 responses
                                1 view
                                0 likes
                                Last Post cre8able  
                                Started by manitshah915, Today, 12:59 PM
                                0 responses
                                2 views
                                0 likes
                                Last Post manitshah915  
                                Started by ursavent, Today, 12:54 PM
                                0 responses
                                2 views
                                0 likes
                                Last Post ursavent  
                                Started by Mizzouman1, Today, 07:35 AM
                                3 responses
                                17 views
                                0 likes
                                Last Post NinjaTrader_Gaby  
                                Started by RubenCazorla, Today, 09:07 AM
                                2 responses
                                13 views
                                0 likes
                                Last Post NinjaTrader_ChelseaB  
                                Working...
                                X