Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 - editor does not support new when running nswrappers script

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

    NT8 - editor does not support new when running nswrappers script

    NT8 - editor does not support new when running nswrappers script

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.
    MicroTrends
    NinjaTrader Ecosystem Vendor - micro-trends.co.uk

    #2
    I'm not sure
    a) why you manually edit the wrappers,which you never should do anyway
    b) which C# language syntax would allow you doing what you're trying to do

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      I'm not sure
      a) why you manually edit the wrappers,which you never should do anyway
      b) which C# language syntax would allow you doing what you're trying to do
      a) no one is editing NS WRAPPERS !!!! LOL!!!!

      ok the problem is this...


      b)here is info for you about the "New" keyword
      Use the new and override keywords in C# to specify how methods with the same name in a base and derived class interact.

      the "NEW" keyword is not understood by the macro and it then creates a broken Wrapper

      i provided a demo to show you the macro doesnt understand it...
      can you understand that or do you want a video of it?
      i realize its hard to understand unless you are at my desk wathcing :-)
      MicroTrends
      NinjaTrader Ecosystem Vendor - micro-trends.co.uk

      Comment


        #4
        Could you pls provide steps which would generate that wrapper code? Thanks

        Comment


          #5
          Originally posted by NinjaTrader_Dierk View Post
          Could you pls provide steps which would generate that wrapper code? Thanks
          certainly

          Open for Edit any indicator - Bollinger for example
          change the following property from

          Code:
          [Range(0, int.MaxValue), NinjaScriptProperty]
          		[Display(ResourceType = typeof(Custom.Resource), Name = "NumStdDev", GroupName = "NinjaScriptParameters", Order = 0)]
          		public double NumStdDev
          		{ get; set; }
          to

          Code:
          [Range(0, int.MaxValue), NinjaScriptProperty]
          		[Display(ResourceType = typeof(Custom.Resource), Name = "NumStdDev", GroupName = "NinjaScriptParameters", Order = 0)]
          		public new double NumStdDev
          		{ get; set; }
          save the file as a copy
          compile
          wait for error in NSWrapper generation



          yes i realise in this case the change is superflous but it demonstrates the editor limitaion when the usage is used to try to prevent the recursion warning.. .when using a property to wrap around a class B derived from A + C local instance pattern common in c# etc...
          for example....
          Last edited by MicroTrends; 05-12-2015, 04:54 AM.
          MicroTrends
          NinjaTrader Ecosystem Vendor - micro-trends.co.uk

          Comment


            #6
            Thanks. Will be implemented with next beta: #8209

            Comment


              #7
              Originally posted by NinjaTrader_Dierk View Post
              Thanks. Will be implemented with next beta: #8209
              Wow perfecto! you are very fantastic for changing that :-)

              That will negate the need for changing param names for this scenario also:
              as the new keyword will stop the incorrect recursion message

              therefore that has two solutions...

              many thanks

              that has plagued me for a long time :-)
              MicroTrends
              NinjaTrader Ecosystem Vendor - micro-trends.co.uk

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Waxavi, Today, 02:00 AM
              0 responses
              2 views
              0 likes
              Last Post Waxavi
              by Waxavi
               
              Started by elirion, Today, 01:36 AM
              0 responses
              4 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by gentlebenthebear, Today, 01:30 AM
              0 responses
              4 views
              0 likes
              Last Post gentlebenthebear  
              Started by samish18, Yesterday, 08:31 AM
              2 responses
              9 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by Mestor, 03-10-2023, 01:50 AM
              16 responses
              391 views
              0 likes
              Last Post z.franck  
              Working...
              X