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

Errors on migrating from NT7 to NT8

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

    Errors on migrating from NT7 to NT8

    Hello.

    I am trying to migrate a code from NT7 to NT8. I opened the code in NT8 and when I tried to compile, there were several errors. I fixed many of them, but I was left with many that I couldn't fix. I am sending as attachment a png file with all the errors (I tried to send an xls file but it didn't work). Although there is a total count of 13 errors there are only 3 kinds of errors:
    1) No suitable method for replace was found
    2) not possible to replace the inherited member X because it is not marked as virtual, abstract ou override
    3) X does not implement the inherited abstract member Y
    What can I do fix my code?

    Thanks,
    Claudio
    Attached Files

    #2
    Hello Claudio,

    Thanks for opening the thread.

    Without the full code I am only left to speculate on the errors received. Although I could provide some further direction.

    BarTypes in NinjaTrader 7 were not documented so porting the bar type will involve more than referencing the Code Breaking Changes page of the help guide.

    Some methods and properties are slightly changed, and others are not included or replaced in NinjaTrader 8 bartypes. You may check the NinjaTrader 8 BarType documentation to reference the implementations for any method you have implemented to see if it is using the appropriate NinjaTrader 8 method and syntax.

    I may also suggest referencing our open source bar types to check your implementation or to check other custom bar types for comparisons.

    Our Bar Type documentation for NinjaTrader 8 can be found here - https://ninjatrader.com/support/help.../bars_type.htm

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hello.

      I did manage to solve many error, but one particularly left me surprised...

      The error is:
      NinjaTrader.Data.BetterRenkoBars.Type.GetPropertie s(System.ComponentModel.PropertyDescriptor, NinjaTrader.Data.BarsPeriod, System.Attribute[])': No suitable method found to override

      The problem is that there exists in my code a method that matches this signature perfectly:
      public override PropertyDescriptorCollection GetProperties(PropertyDescriptor propertyDescriptor, BarsPeriod period, Attribute[] attributes)

      So, what should I do to fix this error? What could be wrong?

      Thanks,
      Claudio

      Comment


        #4
        Hello Claudio,

        Since I don't have a copy of the code, I am only left to guess at what you are attempting and the context of the error received.

        The method you are trying to override is offered in the IndicatorBaseConverter and StrategyBaseConverter classes. These are used for TypeConverters when customizing an indicator's or strategy's property grid. We also do not offer a TypeConverter base class for Bar Types. Without the context, I am not sure what you are trying to implement.

        If you would like to look further into customizing property grid behavior using TypeConverters for strategies and indicators, please see the example and associated documentation here: https://ninjatrader.com/support/foru...ad.php?t=97919

        My recommendation would be to use an existing bar type as the basis of your works and then to implement the calculation logic from the NT7 bar type. This way, the task should be straight forward to accomplish and then other functionalities could be implemented at a later time.

        I have found a version of "Better Renko" bars for NinjaTrader 8 that is available on our forums. You may wish to compare this conversion with yours to see what that developer has done differently, and to provide further direction with your own conversion. I'll provide a link below.

        Better Renko Bars (NT8) - https://ninjatrader.com/support/foru...tid=-1&lpage=1

        If there is anything else we can do to help, please let us know.
        JimNinjaTrader Customer Service

        Comment


          #5
          Thank you, Jim.

          I started using the Better Renko Bars for NT8 and I got very strange results. I am comparing Better Renko with a regular Renko. When I use Brick Size 1 or 2, the Close values of the bricks are the same in both Charts. However, for brick size of 3 or higher, the Close values are diferent. Could you help me understand why this may be happening?

          Cordially,
          Claudio

          Comment


            #6
            Hello Claudio,

            I am not an expert on the Better Renko bar or know much about its inner workings. I couldn't say if the behavior is expected or not.

            Since this is not a NinjaTrader product, I suggest reaching out to the person who had created the Better Renko bartype for questions and assistance in using their code. The person who had posted the NT8 version, dalebru, can be contacted here: https://ninjatrader.com/support/foru...er.php?u=40045

            Our user end documentation for our Renko bars can be found here - https://ninjatrader.com/support/help...ndingRenkoBars

            Any more in depth look into our Renko bartype can be referenced in the bartype's source code.
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by love2code2trade, 04-17-2024, 01:45 PM
            4 responses
            31 views
            0 likes
            Last Post love2code2trade  
            Started by cls71, Today, 04:45 AM
            2 responses
            10 views
            0 likes
            Last Post eDanny
            by eDanny
             
            Started by proptrade13, Today, 11:06 AM
            0 responses
            2 views
            0 likes
            Last Post proptrade13  
            Started by kulwinder73, Today, 10:31 AM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by RookieTrader, Today, 09:37 AM
            3 responses
            15 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X